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
Loading
Please register or sign in to comment