Respect DISALLOW_DEBUGGING_FEATURES in IME shell commands
DISALLOW_DEBUGGING_FEATURES should restrict user's ability to call:
adb shell ime reset / set / enable / disable.
Fixes: 122922209
Test: Manually tested as follows:
1. create a new user:
adb shell pm create-user test
output: Success: created user id 11
2. Enable restriction:
adb shell pm set-user-restriction --user 11 no_debugging_features 1
3. Check default user has access with:
adb shell ime reset
4. Switch user to 11.
adb shell am switch-user 11
5. Try IME adb command for user 11
adb shell ime reset
output: User #11 is restricted with DISALLOW_DEBUGGING_FEATURES.
6. Repeat for set, enable, disable.
Change-Id: I7714294a1bf7d0322c34e1d3bfba7f2e7fc8766e
1 file changed