Skip to content
Commit 3cec57b9 authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

Use UserManagerInternal#hasUserRestriction() in IMMS

This is a simple clean-up to our previous CL [1], which made

  InputMethodManagerService#onShellCommand()

take DISALLOW_DEBUGGING_FEATURES into account for several commands.

With this CL,

  InputMethodManagerService#userHasDebugPriv()

starts using

  UserManagerInternal#hasUserRestriction()

rather than

  UserManager#hasUserRestriction()

for consistency and thinner abstraction.

There should be no observable behavior change in this CL.

 [1]: I7714294a1bf7d0322c34e1d3bfba7f2e7fc8766e
      87e2e514

Bug: 234882948
Test: Manually tested as follows.
 1. adb shell pm create-user test
    -> Success: created user id 10
 2. adb root
 3. adb shell pm set-user-restriction --user 10 no_debugging_features 1
 4. adb shell am switch-user 10
 5. adb shell cmd input_method ime reset
    -> User #10 is restricted with DISALLOW_DEBUGGING_FEATURES.
Change-Id: I10cfc44465db110a89e7166ab7a60510e72533ea
parent fc48388a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment