summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSvet Ganov <svetoslavganov@google.com>2015-07-01 20:46:02 -0700
committerSvet Ganov <svetoslavganov@google.com>2015-07-01 20:46:06 -0700
commit200d494b93e8920c61f3795c6c8fc8aac99f99b9 (patch)
tree40d534eff8155e6e8d167ea635564b25feebf09b
parent2438c9b2e7892a8515209cb1d440c3b5147165b2 (diff)
downloadframeworks_base-200d494b93e8920c61f3795c6c8fc8aac99f99b9.zip
frameworks_base-200d494b93e8920c61f3795c6c8fc8aac99f99b9.tar.gz
frameworks_base-200d494b93e8920c61f3795c6c8fc8aac99f99b9.tar.bz2
Grant the default gallery app storage permissions
bug:22127986 Change-Id: I1ecd49d57d410bf10734fea4e0c92e6e5028d648
-rw-r--r--services/core/java/com/android/server/pm/DefaultPermissionGrantPolicy.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/pm/DefaultPermissionGrantPolicy.java b/services/core/java/com/android/server/pm/DefaultPermissionGrantPolicy.java
index d71904e..4ec825a 100644
--- a/services/core/java/com/android/server/pm/DefaultPermissionGrantPolicy.java
+++ b/services/core/java/com/android/server/pm/DefaultPermissionGrantPolicy.java
@@ -406,6 +406,16 @@ final class DefaultPermissionGrantPolicy {
grantRuntimePermissionsLPw(mapsPackage, LOCATION_PERMISSIONS, userId);
}
+ // Gallery
+ Intent galleryIntent = new Intent(Intent.ACTION_MAIN);
+ galleryIntent.addCategory(Intent.CATEGORY_APP_GALLERY);
+ PackageParser.Package galleryPackage = getDefaultSystemHandlerActivityPackageLPr(
+ galleryIntent, userId);
+ if (galleryPackage != null
+ && doesPackageSupportRuntimePermissions(galleryPackage)) {
+ grantRuntimePermissionsLPw(galleryPackage, STORAGE_PERMISSIONS, userId);
+ }
+
// Email
Intent emailIntent = new Intent(Intent.ACTION_MAIN);
emailIntent.addCategory(Intent.CATEGORY_APP_EMAIL);