summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Yu <jackyu@google.com>2015-07-08 23:45:50 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-07-08 23:46:36 +0000
commit6b7a07848b21001a41aea1b6426ec2f75ea652ec (patch)
treeea6535e002691a83540ab5b240e2ff14c0d189eb
parent705ba9606325df6575d171ee96811d215e69b4e8 (diff)
parented79bf5d74009f0589407c0289e3c7f41488a0f3 (diff)
downloadframeworks_base-6b7a07848b21001a41aea1b6426ec2f75ea652ec.zip
frameworks_base-6b7a07848b21001a41aea1b6426ec2f75ea652ec.tar.gz
frameworks_base-6b7a07848b21001a41aea1b6426ec2f75ea652ec.tar.bz2
Merge "Grant SMS permissions to Cell Broadcast receiver which emergency/non-emergency broadcast messages from the network." into mnc-dev
-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 ec883b9..8e3334f 100644
--- a/services/core/java/com/android/server/pm/DefaultPermissionGrantPolicy.java
+++ b/services/core/java/com/android/server/pm/DefaultPermissionGrantPolicy.java
@@ -33,6 +33,7 @@ import android.os.UserHandle;
import android.provider.CalendarContract;
import android.provider.ContactsContract;
import android.provider.MediaStore;
+import android.provider.Telephony.Sms.Intents;
import android.util.ArraySet;
import android.util.Log;
@@ -340,6 +341,15 @@ final class DefaultPermissionGrantPolicy {
}
}
+ // Cell Broadcast Receiver
+ Intent cbrIntent = new Intent(Intents.SMS_CB_RECEIVED_ACTION);
+ PackageParser.Package cbrPackage =
+ getDefaultSystemHandlerActivityPackageLPr(cbrIntent, userId);
+
+ if (cbrPackage != null && doesPackageSupportRuntimePermissions(cbrPackage)) {
+ grantRuntimePermissionsLPw(cbrPackage, SMS_PERMISSIONS, false, userId);
+ }
+
// Calendar
Intent calendarIntent = new Intent(Intent.ACTION_MAIN);
calendarIntent.addCategory(Intent.CATEGORY_APP_CALENDAR);