summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Miranda Kephart <mkephart@google.com> 2022-03-25 14:47:31 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2022-03-25 14:47:31 +0000
commit20b4989d0c7d3e8ae9cbe461699ed5aed6da1222 (patch)
tree8f7a749ae8fe7daf79c4c2448e687caf18301993
parent277ed260e49a6774830ff80812965e4525740a44 (diff)
parent78262f7082ccb80c7ebd462fb7ecdf4b66a1430f (diff)
Merge "Set package name explicitly when sending copy intent" into tm-dev
-rw-r--r--packages/SystemUI/src/com/android/systemui/clipboardoverlay/ClipboardOverlayController.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/clipboardoverlay/ClipboardOverlayController.java b/packages/SystemUI/src/com/android/systemui/clipboardoverlay/ClipboardOverlayController.java
index 1b52bb60f49c..804576adfd89 100644
--- a/packages/SystemUI/src/com/android/systemui/clipboardoverlay/ClipboardOverlayController.java
+++ b/packages/SystemUI/src/com/android/systemui/clipboardoverlay/ClipboardOverlayController.java
@@ -247,7 +247,10 @@ public class ClipboardOverlayController {
SELF_PERMISSION, null);
monitorOutsideTouches();
- mContext.sendBroadcast(new Intent(COPY_OVERLAY_ACTION), SELF_PERMISSION);
+ Intent copyIntent = new Intent(COPY_OVERLAY_ACTION);
+ // Set package name so the system knows it's safe
+ copyIntent.setPackage(mContext.getPackageName());
+ mContext.sendBroadcast(copyIntent, SELF_PERMISSION);
}
void setClipData(ClipData clipData, String clipSource) {