diff options
| author | 2022-01-31 18:04:44 +0000 | |
|---|---|---|
| committer | 2022-01-31 18:04:44 +0000 | |
| commit | 87b22d6d8fba085d7de2c005b7663c220c646742 (patch) | |
| tree | 804e9b9daf640de94437d60cd4c7302320d1e103 | |
| parent | 5ae1bee47729c572a84c9d639947e2416e918716 (diff) | |
| parent | ff9f7176ace332fba6e68a10acdf73a9d72abf31 (diff) | |
Merge "Revert "Define new AUDIO/VIDEO/IMAGE permissions""
| -rw-r--r-- | core/api/current.txt | 5 | ||||
| -rw-r--r-- | core/java/android/app/AppOpsManager.java | 6 | ||||
| -rw-r--r-- | core/res/AndroidManifest.xml | 55 | ||||
| -rw-r--r-- | core/res/res/drawable/perm_group_read_media_aural.xml | 26 | ||||
| -rw-r--r-- | core/res/res/drawable/perm_group_read_media_visual.xml | 26 | ||||
| -rw-r--r-- | core/res/res/values/strings.xml | 25 | ||||
| -rw-r--r-- | data/etc/platform.xml | 12 |
7 files changed, 3 insertions, 152 deletions
diff --git a/core/api/current.txt b/core/api/current.txt index dd0614648f8c..19830c3990a1 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -135,9 +135,6 @@ package android { field public static final String READ_HOME_APP_SEARCH_DATA = "android.permission.READ_HOME_APP_SEARCH_DATA"; field @Deprecated public static final String READ_INPUT_STATE = "android.permission.READ_INPUT_STATE"; field public static final String READ_LOGS = "android.permission.READ_LOGS"; - field public static final String READ_MEDIA_AUDIO = "android.permission.READ_MEDIA_AUDIO"; - field public static final String READ_MEDIA_IMAGE = "android.permission.READ_MEDIA_IMAGE"; - field public static final String READ_MEDIA_VIDEO = "android.permission.READ_MEDIA_VIDEO"; field public static final String READ_NEARBY_STREAMING_POLICY = "android.permission.READ_NEARBY_STREAMING_POLICY"; field public static final String READ_PHONE_NUMBERS = "android.permission.READ_PHONE_NUMBERS"; field public static final String READ_PHONE_STATE = "android.permission.READ_PHONE_STATE"; @@ -223,8 +220,6 @@ package android { field public static final String NEARBY_DEVICES = "android.permission-group.NEARBY_DEVICES"; field public static final String NOTIFICATIONS = "android.permission-group.NOTIFICATIONS"; field public static final String PHONE = "android.permission-group.PHONE"; - field public static final String READ_MEDIA_AURAL = "android.permission-group.READ_MEDIA_AURAL"; - field public static final String READ_MEDIA_VISUAL = "android.permission-group.READ_MEDIA_VISUAL"; field public static final String SENSORS = "android.permission-group.SENSORS"; field public static final String SMS = "android.permission-group.SMS"; field public static final String STORAGE = "android.permission-group.STORAGE"; diff --git a/core/java/android/app/AppOpsManager.java b/core/java/android/app/AppOpsManager.java index 0d1bc05df67b..fdf37f6633ee 100644 --- a/core/java/android/app/AppOpsManager.java +++ b/core/java/android/app/AppOpsManager.java @@ -2363,11 +2363,11 @@ public class AppOpsManager { Manifest.permission.USE_BIOMETRIC, Manifest.permission.ACTIVITY_RECOGNITION, Manifest.permission.SMS_FINANCIAL_TRANSACTIONS, - Manifest.permission.READ_MEDIA_AUDIO, + null, null, // no permission for OP_WRITE_MEDIA_AUDIO - Manifest.permission.READ_MEDIA_VIDEO, + null, null, // no permission for OP_WRITE_MEDIA_VIDEO - Manifest.permission.READ_MEDIA_IMAGE, + null, null, // no permission for OP_WRITE_MEDIA_IMAGES null, // no permission for OP_LEGACY_STORAGE null, // no permission for OP_ACCESS_ACCESSIBILITY diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index 7df9ca73b0d5..b1ad3caf0d64 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -977,61 +977,6 @@ android:permissionFlags="softRestricted|immutablyRestricted" android:protectionLevel="dangerous" /> - <!-- Required to be able to read audio files from shared storage. - <p>Protection level: dangerous --> - <permission-group android:name="android.permission-group.READ_MEDIA_AURAL" - android:icon="@drawable/perm_group_read_media_aural" - android:label="@string/permgrouplab_readMediaAural" - android:description="@string/permgroupdesc_readMediaAural" - android:priority="950" /> - - <!-- Allows an application to read audio files from external storage. - <p>This permission is enforced starting in API level - {@link android.os.Build.VERSION_CODES#TIRAMISU}. - For apps with a <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code - targetSdkVersion}</a> of {@link android.os.Build.VERSION_CODES#S} or lower, this permission - must not be used and the READ_EXTERNAL_STORAGE permission must be used instead. - <p>Protection level: dangerous --> - <permission android:name="android.permission.READ_MEDIA_AUDIO" - android:permissionGroup="android.permission-group.UNDEFINED" - android:label="@string/permlab_readMediaAudio" - android:description="@string/permdesc_readMediaAudio" - android:protectionLevel="dangerous" /> - - <!-- Required to be able to read image and video files from shared storage. - <p>Protection level: dangerous --> - <permission-group android:name="android.permission-group.READ_MEDIA_VISUAL" - android:icon="@drawable/perm_group_read_media_visual" - android:label="@string/permgrouplab_readMediaVisual" - android:description="@string/permgroupdesc_readMediaVisual" - android:priority="1000" /> - - <!-- Allows an application to read audio files from external storage. - <p>This permission is enforced starting in API level - {@link android.os.Build.VERSION_CODES#TIRAMISU}. - For apps with a <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code - targetSdkVersion}</a> of {@link android.os.Build.VERSION_CODES#S} or lower, this permission - must not be used and the READ_EXTERNAL_STORAGE permission must be used instead. - <p>Protection level: dangerous --> - <permission android:name="android.permission.READ_MEDIA_VIDEO" - android:permissionGroup="android.permission-group.UNDEFINED" - android:label="@string/permlab_readMediaVideo" - android:description="@string/permdesc_readMediaVideo" - android:protectionLevel="dangerous" /> - - <!-- Allows an application to read image files from external storage. - <p>This permission is enforced starting in API level - {@link android.os.Build.VERSION_CODES#TIRAMISU}. - For apps with a <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code - targetSdkVersion}</a> of {@link android.os.Build.VERSION_CODES#S} or lower, this permission - must not be used and the READ_EXTERNAL_STORAGE permission must be used instead. - <p>Protection level: dangerous --> - <permission android:name="android.permission.READ_MEDIA_IMAGE" - android:permissionGroup="android.permission-group.UNDEFINED" - android:label="@string/permlab_readMediaImage" - android:description="@string/permdesc_readMediaImage" - android:protectionLevel="dangerous" /> - <!-- Allows an application to write to external storage. <p class="note"><strong>Note:</strong> If <em>both</em> your <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code diff --git a/core/res/res/drawable/perm_group_read_media_aural.xml b/core/res/res/drawable/perm_group_read_media_aural.xml deleted file mode 100644 index 6fc9c69254cc..000000000000 --- a/core/res/res/drawable/perm_group_read_media_aural.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - Copyright (C) 2015 The Android Open Source Project - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="24dp" - android:height="24dp" - android:viewportWidth="24" - android:viewportHeight="24" - android:tint="?attr/colorControlNormal"> - <path - android:fillColor="@android:color/white" - android:pathData="M10,21q-1.65,0 -2.825,-1.175Q6,18.65 6,17q0,-1.65 1.175,-2.825Q8.35,13 10,13q0.575,0 1.063,0.137 0.487,0.138 0.937,0.413V3h6v4h-4v10q0,1.65 -1.175,2.825Q11.65,21 10,21z"/> -</vector>
\ No newline at end of file diff --git a/core/res/res/drawable/perm_group_read_media_visual.xml b/core/res/res/drawable/perm_group_read_media_visual.xml deleted file mode 100644 index a5db2718c983..000000000000 --- a/core/res/res/drawable/perm_group_read_media_visual.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - Copyright (C) 2015 The Android Open Source Project - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="24dp" - android:height="24dp" - android:viewportWidth="24" - android:viewportHeight="24" - android:tint="?attr/colorControlNormal"> - <path - android:fillColor="@android:color/white" - android:pathData="M9,14h10l-3.45,-4.5 -2.3,3 -1.55,-2zM8,18q-0.825,0 -1.412,-0.587Q6,16.825 6,16L6,4q0,-0.825 0.588,-1.413Q7.175,2 8,2h12q0.825,0 1.413,0.587Q22,3.175 22,4v12q0,0.825 -0.587,1.413Q20.825,18 20,18zM8,16h12L20,4L8,4v12zM4,22q-0.825,0 -1.413,-0.587Q2,20.825 2,20L2,6h2v14h14v2zM8,4v12L8,4z"/> -</vector>
\ No newline at end of file diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml index 49a12d12ed21..610c6a69822c 100644 --- a/core/res/res/values/strings.xml +++ b/core/res/res/values/strings.xml @@ -880,16 +880,6 @@ <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. --> <string name="permgroupdesc_storage">access photos, media, and files on your device</string> - <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. [CHAR LIMIT=40]--> - <string name="permgrouplab_readMediaAural">Music & other audio</string> - <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. [CHAR LIMIT=NONE]--> - <string name="permgroupdesc_readMediaAural">access audio files on your device</string> - - <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. [CHAR LIMIT=40]--> - <string name="permgrouplab_readMediaVisual">Photos & videos</string> - <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. [CHAR LIMIT=NONE]--> - <string name="permgroupdesc_readMediaVisual">access images and video files on your device</string> - <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. --> <string name="permgrouplab_microphone">Microphone</string> <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. --> @@ -1903,21 +1893,6 @@ <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. "shared storage" refers to a storage space on the device that all apps with this permission can read from. [CHAR LIMIT=none] --> <string name="permdesc_sdcardRead">Allows the app to read the contents of your shared storage.</string> - <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. "shared storage" refers to a storage space on the device that all apps with this permission can read from. [CHAR LIMIT=none] --> - <string name="permlab_readMediaAudio">read audio files from shared storage</string> - <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. "shared storage" refers to a storage space on the device that all apps with this permission can read from. [CHAR LIMIT=none] --> - <string name="permdesc_readMediaAudio">Allows the app to read audio files from your shared storage.</string> - - <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. "shared storage" refers to a storage space on the device that all apps with this permission can read from. [CHAR LIMIT=none] --> - <string name="permlab_readMediaVideo">read video files from shared storage</string> - <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. "shared storage" refers to a storage space on the device that all apps with this permission can read from. [CHAR LIMIT=none] --> - <string name="permdesc_readMediaVideo">Allows the app to read video files from your shared storage.</string> - - <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. "shared storage" refers to a storage space on the device that all apps with this permission can read from. [CHAR LIMIT=none] --> - <string name="permlab_readMediaImage">read image files from shared storage</string> - <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. "shared storage" refers to a storage space on the device that all apps with this permission can read from. [CHAR LIMIT=none] --> - <string name="permdesc_readMediaImage">Allows the app to read image files from your shared storage.</string> - <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. "shared storage" refers to a storage space on the device that all apps with this permission can write to. [CHAR LIMIT=none] --> <string name="permlab_sdcardWrite">modify or delete the contents of your shared storage</string> <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. "shared storage" refers to a storage space on the device that all apps with this permission can write to. [CHAR LIMIT=none] --> diff --git a/data/etc/platform.xml b/data/etc/platform.xml index 88920c865511..92fca3661fbc 100644 --- a/data/etc/platform.xml +++ b/data/etc/platform.xml @@ -231,18 +231,6 @@ targetSdk="29"> <new-permission name="android.permission.ACCESS_MEDIA_LOCATION" /> </split-permission> - <split-permission name="android.permission.READ_EXTERNAL_STORAGE" - targetSdk="33"> - <new-permission name="android.permission.READ_MEDIA_AUDIO" /> - </split-permission> - <split-permission name="android.permission.READ_EXTERNAL_STORAGE" - targetSdk="33"> - <new-permission name="android.permission.READ_MEDIA_VIDEO" /> - </split-permission> - <split-permission name="android.permission.READ_EXTERNAL_STORAGE" - targetSdk="33"> - <new-permission name="android.permission.READ_MEDIA_IMAGE" /> - </split-permission> <split-permission name="android.permission.BLUETOOTH" targetSdk="31"> <new-permission name="android.permission.BLUETOOTH_SCAN" /> |