summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Sally Yuen <sallyyuen@google.com> 2020-05-12 21:41:32 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2020-05-12 21:41:32 +0000
commitb0d967095377ed4b774efebf3de199a1037c9317 (patch)
treefe3389537410f6107a22d01c679536fc2758e54a
parent86c055ab23866ea9e2bceb459c61a71006be1fe0 (diff)
parent0bd85cfe221ab5fc8184b71b5af3c0f19f076d94 (diff)
Merge "Add SELF permission to SystemActions receiver" into rvc-dev
-rw-r--r--packages/SystemUI/src/com/android/systemui/accessibility/SystemActions.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/accessibility/SystemActions.java b/packages/SystemUI/src/com/android/systemui/accessibility/SystemActions.java
index b7275634c6a6..0135e4cddc56 100644
--- a/packages/SystemUI/src/com/android/systemui/accessibility/SystemActions.java
+++ b/packages/SystemUI/src/com/android/systemui/accessibility/SystemActions.java
@@ -128,6 +128,8 @@ public class SystemActions extends SystemUI {
public static final int SYSTEM_ACTION_ID_ACCESSIBILITY_SHORTCUT =
AccessibilityService.GLOBAL_ACTION_ACCESSIBILITY_SHORTCUT; // 13
+ private static final String PERMISSION_SELF = "com.android.systemui.permission.SELF";
+
private Recents mRecents;
private StatusBar mStatusBar;
private SystemActionsBroadcastReceiver mReceiver;
@@ -147,7 +149,11 @@ public class SystemActions extends SystemUI {
@Override
public void start() {
- mContext.registerReceiverForAllUsers(mReceiver, mReceiver.createIntentFilter(), null, null);
+ mContext.registerReceiverForAllUsers(
+ mReceiver,
+ mReceiver.createIntentFilter(),
+ PERMISSION_SELF,
+ null);
registerActions();
}
@@ -397,6 +403,7 @@ public class SystemActions extends SystemUI {
case INTENT_ACTION_ACCESSIBILITY_BUTTON_CHOOSER:
case INTENT_ACTION_ACCESSIBILITY_SHORTCUT: {
Intent intent = new Intent(intentAction);
+ intent.setPackage(context.getPackageName());
return PendingIntent.getBroadcast(context, 0, intent, 0);
}
default: