diff options
author | Nikita Ioffe <ioffe@google.com> | 2020-04-09 00:47:33 +0100 |
---|---|---|
committer | Nikita Ioffe <ioffe@google.com> | 2020-04-09 17:56:25 +0100 |
commit | cca499411fdaf3e88217e5bb790e868815aff3ab (patch) | |
tree | bad35908c8a497e8212ecbd3bc045b7cde420ce6 /tools/aapt2/java/JavaClassGenerator_test.cpp | |
parent | 45b77f9e8bfb4a39badbb41780c0c45ed6c42ee0 (diff) |
Introduce static @hide PowerManager.isRebootingUserspaceSupportedImpl()
This method consolidates logic of testing whenever rebooting userspace
is supported in a place that can be used both from
PowerMager.isRebootingUserspaceSupported() API and from
PowerManagerService.reboot() implementation.
Consequently, this makes `adb shell svc power reboot userspace` also
benefit from that check, and fail userspace reboot on devices that don't
support it.
Also tweaked logic of ignoring RemoteException to take into account
userspace reboot.
Test: adb root
Test: adb shell setprop init.userspace_reboot.is_supported 0
Test: adb shell svc power reboot userspace & verified error message
Test: adb shell setprop init.userspace_reboot.is_supported 1
Test: adb shell svc power reboot userspace & verified no error message
Test: atest PowerManagerTest
Test: atest CtsUserspaceRebootHostSideTestCases
Bug: 152803929
Change-Id: I2d3a8e0ae1320c408a838c5c5fdf4cd977b167b3
Merged-In: I2d3a8e0ae1320c408a838c5c5fdf4cd977b167b3
(cherry picked from commit 57300d9057fae45decaa7dcfc7dad0b31d710a92)
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions