diff options
| author | Nikita Ioffe <ioffe@google.com> | 2020-04-09 18:12:09 +0000 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2020-04-09 18:12:09 +0000 |
| commit | d8f9951f21bf9c0357bae640ebc9caa0273f92cd (patch) | |
| tree | bad35908c8a497e8212ecbd3bc045b7cde420ce6 /core/java | |
| parent | 45b77f9e8bfb4a39badbb41780c0c45ed6c42ee0 (diff) | |
| parent | cca499411fdaf3e88217e5bb790e868815aff3ab (diff) | |
Merge "Introduce static @hide PowerManager.isRebootingUserspaceSupportedImpl()"
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/os/PowerManager.java | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/core/java/android/os/PowerManager.java b/core/java/android/os/PowerManager.java index d3913b023a78..ad4fd1649987 100644 --- a/core/java/android/os/PowerManager.java +++ b/core/java/android/os/PowerManager.java @@ -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(); } /** |
