From 43363095c3693bbd8a3d6ef89ae37d6b486360ef Mon Sep 17 00:00:00 2001 From: Atsushi Eno Date: Mon, 17 Jul 2023 00:16:54 +0900 Subject: [PATCH] Alter use of READ_EXTERNAL_STORAGE permission from permissions samples. fixes #1679. RequestMultiplePermissionsSample was using READ_EXTERNAL_STORAGE, but this permission was removed at API Level 33 for more detailed items. It leads to the state where rememberMultiplePermissionsState() never count it as approved whereas launchMultiplePermissionRequest() will never ask the user for it as a valid permission, and the entire sample never gets to the "both approved" state. Use another permission entry which is still valid at any API level. --- sample/src/main/AndroidManifest.xml | 2 +- .../sample/permissions/RequestMultiplePermissionsSample.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sample/src/main/AndroidManifest.xml b/sample/src/main/AndroidManifest.xml index 255f2eada..b24221b2d 100644 --- a/sample/src/main/AndroidManifest.xml +++ b/sample/src/main/AndroidManifest.xml @@ -24,7 +24,7 @@ - + diff --git a/sample/src/main/java/com/google/accompanist/sample/permissions/RequestMultiplePermissionsSample.kt b/sample/src/main/java/com/google/accompanist/sample/permissions/RequestMultiplePermissionsSample.kt index 123244adf..c4369df93 100644 --- a/sample/src/main/java/com/google/accompanist/sample/permissions/RequestMultiplePermissionsSample.kt +++ b/sample/src/main/java/com/google/accompanist/sample/permissions/RequestMultiplePermissionsSample.kt @@ -42,7 +42,7 @@ class RequestMultiplePermissionsSample : ComponentActivity() { AccompanistSampleTheme { val multiplePermissionsState = rememberMultiplePermissionsState( listOf( - android.Manifest.permission.READ_EXTERNAL_STORAGE, + android.Manifest.permission.RECORD_AUDIO, android.Manifest.permission.CAMERA, ) )