From f033a75cf50f48e0a9f0c0c083f27bb55ca305b6 Mon Sep 17 00:00:00 2001 From: Yohei Yukawa Date: Wed, 27 Jul 2022 07:52:28 +0900 Subject: [PATCH] Add @RequiresNoPermission to IInputMethodManager#startProtoDump() This is a follow up CL to our previous CL [1], which introduced IInputMethodManager#startProtoDump() so that IME client process can upload its own IME tracing dump data to InputMethodManagerService. One may notice that there is no permission / caller verification in InputMethodManagerService#startProtoDump(), but the absence of a permission check there is by design. We need unprivileged app processes to be able to send that tracing data. To make it clear in the AIDL file, this CL adds @RequiresNoPermission to that IPC method. The annotation is basically for errorprone check [2]. There should be no observable behavior change at the run time. [1]: Ia89f11d5ef8a220ea7746191b18769cea5a8359d cf9e5123ce04dfe1d03b942a6a5632ca1b9b27fd [2]: I26a872f07ab13931c241cbb02ff7228edf7dc3b9 71463a4cb133c1344ab0921561e11b7d5565e617 Bug: 204904070 Bug: 237316307 Test: presubmit Change-Id: Ia41be32333a668cbf112ba7394bcca8c8ba7db6a --- core/java/com/android/internal/view/IInputMethodManager.aidl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/java/com/android/internal/view/IInputMethodManager.aidl b/core/java/com/android/internal/view/IInputMethodManager.aidl index 1f36c9c7a6ef9..cbfa0e2450033 100644 --- a/core/java/com/android/internal/view/IInputMethodManager.aidl +++ b/core/java/com/android/internal/view/IInputMethodManager.aidl @@ -105,7 +105,10 @@ interface IInputMethodManager { /** Remove the IME surface. Requires passing the currently focused window. */ oneway void removeImeSurfaceFromWindowAsync(in IBinder windowToken); + + @JavaPassthrough(annotation="@android.annotation.RequiresNoPermission") void startProtoDump(in byte[] protoDump, int source, String where); + boolean isImeTraceEnabled(); // Starts an ime trace.