Merge "Set package name explicitly when sending copy intent" into tm-dev

This commit is contained in:
Miranda Kephart
2022-03-25 14:47:31 +00:00
committed by Android (Google) Code Review

View File

@@ -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) {