Skip to content
Commit 717dbbf1 authored by Nikita Ioffe's avatar Nikita Ioffe
Browse files

Add an API to tell whenever device supports userspace reboot

If device doesn't support userspace reboot then call to
PowerManager.reboot("userspace") will throw an
UnsupportedOperationException.

For the case of upgrading devices, Treble enforces that previous vendor
image should work with the new system image. Since userspace reboot
requires services to be stopped and restarted cleanly, which upgrading
devices might not be able to comply with, we need to have an API to
distinguish between devices that support userspace reboot and the ones
that do not.

Test: atest PowerManagerTest
Test: atest CtsUserspaceRebootHostSideTestCases
Bug: 138605273
Bug: 135984674
Change-Id: I8303f43ab29499eb2995f0256854c787055d9560
parent f5b6267d
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