Skip to content

Commit

Permalink
Upgrade Jetpack libraries for Sept 15, 2021
Browse files Browse the repository at this point in the history
- Activity 1.4.0-alpha02 (fixing `ActivityResultContract` nullability)
- Browser 1.4.0-alpha01
- Core 1.7.0-beta01
- Fragment 1.4.0-alpha09 (removing now unnecessary `!!` from `getFragment` call, property access for `defaultPolicy`)
- Lifecycle 2.4.0-beta01
- Navigation 2.4.0-alpha09
- RecyclerView 1.3.0-alpha01
  • Loading branch information
ianhanniballake committed Sep 17, 2021
1 parent ea93d1f commit 0b49a8e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions build.gradle
Expand Up @@ -19,33 +19,33 @@ buildscript {
compileSdkVersion = 31
targetSdkVersion = 30

activityVersion = '1.4.0-alpha01'
activityVersion = '1.4.0-alpha02'
appCompatVersion = '1.4.0-alpha03'
archCoreVersion = '2.1.0'
browserVersion = '1.3.0'
browserVersion = '1.4.0-alpha01'
coilVersion = '1.3.2'
constraintLayoutVersion = '2.0.4'
coreVersion = '1.7.0-alpha02'
coreVersion = '1.7.0-beta01'
coroutinesVersion = '1.5.1'
dokkaVersion = '1.4.20'
drawerLayoutVersion = '1.1.1'
exifInterfaceVersion = '1.3.3'
firebaseAnalyticsVersion = '19.0.1'
firebaseCrashlyticsVersion = '18.2.0'
firebasePerfVersion = '20.0.2'
fragmentVersion = '1.4.0-alpha08'
fragmentVersion = '1.4.0-alpha09'
kotlinVersion = '1.5.30'
kspVersion = '1.5.30-1.0.0'
lifecycleVersion = '2.4.0-alpha03'
lifecycleVersion = '2.4.0-beta01'
materialVersion = '1.5.0-alpha03'
multidexVersion = '2.0.1'
navigationVersion = '2.4.0-alpha08'
navigationVersion = '2.4.0-alpha09'
okhttpVersion = '3.12.12'
okhttpCoroutinesVersion = '1.0'
pagingVersion = '3.1.0-alpha03'
playServicesWearableVersion = '17.1.0'
preferenceVersion = '1.1.1'
recyclerViewVersion = '1.2.1'
recyclerViewVersion = '1.3.0-alpha01'
retrofitVersion = '2.9.0'
roomVersion = '2.4.0-alpha04'
subsamplingVersion = '3.10.0'
Expand Down
Expand Up @@ -56,7 +56,7 @@ class MainFragment : Fragment(R.layout.main_fragment), ChooseProviderFragment.Ca
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
// Set up the container for the child fragments
binding = MainFragmentBinding.bind(view)
val navHostFragment = binding.container.getFragment<NavHostFragment>()!!
val navHostFragment = binding.container.getFragment<NavHostFragment>()
val navController = navHostFragment.navController
val navGraph = navController.navInflater.inflate(R.navigation.main_navigation)
if (requireActivity().isPreviewMode) {
Expand Down
Expand Up @@ -47,7 +47,7 @@ class MuzeiApplication : MultiDexApplication(), SharedPreferences.OnSharedPrefer

override fun onCreate() {
super.onCreate()
FragmentStrictMode.setDefaultPolicy(FragmentStrictMode.Policy.Builder()
FragmentStrictMode.defaultPolicy = FragmentStrictMode.Policy.Builder()
.detectFragmentReuse()
.detectFragmentTagUsage()
.detectRetainInstanceUsage()
Expand All @@ -69,7 +69,7 @@ class MuzeiApplication : MultiDexApplication(), SharedPreferences.OnSharedPrefer
}
}
}
.build())
.build()
updateNightMode()
val sharedPreferences = Prefs.getSharedPreferences(this)
sharedPreferences.registerOnSharedPreferenceChangeListener(this)
Expand Down
Expand Up @@ -99,7 +99,7 @@ private class ChoosePhotos : ActivityResultContract<Unit, List<Uri>>() {
private val openMultipleDocuments = ActivityResultContracts.OpenMultipleDocuments()

@SuppressLint("InlinedApi")
override fun createIntent(context: Context, input: Unit?) =
override fun createIntent(context: Context, input: Unit) =
openMultipleDocuments.createIntent(context, arrayOf("image/*"))
.addCategory(Intent.CATEGORY_OPENABLE)
.putExtra(DocumentsContract.EXTRA_EXCLUDE_SELF, true)
Expand All @@ -114,7 +114,7 @@ private class ChooseFolder : ActivityResultContract<Unit, Uri?>() {

@RequiresApi(21)
@SuppressLint("InlinedApi")
override fun createIntent(context: Context, input: Unit?) =
override fun createIntent(context: Context, input: Unit) =
openDocumentTree.createIntent(context, null)
.putExtra(DocumentsContract.EXTRA_EXCLUDE_SELF, true)

Expand Down
Expand Up @@ -41,12 +41,12 @@ private val permissions = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
internal class RequestStoragePermissions : ActivityResultContract<Unit, Boolean>() {
private val requestMultiplePermissions = RequestMultiplePermissions()

override fun createIntent(context: Context, input: Unit?) =
override fun createIntent(context: Context, input: Unit) =
requestMultiplePermissions.createIntent(context, permissions)

override fun getSynchronousResult(
context: Context,
input: Unit?
input: Unit
) = requestMultiplePermissions.getSynchronousResult(context, permissions)?.let { result ->
SynchronousResult(result.value.getOrElse(Manifest.permission.READ_EXTERNAL_STORAGE) { false })
}
Expand Down

0 comments on commit 0b49a8e

Please sign in to comment.