From d878f5327793310d5fda083f800644bc96d6a6e8 Mon Sep 17 00:00:00 2001 From: Junda Liu Date: Thu, 13 Aug 2015 14:25:49 -0700 Subject: Grant SMS carrier provisioning app the permission to receive SMS. Bug: b/22982966 Change-Id: I4af525532e2f97973ba255bf8dbb002e42997eea --- .../java/com/android/server/pm/DefaultPermissionGrantPolicy.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'services') diff --git a/services/core/java/com/android/server/pm/DefaultPermissionGrantPolicy.java b/services/core/java/com/android/server/pm/DefaultPermissionGrantPolicy.java index 71a2d59..1fb3c58 100644 --- a/services/core/java/com/android/server/pm/DefaultPermissionGrantPolicy.java +++ b/services/core/java/com/android/server/pm/DefaultPermissionGrantPolicy.java @@ -363,6 +363,14 @@ final class DefaultPermissionGrantPolicy { grantRuntimePermissionsLPw(cbrPackage, SMS_PERMISSIONS, false, userId); } + // Carrier Provisioning Service + Intent carrierProvIntent = new Intent(Intents.SMS_CARRIER_PROVISION_ACTION); + PackageParser.Package carrierProvPackage = + getDefaultSystemHandlerServicePackageLPr(carrierProvIntent, userId); + if (carrierProvPackage != null && doesPackageSupportRuntimePermissions(carrierProvPackage)) { + grantRuntimePermissionsLPw(carrierProvPackage, SMS_PERMISSIONS, false, userId); + } + // Calendar Intent calendarIntent = new Intent(Intent.ACTION_MAIN); calendarIntent.addCategory(Intent.CATEGORY_APP_CALENDAR); -- cgit v1.1