summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@android.com>2010-10-29 11:53:39 -0400
committerMike Lockwood <lockwood@android.com>2010-10-29 19:16:45 -0400
commit3f425a6be47b706349f17679ed2b6877179df1cc (patch)
treebb2bf12795fe2eb17917226b67a4891c11f90f9f
parent84aaec86f5f0cc24a9bdd936597601eadf2247dd (diff)
downloadframeworks_base-3f425a6be47b706349f17679ed2b6877179df1cc.zip
frameworks_base-3f425a6be47b706349f17679ed2b6877179df1cc.tar.gz
frameworks_base-3f425a6be47b706349f17679ed2b6877179df1cc.tar.bz2
Add new WRITE_MEDIA_STORAGE permission to control write access to /data/media
BUG: 3113970 Change-Id: Idb56be76729dc560dee5f680225cf4050f2751d2 Signed-off-by: Mike Lockwood <lockwood@android.com>
-rw-r--r--api/current.xml11
-rw-r--r--core/res/AndroidManifest.xml7
-rwxr-xr-xcore/res/res/values/strings.xml5
-rw-r--r--data/etc/platform.xml4
4 files changed, 27 insertions, 0 deletions
diff --git a/api/current.xml b/api/current.xml
index 5d5f8ac..7360913 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -1255,6 +1255,17 @@
visibility="public"
>
</field>
+<field name="WRITE_MEDIA_STORAGE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.WRITE_MEDIA_STORAGE&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
<field name="WRITE_SECURE_SETTINGS"
type="java.lang.String"
transient="false"
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 2444fce..3635fab 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -532,6 +532,13 @@
android:description="@string/permdesc_sdcardWrite"
android:protectionLevel="dangerous" />
+ <!-- Allows an application to write to internal media storage -->
+ <permission android:name="android.permission.WRITE_MEDIA_STORAGE"
+ android:permissionGroup="android.permission-group.STORAGE"
+ android:label="@string/permlab_mediaStorageWrite"
+ android:description="@string/permdesc_mediaStorageWrite"
+ android:protectionLevel="signatureOrSystem" />
+
<!-- ============================================ -->
<!-- Permissions for low-level system interaction -->
<!-- ============================================ -->
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 8a5af7d..b427a0e 100755
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -1231,6 +1231,11 @@
<string name="permdesc_sdcardWrite" product="default">Allows an application to write to the SD card.</string>
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permlab_mediaStorageWrite" product="default">modify/delete internal media storage contents</string>
+ <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permdesc_mediaStorageWrite" product="default">Allows an application to modify the contents of the internal media storage.</string>
+
+ <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
<string name="permlab_cache_filesystem">access the cache filesystem</string>
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
<string name="permdesc_cache_filesystem">Allows an application to read and write the cache filesystem.</string>
diff --git a/data/etc/platform.xml b/data/etc/platform.xml
index 439fc90..f458576 100644
--- a/data/etc/platform.xml
+++ b/data/etc/platform.xml
@@ -58,6 +58,10 @@
<group gid="sdcard_rw" />
</permission>
+ <permission name="android.permission.WRITE_MEDIA_STORAGE" >
+ <group gid="media_rw" />
+ </permission>
+
<permission name="android.permission.ACCESS_USB" >
<group gid="usb" />
</permission>