From 241baaadf168d48a09cb1b45f50dab00b02c9883 Mon Sep 17 00:00:00 2001 From: camsim99 Date: Tue, 8 Oct 2024 12:56:52 -0700 Subject: [PATCH 1/5] add base change --- .../camera/camera_android_camerax/CHANGELOG.md | 6 ++++++ packages/camera/camera_android_camerax/README.md | 16 ++++++++++++++-- .../android/src/main/AndroidManifest.xml | 3 --- .../camera/camera_android_camerax/pubspec.yaml | 2 +- 4 files changed, 21 insertions(+), 6 deletions(-) diff --git a/packages/camera/camera_android_camerax/CHANGELOG.md b/packages/camera/camera_android_camerax/CHANGELOG.md index b1ecba94bf0e..053018894724 100644 --- a/packages/camera/camera_android_camerax/CHANGELOG.md +++ b/packages/camera/camera_android_camerax/CHANGELOG.md @@ -1,3 +1,9 @@ +## 0.6.10 + +* Removes logic to explicitly remove `READ_EXTERNAL_STORAGE` permission that may be implied + from `WRITE_EXTERNAL_STORAGE` and updates the README to tell users how to manually + remove it from the app's merged manifest. + ## 0.6.9+2 * Updates Java compatibility version to 11. diff --git a/packages/camera/camera_android_camerax/README.md b/packages/camera/camera_android_camerax/README.md index bc929109cadb..a9324100a12b 100644 --- a/packages/camera/camera_android_camerax/README.md +++ b/packages/camera/camera_android_camerax/README.md @@ -57,8 +57,19 @@ and thus that parameter will silently be ignored. In order to save captured images and videos to files on Android 10 and below, CameraX requires specifying the `WRITE_EXTERNAL_STORAGE` permission (see [the CameraX documentation][10]). -This is already done in the plugin, so no further action is required on your end. To understand -the implications of specificying this permission, see [the `WRITE_EXTERNAL_STORAGE` documentation][11]. +This is already done in the plugin, so no further action is required on your end. To understand the +implications of specificying this permission, see [the `WRITE_EXTERNAL_STORAGE` documentation][11]. + +Please note that the [`READ_EXTERNAL_STORAGE`][13] permission may be implied from `WRITE_EXTERNAL_STORAGE` +permission and thus, be included in the merged Android manifest of your app. If you do not want the +`READ_EXTERNAL_STORAGE` permission to be included in the merged Android manifest of your app and your +app nor any of the plugins that it depends on require it, then you may remove it by adding the following +to your app's `AndroidManifest.xml`: + +```xml + +``` ### Allowing image streaming in the background @@ -91,4 +102,5 @@ For more information on contributing to this plugin, see [`CONTRIBUTING.md`](CON [10]: https://developer.android.com/media/camera/camerax/architecture#permissions [11]: https://developer.android.com/reference/android/Manifest.permission#WRITE_EXTERNAL_STORAGE [12]: https://developer.android.com/reference/android/Manifest.permission#FOREGROUND_SERVICE_CAMERA +[13]: https://developer.android.com/reference/android/Manifest.permission#READ_EXTERNAL_STORAGE [148013]: https://github.com/flutter/flutter/issues/148013 diff --git a/packages/camera/camera_android_camerax/android/src/main/AndroidManifest.xml b/packages/camera/camera_android_camerax/android/src/main/AndroidManifest.xml index e1629a607c3a..52012aaa6915 100644 --- a/packages/camera/camera_android_camerax/android/src/main/AndroidManifest.xml +++ b/packages/camera/camera_android_camerax/android/src/main/AndroidManifest.xml @@ -1,11 +1,8 @@ - diff --git a/packages/camera/camera_android_camerax/pubspec.yaml b/packages/camera/camera_android_camerax/pubspec.yaml index 60a0a82bb4aa..51d18c6aaa07 100644 --- a/packages/camera/camera_android_camerax/pubspec.yaml +++ b/packages/camera/camera_android_camerax/pubspec.yaml @@ -2,7 +2,7 @@ name: camera_android_camerax description: Android implementation of the camera plugin using the CameraX library. repository: https://github.com/flutter/packages/tree/main/packages/camera/camera_android_camerax issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22 -version: 0.6.9+2 +version: 0.6.10 environment: sdk: ^3.5.0 From a9d82950c4eee50e7e517ffa6eaf8c5c18087901 Mon Sep 17 00:00:00 2001 From: camsim99 Date: Tue, 8 Oct 2024 13:09:28 -0700 Subject: [PATCH 2/5] edits --- packages/camera/camera_android_camerax/CHANGELOG.md | 2 +- packages/camera/camera_android_camerax/README.md | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/camera/camera_android_camerax/CHANGELOG.md b/packages/camera/camera_android_camerax/CHANGELOG.md index 053018894724..8c4e151f56f8 100644 --- a/packages/camera/camera_android_camerax/CHANGELOG.md +++ b/packages/camera/camera_android_camerax/CHANGELOG.md @@ -2,7 +2,7 @@ * Removes logic to explicitly remove `READ_EXTERNAL_STORAGE` permission that may be implied from `WRITE_EXTERNAL_STORAGE` and updates the README to tell users how to manually - remove it from the app's merged manifest. + remove it from their app's merged manifest if they wish. ## 0.6.9+2 diff --git a/packages/camera/camera_android_camerax/README.md b/packages/camera/camera_android_camerax/README.md index a9324100a12b..dd5864b8b325 100644 --- a/packages/camera/camera_android_camerax/README.md +++ b/packages/camera/camera_android_camerax/README.md @@ -57,14 +57,16 @@ and thus that parameter will silently be ignored. In order to save captured images and videos to files on Android 10 and below, CameraX requires specifying the `WRITE_EXTERNAL_STORAGE` permission (see [the CameraX documentation][10]). -This is already done in the plugin, so no further action is required on your end. To understand the -implications of specificying this permission, see [the `WRITE_EXTERNAL_STORAGE` documentation][11]. +This is already done in the plugin, so no further action is required on your end. To understand +the implications of specificying this permission, see [the `WRITE_EXTERNAL_STORAGE` documentation][11]. Please note that the [`READ_EXTERNAL_STORAGE`][13] permission may be implied from `WRITE_EXTERNAL_STORAGE` permission and thus, be included in the merged Android manifest of your app. If you do not want the -`READ_EXTERNAL_STORAGE` permission to be included in the merged Android manifest of your app and your -app nor any of the plugins that it depends on require it, then you may remove it by adding the following -to your app's `AndroidManifest.xml`: +`READ_EXTERNAL_STORAGE` permission to be included in the merged Android manifest of your app, then you can +do the following to remove it: + +1. Ensure that your app nor any of the plugins that it depends on require the `READ_EXTERNAL_STORAGE` permission. +2. Add the following to your app's `your_app/android/app/src/main/AndroidManifest.xml`: ```xml Date: Tue, 8 Oct 2024 14:25:05 -0700 Subject: [PATCH 3/5] nit --- packages/camera/camera_android_camerax/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/camera/camera_android_camerax/CHANGELOG.md b/packages/camera/camera_android_camerax/CHANGELOG.md index 8c4e151f56f8..18218256feea 100644 --- a/packages/camera/camera_android_camerax/CHANGELOG.md +++ b/packages/camera/camera_android_camerax/CHANGELOG.md @@ -1,6 +1,6 @@ ## 0.6.10 -* Removes logic to explicitly remove `READ_EXTERNAL_STORAGE` permission that may be implied +* Removes logic that explicitly removes `READ_EXTERNAL_STORAGE` permission that may be implied from `WRITE_EXTERNAL_STORAGE` and updates the README to tell users how to manually remove it from their app's merged manifest if they wish. From d2813b5b276d1b1755bf693d58b84087f24961d2 Mon Sep 17 00:00:00 2001 From: camsim99 Date: Wed, 9 Oct 2024 09:59:25 -0700 Subject: [PATCH 4/5] Rewrite --- packages/camera/camera_android_camerax/README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/camera/camera_android_camerax/README.md b/packages/camera/camera_android_camerax/README.md index dd5864b8b325..8e8d5809b8ea 100644 --- a/packages/camera/camera_android_camerax/README.md +++ b/packages/camera/camera_android_camerax/README.md @@ -57,13 +57,13 @@ and thus that parameter will silently be ignored. In order to save captured images and videos to files on Android 10 and below, CameraX requires specifying the `WRITE_EXTERNAL_STORAGE` permission (see [the CameraX documentation][10]). -This is already done in the plugin, so no further action is required on your end. To understand -the implications of specificying this permission, see [the `WRITE_EXTERNAL_STORAGE` documentation][11]. +This is already done in the plugin, so no further action is required on your end. -Please note that the [`READ_EXTERNAL_STORAGE`][13] permission may be implied from `WRITE_EXTERNAL_STORAGE` -permission and thus, be included in the merged Android manifest of your app. If you do not want the -`READ_EXTERNAL_STORAGE` permission to be included in the merged Android manifest of your app, then you can -do the following to remove it: +To understand the privacy impact of specifying the `WRITE_EXTERNAL_STORAGE` permission, see the +[`WRITE_EXTERNAL_STORAGE` documentation][11]. We have seen apps also have the `READ_EXTERNAL_STORAGE` +permission automatically added to the merged Android manifest; it appears to be implied from +`WRITE_EXTERNAL_STORAGE`. If you do not want the `READ_EXTERNAL_STORAGE` permission to be included +in the merged Android manifest of your app, then take the following steps to remove it: 1. Ensure that your app nor any of the plugins that it depends on require the `READ_EXTERNAL_STORAGE` permission. 2. Add the following to your app's `your_app/android/app/src/main/AndroidManifest.xml`: From 3b4cbf09b6c1f799f3bba7f0d07bfb207b394141 Mon Sep 17 00:00:00 2001 From: camsim99 Date: Wed, 9 Oct 2024 10:01:28 -0700 Subject: [PATCH 5/5] add back res link --- packages/camera/camera_android_camerax/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/camera/camera_android_camerax/README.md b/packages/camera/camera_android_camerax/README.md index 8e8d5809b8ea..c409f1a902eb 100644 --- a/packages/camera/camera_android_camerax/README.md +++ b/packages/camera/camera_android_camerax/README.md @@ -60,7 +60,7 @@ requires specifying the `WRITE_EXTERNAL_STORAGE` permission (see [the CameraX do This is already done in the plugin, so no further action is required on your end. To understand the privacy impact of specifying the `WRITE_EXTERNAL_STORAGE` permission, see the -[`WRITE_EXTERNAL_STORAGE` documentation][11]. We have seen apps also have the `READ_EXTERNAL_STORAGE` +[`WRITE_EXTERNAL_STORAGE` documentation][11]. We have seen apps also have the [`READ_EXTERNAL_STORAGE`][13] permission automatically added to the merged Android manifest; it appears to be implied from `WRITE_EXTERNAL_STORAGE`. If you do not want the `READ_EXTERNAL_STORAGE` permission to be included in the merged Android manifest of your app, then take the following steps to remove it: