Files
frameworks_base/core/java/android/os
Nikita Ioffe 57300d9057 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
2020-04-09 14:07:22 +01:00
..
2020-03-20 15:13:37 -07:00
2020-01-17 11:27:41 -08:00
2020-01-27 13:19:46 +00:00
2020-01-07 08:18:02 -08:00
2020-02-12 17:35:15 +00:00