From 60b062f7b84cb08b653559cc3aa3a12d72951d99 Mon Sep 17 00:00:00 2001 From: Wilson Wu Date: Tue, 2 Nov 2021 14:12:20 +0800 Subject: [PATCH] [RESTRICT AUTOMERGE] Make MultiClient IMMS PendingIntent IMMUTABLE Unsafe PendingIntent could lead to security problem. Bug: 203777141 Test: Manual test by PoC in bug Test: presubmit Change-Id: I22adf0a5c9032852026cd23d10b9a2328cdf1426 --- .../inputmethod/MultiClientInputMethodManagerService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/inputmethod/MultiClientInputMethodManagerService.java b/services/core/java/com/android/server/inputmethod/MultiClientInputMethodManagerService.java index aa4fa7c6f4705..4a41cb6d81e25 100644 --- a/services/core/java/com/android/server/inputmethod/MultiClientInputMethodManagerService.java +++ b/services/core/java/com/android/server/inputmethod/MultiClientInputMethodManagerService.java @@ -917,7 +917,7 @@ public final class MultiClientInputMethodManagerService { .putExtra(Intent.EXTRA_CLIENT_INTENT, PendingIntent.getActivity( context, 0, new Intent(Settings.ACTION_INPUT_METHOD_SETTINGS), - PendingIntent.FLAG_MUTABLE)); + PendingIntent.FLAG_IMMUTABLE)); // Note: Instead of re-dispatching callback from the main thread to the worker thread // where OnWorkerThreadCallback is running, we pass the Handler object here so that