Simplify IMMS#startVrInputMethodNoCheck a bit
This is a follow up CL to a recent CL [1] that added VR-IME support. Currently, IMMS#startVrInputMethodNoCheck() internally calls IMMS#setInputMethodEnabled(), which enforces the caller user ID check and caller permission check for WRITE_SECURE_SETTINGS. This appears to make sense for IMMS#startVrInputMethodNoCheck(), but in reallity IMMS#startVrInputMethodNoCheck() always gets called on non-binder system server thread hence those checks will never fail. Note that such a call path is fine and not a security issue. What this CL tries to address is just replace IMMS#setInputMethodEnabledLocked() to make it clear that IMMS allows such an operation for callers that have RESTRICTED_VR_ACCESS is intentional. To summarize, this CL just removes redundant operations and there should be no visible behavior change. [1]: I1db7981b5198e7e203d4578cae7e5b6d20037d0d 89a6c48a Bug: 63037786 Test: compile Change-Id: Iec43177bd698de6efa453d64ceafec3164538151
Loading
Please register or sign in to comment