Remove IInputMethodManager.{add,remove}Client() from greylist
Apps can never directly IInputMethodManager.{add,remove}Client() in a meaningful way, because 1. These Binder methods are implemented in InputMethodManagerService (IMMS) but unnecessarily exposed to application processes. The only valid caller of these methods is WindowManagerService. Actually with my recent change [1], any incoming call of these methods from the application processes will always be rejected. 2. The purpose of these callbacks is maintaining a per-process callback (IInputMethodClient) from each application process to IMMS. Since WindowManagerService is responsible for dealing with this step, there is no reason for app developers to call these accidentally exposed hidden Binder methods. If there was an application that was trying to call these methods via reflection, it must be trying to bypass caller verification of some other IME APIs by registering a fake IInputMethodClient callback. 3. However, even if an application succeeded to register a fake IInputMethodClient to IMMS, IMMS still has additional verification IWindowManager.inputMethodClientHasFocus(IInputMethodClient), which cannot be spoofed with such a fake connection. Therefore having these entries hiddenapi-light-greylist.txt must be either a mistake or no-op. [1]: Ib9b588d11bd4017e431e3d494863987dd67384fc 6efd55e7 Bug: 112670859 Bug: 112722706 Test: compile Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases Change-Id: I62aa27ceb97446059ce80b00a3369c81b1c70e23
Loading
Please register or sign in to comment