Merge "Add new storage permission group" into mnc-dev
This commit is contained in:
@@ -176,6 +176,7 @@ package android {
|
|||||||
field public static final java.lang.String SENSORS = "android.permission-group.SENSORS";
|
field public static final java.lang.String SENSORS = "android.permission-group.SENSORS";
|
||||||
field public static final java.lang.String SMS = "android.permission-group.SMS";
|
field public static final java.lang.String SMS = "android.permission-group.SMS";
|
||||||
field public static final java.lang.String SOCIAL_INFO = "android.permission-group.SOCIAL_INFO";
|
field public static final java.lang.String SOCIAL_INFO = "android.permission-group.SOCIAL_INFO";
|
||||||
|
field public static final java.lang.String STORAGE = "android.permission-group.STORAGE";
|
||||||
field public static final java.lang.String USER_DICTIONARY = "android.permission-group.USER_DICTIONARY";
|
field public static final java.lang.String USER_DICTIONARY = "android.permission-group.USER_DICTIONARY";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -250,6 +250,7 @@ package android {
|
|||||||
field public static final java.lang.String SENSORS = "android.permission-group.SENSORS";
|
field public static final java.lang.String SENSORS = "android.permission-group.SENSORS";
|
||||||
field public static final java.lang.String SMS = "android.permission-group.SMS";
|
field public static final java.lang.String SMS = "android.permission-group.SMS";
|
||||||
field public static final java.lang.String SOCIAL_INFO = "android.permission-group.SOCIAL_INFO";
|
field public static final java.lang.String SOCIAL_INFO = "android.permission-group.SOCIAL_INFO";
|
||||||
|
field public static final java.lang.String STORAGE = "android.permission-group.STORAGE";
|
||||||
field public static final java.lang.String USER_DICTIONARY = "android.permission-group.USER_DICTIONARY";
|
field public static final java.lang.String USER_DICTIONARY = "android.permission-group.USER_DICTIONARY";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -453,6 +453,63 @@
|
|||||||
android:description="@string/permdesc_readCellBroadcasts"
|
android:description="@string/permdesc_readCellBroadcasts"
|
||||||
android:protectionLevel="dangerous" />
|
android:protectionLevel="dangerous" />
|
||||||
|
|
||||||
|
<!-- ====================================================================== -->
|
||||||
|
<!-- Permissions for accessing external storage -->
|
||||||
|
<!-- ====================================================================== -->
|
||||||
|
<eat-comment />
|
||||||
|
|
||||||
|
<!-- Used for runtime permissions related to the shared external storage. -->
|
||||||
|
<permission-group android:name="android.permission-group.STORAGE"
|
||||||
|
android:icon="@drawable/perm_group_storage"
|
||||||
|
android:label="@string/permgrouplab_storage"
|
||||||
|
android:description="@string/permgroupdesc_storage"
|
||||||
|
android:priority="900" />
|
||||||
|
|
||||||
|
<!-- Allows an application to read from external storage.
|
||||||
|
<p>Any app that declares the {@link #WRITE_EXTERNAL_STORAGE} permission is implicitly
|
||||||
|
granted this permission.</p>
|
||||||
|
<p>This permission is enforced starting in API level 19. Before API level 19, this
|
||||||
|
permission is not enforced and all apps still have access to read from external storage.
|
||||||
|
You can test your app with the permission enforced by enabling <em>Protect USB
|
||||||
|
storage</em> under Developer options in the Settings app on a device running Android 4.1 or
|
||||||
|
higher.</p>
|
||||||
|
<p>Also starting in API level 19, this permission is <em>not</em> required to
|
||||||
|
read/write files in your application-specific directories returned by
|
||||||
|
{@link android.content.Context#getExternalFilesDir} and
|
||||||
|
{@link android.content.Context#getExternalCacheDir}.
|
||||||
|
<p class="note"><strong>Note:</strong> If <em>both</em> your <a
|
||||||
|
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code
|
||||||
|
minSdkVersion}</a> and <a
|
||||||
|
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code
|
||||||
|
targetSdkVersion}</a> values are set to 3 or lower, the system implicitly
|
||||||
|
grants your app this permission. If you don't need this permission, be sure your <a
|
||||||
|
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code
|
||||||
|
targetSdkVersion}</a> is 4 or higher.-->
|
||||||
|
<permission android:name="android.permission.READ_EXTERNAL_STORAGE"
|
||||||
|
android:permissionGroup="android.permission-group.STORAGE"
|
||||||
|
android:label="@string/permlab_sdcardRead"
|
||||||
|
android:description="@string/permdesc_sdcardRead"
|
||||||
|
android:protectionLevel="normal" />
|
||||||
|
|
||||||
|
<!-- 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
|
||||||
|
minSdkVersion}</a> and <a
|
||||||
|
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code
|
||||||
|
targetSdkVersion}</a> values are set to 3 or lower, the system implicitly
|
||||||
|
grants your app this permission. If you don't need this permission, be sure your <a
|
||||||
|
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code
|
||||||
|
targetSdkVersion}</a> is 4 or higher.
|
||||||
|
<p>Starting in API level 19, this permission is <em>not</em> required to
|
||||||
|
read/write files in your application-specific directories returned by
|
||||||
|
{@link android.content.Context#getExternalFilesDir} and
|
||||||
|
{@link android.content.Context#getExternalCacheDir}. -->
|
||||||
|
<permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
|
||||||
|
android:permissionGroup="android.permission-group.STORAGE"
|
||||||
|
android:label="@string/permlab_sdcardWrite"
|
||||||
|
android:description="@string/permdesc_sdcardWrite"
|
||||||
|
android:protectionLevel="dangerous" />
|
||||||
|
|
||||||
<!-- =============================================================== -->
|
<!-- =============================================================== -->
|
||||||
<!-- Permissions for accessing social info -->
|
<!-- Permissions for accessing social info -->
|
||||||
<!-- =============================================================== -->
|
<!-- =============================================================== -->
|
||||||
@@ -1197,49 +1254,6 @@
|
|||||||
<!-- ================================== -->
|
<!-- ================================== -->
|
||||||
<eat-comment />
|
<eat-comment />
|
||||||
|
|
||||||
<!-- Allows an application to read from external storage.
|
|
||||||
<p>Any app that declares the {@link #WRITE_EXTERNAL_STORAGE} permission is implicitly
|
|
||||||
granted this permission.</p>
|
|
||||||
<p>This permission is enforced starting in API level 19. Before API level 19, this
|
|
||||||
permission is not enforced and all apps still have access to read from external storage.
|
|
||||||
You can test your app with the permission enforced by enabling <em>Protect USB
|
|
||||||
storage</em> under Developer options in the Settings app on a device running Android 4.1 or
|
|
||||||
higher.</p>
|
|
||||||
<p>Also starting in API level 19, this permission is <em>not</em> required to
|
|
||||||
read/write files in your application-specific directories returned by
|
|
||||||
{@link android.content.Context#getExternalFilesDir} and
|
|
||||||
{@link android.content.Context#getExternalCacheDir}.
|
|
||||||
<p class="note"><strong>Note:</strong> If <em>both</em> your <a
|
|
||||||
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code
|
|
||||||
minSdkVersion}</a> and <a
|
|
||||||
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code
|
|
||||||
targetSdkVersion}</a> values are set to 3 or lower, the system implicitly
|
|
||||||
grants your app this permission. If you don't need this permission, be sure your <a
|
|
||||||
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code
|
|
||||||
targetSdkVersion}</a> is 4 or higher.-->
|
|
||||||
<permission android:name="android.permission.READ_EXTERNAL_STORAGE"
|
|
||||||
android:label="@string/permlab_sdcardRead"
|
|
||||||
android:description="@string/permdesc_sdcardRead"
|
|
||||||
android:protectionLevel="normal" />
|
|
||||||
|
|
||||||
<!-- 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
|
|
||||||
minSdkVersion}</a> and <a
|
|
||||||
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code
|
|
||||||
targetSdkVersion}</a> values are set to 3 or lower, the system implicitly
|
|
||||||
grants your app this permission. If you don't need this permission, be sure your <a
|
|
||||||
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code
|
|
||||||
targetSdkVersion}</a> is 4 or higher.
|
|
||||||
<p>Starting in API level 19, this permission is <em>not</em> required to
|
|
||||||
read/write files in your application-specific directories returned by
|
|
||||||
{@link android.content.Context#getExternalFilesDir} and
|
|
||||||
{@link android.content.Context#getExternalCacheDir}. -->
|
|
||||||
<permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
|
|
||||||
android:label="@string/permlab_sdcardWrite"
|
|
||||||
android:description="@string/permdesc_sdcardWrite"
|
|
||||||
android:protectionLevel="normal" />
|
|
||||||
|
|
||||||
<!-- @SystemApi Allows an application to write to internal media storage
|
<!-- @SystemApi Allows an application to write to internal media storage
|
||||||
@hide -->
|
@hide -->
|
||||||
<permission android:name="android.permission.WRITE_MEDIA_STORAGE"
|
<permission android:name="android.permission.WRITE_MEDIA_STORAGE"
|
||||||
|
|||||||
24
core/res/res/drawable/perm_group_storage.xml
Normal file
24
core/res/res/drawable/perm_group_storage.xml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<!--
|
||||||
|
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="48dp"
|
||||||
|
android:height="48dp"
|
||||||
|
android:viewportWidth="48.0"
|
||||||
|
android:viewportHeight="48.0">
|
||||||
|
<path
|
||||||
|
android:pathData="M20,8H8c-2.2,0 -4,1.8 -4,4l0,24c0,2.2 1.8,4 4,4h32c2.2,0 4,-1.8 4,-4V16c0,-2.2 -1.8,-4 -4,-4H24L20,8z"
|
||||||
|
android:fillColor="#FFFFFF"/>
|
||||||
|
</vector>
|
||||||
@@ -568,6 +568,11 @@
|
|||||||
<!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
|
<!-- 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_sms">send and view SMS messages</string>
|
<string name="permgroupdesc_sms">send and view SMS messages</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_storage">Storage</string>
|
||||||
|
<!-- 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. -->
|
<!-- 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_dictionary">User Dictionary</string>
|
<string name="permgrouplab_dictionary">User Dictionary</string>
|
||||||
<!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
|
<!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
|
||||||
|
|||||||
Reference in New Issue
Block a user