From 6ae552650c735de6d578ec34ca3f1dcd5f842e0c Mon Sep 17 00:00:00 2001 From: Chris Ye Date: Tue, 21 Apr 2020 16:03:36 -0700 Subject: [PATCH] Set pending intent for physical keyboard connection as immutable. In InputManagerService, set the pending intent of physical keyboard layout notification to be immutable. Bug: 153878642 Change-Id: I8fb745f7e31dbe3e18ca8547bf75837ecf5176cd --- .../core/java/com/android/server/input/InputManagerService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/input/InputManagerService.java b/services/core/java/com/android/server/input/InputManagerService.java index e6129b9b1f32f..115899a2a518a 100644 --- a/services/core/java/com/android/server/input/InputManagerService.java +++ b/services/core/java/com/android/server/input/InputManagerService.java @@ -1069,7 +1069,7 @@ public class InputManagerService extends IInputManager.Stub | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED | Intent.FLAG_ACTIVITY_CLEAR_TOP); final PendingIntent keyboardLayoutIntent = PendingIntent.getActivityAsUser(mContext, 0, - intent, 0, null, UserHandle.CURRENT); + intent, PendingIntent.FLAG_IMMUTABLE, null, UserHandle.CURRENT); Resources r = mContext.getResources(); Notification notification =