diff options
author | Yohei Yukawa <yukawa@google.com> | 2018-12-27 08:40:41 -0800 |
---|---|---|
committer | Yohei Yukawa <yukawa@google.com> | 2018-12-27 08:40:41 -0800 |
commit | db25df71be4c1bcc654f69ce9a8bff7e3ef46360 (patch) | |
tree | 3ab00d48b0c15e4d438a0c52dca14bfdb3cb0fc9 /libs/hwui/WebViewFunctorManager.cpp | |
parent | de5748e47d5202927cfcec4c3437a2829e5e7524 (diff) |
Simplify permission checks in IMMS#onShellCommand
With this CL, all commands implemented in InputMethodManagerService
always WRITE_SECURE_SETTINGS and INTERACT_ACROSS_USERS_FULL
permissions no matter what command is requested. This should not be a
big deal because we have already restricted the possible caller of
IInputMethodManager#shellCommand() to shell user [1], which is
expected to have this kind of permissions.
The biggest motivation to do so is simplifying shell command handlers.
By eagerly calling Binder.clearCallingIdentity() when start handling
shell commands, we just focus on what each shell command handler need
to check in terms of security and any other restriction such as
UserManager.DISALLOW_DEBUGGING_FEATURES.
In short, there should be no observable behavior differences. What
this CL does are just removing redundant permission checks and
redundant Binder.clearCallingIdentity().
[1]: If87189563ccaacd4f9c666bab4f9ad08a9343084
b8d240fa3f96b7b4ea35dd271beda789044d63ab
Bug: 34886274
Test: 'adb shell ime' commands still work
Change-Id: I6fd47b5cc1e7da7222774df20247a2c69a70f45b
Diffstat (limited to 'libs/hwui/WebViewFunctorManager.cpp')
0 files changed, 0 insertions, 0 deletions