diff --git a/src/main/kotlin/com/looker/droidify/content/Preferences.kt b/src/main/kotlin/com/looker/droidify/content/Preferences.kt index afcd9a27..cbc7dcfa 100644 --- a/src/main/kotlin/com/looker/droidify/content/Preferences.kt +++ b/src/main/kotlin/com/looker/droidify/content/Preferences.kt @@ -132,7 +132,7 @@ object Preferences { Value.EnumerationValue(Preferences.AutoSync.Wifi) ) object AutoSyncInstall : - Key("auto_sync_install", Value.BooleanValue(true)) + Key("auto_sync_install", Value.BooleanValue(Android.sdk(31))) object IncompatibleVersions : Key("incompatible_versions", Value.BooleanValue(false)) diff --git a/src/main/kotlin/com/looker/droidify/installer/InstallerService.kt b/src/main/kotlin/com/looker/droidify/installer/InstallerService.kt index 6946e8a2..2be4a9e8 100644 --- a/src/main/kotlin/com/looker/droidify/installer/InstallerService.kt +++ b/src/main/kotlin/com/looker/droidify/installer/InstallerService.kt @@ -32,9 +32,8 @@ class InstallerService : Service() { override fun onStartCommand(intent: Intent, flags: Int, startId: Int): Int { val status = intent.getIntExtra(PackageInstaller.EXTRA_STATUS, -1) - // only trigger a prompt if in foreground or below Android 10, otherwise make notification - // launching a prompt in the background will fail silently - if ((!Android.sdk(29) || Utils.inForeground()) && status == PackageInstaller.STATUS_PENDING_USER_ACTION) { + // only trigger a prompt if in foreground, otherwise make notification + if (Utils.inForeground() && status == PackageInstaller.STATUS_PENDING_USER_ACTION) { // Triggers the installer prompt and "unknown apps" prompt if needed val promptIntent: Intent? = intent.getParcelableExtra(Intent.EXTRA_INTENT)