Skip to content

Commit

Permalink
Bugfixes for Android 12.
Browse files Browse the repository at this point in the history
  • Loading branch information
mopsalarm committed Sep 8, 2021
1 parent 66a3e6d commit cce6938
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
12 changes: 9 additions & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,15 @@

<!-- disable work manager auto initializer-->
<provider
android:name="androidx.work.impl.WorkManagerInitializer"
android:authorities="${applicationId}.workmanager-init"
tools:node="remove" />
android:name="androidx.startup.InitializationProvider"
android:authorities="${applicationId}.androidx-startup"
android:exported="false"
tools:node="merge">

<meta-data
android:name="androidx.work.WorkManagerInitializer"
tools:node="remove" />
</provider>

<!-- disable firebase auto initializer-->
<provider
Expand Down
11 changes: 0 additions & 11 deletions app/src/main/java/com/pr0gramm/app/ui/SettingsFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import com.pr0gramm.app.ui.intro.IntroActivity
import com.pr0gramm.app.util.AndroidUtility
import com.pr0gramm.app.util.di.instance
import com.pr0gramm.app.util.doInBackground
import com.pr0gramm.app.util.ignoreAllExceptions
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.runInterruptible
Expand Down Expand Up @@ -181,17 +180,7 @@ class SettingsFragment : BasePreferenceFragment("SettingsFragment"),

"pref_pseudo_download_target" -> {
val intent = Storage.openTreeIntent(requireContext())

ignoreAllExceptions {
val noActivityAvailable = requireContext().packageManager.queryIntentActivities(intent, 0).isEmpty()
if (noActivityAvailable) {
showNoFileManagerAvailable()
return true
}
}

startActivityForResult(intent, RequestCodes.SELECT_DOWNLOAD_PATH)

return true
}

Expand Down

0 comments on commit cce6938

Please sign in to comment.