diff options
author | Svet Ganov <svetoslavganov@google.com> | 2015-07-01 20:46:02 -0700 |
---|---|---|
committer | Svet Ganov <svetoslavganov@google.com> | 2015-07-01 20:46:06 -0700 |
commit | 200d494b93e8920c61f3795c6c8fc8aac99f99b9 (patch) | |
tree | 40d534eff8155e6e8d167ea635564b25feebf09b | |
parent | 2438c9b2e7892a8515209cb1d440c3b5147165b2 (diff) | |
download | frameworks_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.java | 10 |
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); |