From b1b76c34f5cb5c6f912a20361551f4be49707c95 Mon Sep 17 00:00:00 2001 From: Ryan Savitski Date: Thu, 10 Jun 2021 15:30:14 +0100 Subject: [PATCH] Revert "Revert "Set FLAG_IMMUTABLE flag on FirstScreenBroadcast PendingIntent. This reverts commit 1aa95b84006a8eeeac54e25e1444a5ea66fc5b02. Reason for revert: automerger got confused by the revert of a merge, and skipped it downstream. NB: resending this as a standalone patch, NOT generated via Gerrit's "revert" functionality, to avoid confusing AM further (I'm told there are hidden tags involved). IGNORE_MERGE_CONFLICT_CHECK=="trying to fix the build, see the rest of the topic" Since the revert was skipped downstream, using a merged-in tag to also stop this change from propagating. Bug: 183927137 Merged-In: I8d8e38a1aa6bdf13879d460cfa84cabe6c6bb1f2 Change-Id: I541eeb1cc1b589dc0134a5e2e4c16be9f658fbbb --- .../launcher3/model/FirstScreenBroadcast.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/com/android/launcher3/model/FirstScreenBroadcast.java b/src/com/android/launcher3/model/FirstScreenBroadcast.java index 5112304fb8..18ce0358bb 100644 --- a/src/com/android/launcher3/model/FirstScreenBroadcast.java +++ b/src/com/android/launcher3/model/FirstScreenBroadcast.java @@ -15,7 +15,18 @@ */ package com.android.launcher3.model; +<<<<<<< TARGET BRANCH (878601 Block recent work profile apps content capture) import static android.os.Process.myUserHandle; +======= +import static android.app.PendingIntent.FLAG_IMMUTABLE; +import static android.app.PendingIntent.FLAG_ONE_SHOT; +import static android.os.Process.myUserHandle; + +import static com.android.launcher3.pm.InstallSessionHelper.getUserHandle; + +import static java.util.stream.Collectors.groupingBy; +import static java.util.stream.Collectors.mapping; +>>>>>>> SOURCE BRANCH (578578 Set FLAG_IMMUTABLE flag on FirstScreenBroadcast PendingInten) import android.app.PendingIntent; import android.content.Context; @@ -145,7 +156,7 @@ public class FirstScreenBroadcast { .putStringArrayListExtra(HOTSEAT_ITEM_EXTRA, new ArrayList<>(hotseatItems)) .putStringArrayListExtra(WIDGET_ITEM_EXTRA, new ArrayList<>(widgetItems)) .putExtra(VERIFICATION_TOKEN_EXTRA, PendingIntent.getActivity(context, 0, - new Intent(), PendingIntent.FLAG_ONE_SHOT))); + new Intent(), FLAG_ONE_SHOT | FLAG_IMMUTABLE))); } private static String getPackageName(ItemInfo info) {