From 4273ff0b224d5466fd5c9bb4901d4e8eff0192c8 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 4 Apr 2020 16:49:00 +0200 Subject: [PATCH] if the app is set as default, just go ahead --- .../smsmessenger/activities/MainActivity.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/MainActivity.kt index 59bbbb4f..6c3b5ad0 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/MainActivity.kt @@ -4,7 +4,6 @@ import android.app.Activity import android.content.Intent import android.os.Bundle import android.provider.Telephony -import android.util.Log import android.view.Menu import android.view.MenuItem import com.simplemobiletools.commons.extensions.appLaunched @@ -37,7 +36,9 @@ class MainActivity : SimpleActivity() { return } - if (Telephony.Sms.getDefaultSmsPackage(this) != packageName) { + if (Telephony.Sms.getDefaultSmsPackage(this) == packageName) { + askPermissions() + } else { if (isQPlus()) { } else {