diff options
author | Darryl L Johnson <darryljohnson@google.com> | 2020-09-22 16:21:59 -0700 |
---|---|---|
committer | Darryl L Johnson <darryljohnson@google.com> | 2020-10-14 15:47:09 -0700 |
commit | fa539d136efbf172124fca21a6a42bf9fef5b24d (patch) | |
tree | 268f9b445474c5d8f8887de8ff06d68344b38199 /rs/java/android/renderscript/ProgramStore.java | |
parent | f7d857c0b6cfd1057f32ed0766f91e10d47da99b (diff) |
Add DeviceStateManagerService shell commands to get and override state.
This also introduces the CONTROL_DEVICE_STATE permission to protect
against setting the device state. The permission is granted to the shell
to allow overriding via ADB.
Two ADB commands are introduced with this change:
-> adb shell cmd device_state print-states
will print the list of states supported by the device
Ex:
$ adb shell cmd device_state print-states
[ 0, 1, 2 ]
-> adb shell cmd device_state state [reset|OVERRIDE_DEVICE_STATE]
will print the current device state or override the current device
state with the supplied override state.
Ex:
$ adb shell cmd device_state 0
Ex:
$ adb shell cmd device_state state
Device state: 0
----------------------
Base state: 2
Override state: 0
Bug: 159401801
Test: atest DeviceStateManagerServiceTest
Test: adb shell cmd device_state print-states
Test: adb shell cmd device_state state
Change-Id: I8a74f1f2bf8189523bdae861fb38f86988c21b2a
Diffstat (limited to 'rs/java/android/renderscript/ProgramStore.java')
0 files changed, 0 insertions, 0 deletions