From 5d9f5b6faa7943e08003e3f6cbf8d06232f948f6 Mon Sep 17 00:00:00 2001 From: Ashwini Oruganti Date: Wed, 14 Oct 2020 14:54:31 -0700 Subject: [PATCH] Add a mutability flag to the PendingIntent in SearchView.java It is now required to specify an explicit mutability flag when creating PendingIntents. This change adds an explicit FLAG_MUTABLE to a PendingIntent in SearchView.java. Since the previous default behavior was mutable, and the flag I have added is FLAG_MUTABLE, this change should be a no-op functionally. Bug: 170770665 Test: TH Change-Id: Ib6d4f95f64430d8b187560614b97bac961a129c5 --- core/java/android/widget/SearchView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/java/android/widget/SearchView.java b/core/java/android/widget/SearchView.java index 2eadb56c0f36f..b8a324931f86e 100755 --- a/core/java/android/widget/SearchView.java +++ b/core/java/android/widget/SearchView.java @@ -1695,7 +1695,7 @@ public class SearchView extends LinearLayout implements CollapsibleActionView { Intent queryIntent = new Intent(Intent.ACTION_SEARCH); queryIntent.setComponent(searchActivity); PendingIntent pending = PendingIntent.getActivity(getContext(), 0, queryIntent, - PendingIntent.FLAG_ONE_SHOT); + PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_MUTABLE); // Now set up the bundle that will be inserted into the pending intent // when it's time to do the search. We always build it here (even if empty)