OSDN Git Service

Fix issue #27317952: PendingIntent.getIntent() should be protected
authorDianne Hackborn <hackbod@google.com>
Tue, 1 Mar 2016 02:02:43 +0000 (18:02 -0800)
committerDianne Hackborn <hackbod@google.com>
Tue, 1 Mar 2016 02:02:43 +0000 (18:02 -0800)
Change-Id: Ib05135cd94f5251942a6fc6df542ed39083f7827

core/res/AndroidManifest.xml
packages/SystemUI/AndroidManifest.xml
services/core/java/com/android/server/am/ActivityManagerService.java

index 03d93a1..588e738 100644 (file)
     <permission android:name="android.permission.GET_PACKAGE_IMPORTANCE"
         android:protectionLevel="signature|privileged" />
 
+    <!-- Allows use of PendingIntent.getIntent().
+         @hide -->
+    <permission android:name="android.permission.GET_INTENT_SENDER_INTENT"
+        android:protectionLevel="signature" />
+
     <!-- ================================== -->
     <!-- Permissions affecting the display of other applications  -->
     <!-- ================================== -->
index c590ec7..b5b7bcd 100644 (file)
@@ -82,6 +82,7 @@
     <uses-permission android:name="android.permission.GET_TOP_ACTIVITY_INFO" />
     <uses-permission android:name="android.permission.MANAGE_ACTIVITY_STACKS" />
     <uses-permission android:name="android.permission.START_TASKS_FROM_RECENTS" />
+    <uses-permission android:name="android.permission.GET_INTENT_SENDER_INTENT" />
 
     <!-- WindowManager -->
     <uses-permission android:name="android.permission.INTERNAL_SYSTEM_WINDOW" />
index cf7b537..c81ee2c 100644 (file)
@@ -6984,6 +6984,8 @@ public final class ActivityManagerService extends ActivityManagerNative
 
     @Override
     public Intent getIntentForIntentSender(IIntentSender pendingResult) {
+        enforceCallingPermission(Manifest.permission.GET_INTENT_SENDER_INTENT,
+                "getIntentForIntentSender()");
         if (!(pendingResult instanceof PendingIntentRecord)) {
             return null;
         }