Merge "Introduce static @hide PowerManager.isRebootingUserspaceSupportedImpl()" am: d8f9951f21 am: a3fd43040b

Change-Id: I4d8a505fb215e45a318e8222f924aa29a6ab5dea
This commit is contained in:
Nikita Ioffe
2020-04-09 18:52:24 +00:00
committed by Automerger Merge Worker
3 changed files with 24 additions and 2 deletions

View File

@@ -1332,12 +1332,25 @@ public final class PowerManager {
}
}
/**
* Returns {@code true} if this device supports rebooting userspace.
*
* <p>This method exists solely for the sake of re-using same logic between {@code PowerManager}
* and {@code PowerManagerService}.
*
* @hide
*/
public static boolean isRebootingUserspaceSupportedImpl() {
return InitProperties.is_userspace_reboot_supported().orElse(false);
}
/**
* Returns {@code true} if this device supports rebooting userspace.
*/
// TODO(b/138605180): add link to documentation once it's ready.
public boolean isRebootingUserspaceSupported() {
return InitProperties.is_userspace_reboot_supported().orElse(false);
return isRebootingUserspaceSupportedImpl();
}
/**