summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorMakoto Onuki <omakoto@google.com>2015-07-16 11:38:00 -0700
committerMakoto Onuki <omakoto@google.com>2015-07-16 11:38:00 -0700
commitbc92479a297904856f0815bc14bcb6763bbbf8bf (patch)
tree8e67023164ae624875dcf6b2d483078e5da7c0b8 /services
parent532737df65330200dc55ae42d31140d19c4024be (diff)
downloadframeworks_base-bc92479a297904856f0815bc14bcb6763bbbf8bf.zip
frameworks_base-bc92479a297904856f0815bc14bcb6763bbbf8bf.tar.gz
frameworks_base-bc92479a297904856f0815bc14bcb6763bbbf8bf.tar.bz2
DefaultPermission: GET_ACCOUNTS is now in CONTACTS
Bug 22532312 Change-Id: If7ad0faa3a196bb28da1ddc13788c0430df1d1ee
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/pm/DefaultPermissionGrantPolicy.java12
1 files changed, 2 insertions, 10 deletions
diff --git a/services/core/java/com/android/server/pm/DefaultPermissionGrantPolicy.java b/services/core/java/com/android/server/pm/DefaultPermissionGrantPolicy.java
index 7fde68f..b76db41 100644
--- a/services/core/java/com/android/server/pm/DefaultPermissionGrantPolicy.java
+++ b/services/core/java/com/android/server/pm/DefaultPermissionGrantPolicy.java
@@ -72,6 +72,7 @@ final class DefaultPermissionGrantPolicy {
static {
CONTACTS_PERMISSIONS.add(Manifest.permission.READ_CONTACTS);
CONTACTS_PERMISSIONS.add(Manifest.permission.WRITE_CONTACTS);
+ CONTACTS_PERMISSIONS.add(Manifest.permission.GET_ACCOUNTS);
}
private static final Set<String> LOCATION_PERMISSIONS = new ArraySet<>();
@@ -117,11 +118,6 @@ final class DefaultPermissionGrantPolicy {
STORAGE_PERMISSIONS.add(Manifest.permission.WRITE_EXTERNAL_STORAGE);
}
- private static final Set<String> ACCOUNTS_PERMISSIONS = new ArraySet<>();
- static {
- ACCOUNTS_PERMISSIONS.add(Manifest.permission.GET_ACCOUNTS);
- }
-
private final PackageManagerService mService;
private PackagesProvider mImePackagesProvider;
@@ -352,7 +348,6 @@ final class DefaultPermissionGrantPolicy {
&& doesPackageSupportRuntimePermissions(calendarPackage)) {
grantRuntimePermissionsLPw(calendarPackage, CALENDAR_PERMISSIONS, userId);
grantRuntimePermissionsLPw(calendarPackage, CONTACTS_PERMISSIONS, userId);
- grantRuntimePermissionsLPw(calendarPackage, ACCOUNTS_PERMISSIONS, userId);
}
// Calendar provider
@@ -362,7 +357,6 @@ final class DefaultPermissionGrantPolicy {
grantRuntimePermissionsLPw(calendarProviderPackage, CONTACTS_PERMISSIONS, userId);
grantRuntimePermissionsLPw(calendarProviderPackage, CALENDAR_PERMISSIONS,
true, userId);
- grantRuntimePermissionsLPw(calendarProviderPackage, ACCOUNTS_PERMISSIONS, userId);
grantRuntimePermissionsLPw(calendarProviderPackage, STORAGE_PERMISSIONS, userId);
}
@@ -386,7 +380,6 @@ final class DefaultPermissionGrantPolicy {
&& doesPackageSupportRuntimePermissions(contactsPackage)) {
grantRuntimePermissionsLPw(contactsPackage, CONTACTS_PERMISSIONS, userId);
grantRuntimePermissionsLPw(contactsPackage, PHONE_PERMISSIONS, userId);
- grantRuntimePermissionsLPw(contactsPackage, ACCOUNTS_PERMISSIONS, userId);
}
// Contacts provider sync adapters
@@ -408,7 +401,6 @@ final class DefaultPermissionGrantPolicy {
true, userId);
grantRuntimePermissionsLPw(contactsProviderPackage, PHONE_PERMISSIONS,
true, userId);
- grantRuntimePermissionsLPw(contactsProviderPackage, ACCOUNTS_PERMISSIONS, userId);
grantRuntimePermissionsLPw(contactsProviderPackage, STORAGE_PERMISSIONS, userId);
}
@@ -419,7 +411,7 @@ final class DefaultPermissionGrantPolicy {
getDefaultSystemHandlerActivityPackageLPr(deviceProvisionIntent, userId);
if (deviceProvisionPackage != null
&& doesPackageSupportRuntimePermissions(deviceProvisionPackage)) {
- grantRuntimePermissionsLPw(deviceProvisionPackage, ACCOUNTS_PERMISSIONS, userId);
+ grantRuntimePermissionsLPw(deviceProvisionPackage, CONTACTS_PERMISSIONS, userId);
}
// Maps