Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5c99905f authored by Nikita Ioffe's avatar Nikita Ioffe
Browse files

Make init.userspace_reboot.is_supported a rw property

General recommendation is to avoid read-only properties, and instead control
"read-onlines" by only allowing init/vendor_init to set the property.

Since ro.init.userspace_reboot.is_supported was added in this release, and
nobody outside of the platform is querying it directly, it should be fine to
simply rename it.

Test: adb shell getprop init.userspace_reboot.is_supported
Test: atest CtsUserspaceRebootHostSideTestCases
Bug: 152803929
Change-Id: I31b9ac7f2c92ce82664a0266aea62faa2bdd365f
Merged-In: I31b9ac7f2c92ce82664a0266aea62faa2bdd365f
(cherry picked from commit 24e2259e)
parent 5be3a742
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ import android.app.PropertyInvalidatedCache;
import android.compat.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.service.dreams.Sandman;
import android.sysprop.InitProperties;
import android.util.ArrayMap;
import android.util.Log;
import android.util.proto.ProtoOutputStream;
@@ -1487,7 +1488,7 @@ public final class PowerManager {
     */
    // TODO(b/138605180): add link to documentation once it's ready.
    public boolean isRebootingUserspaceSupported() {
        return SystemProperties.getBoolean("ro.init.userspace_reboot.is_supported", false);
        return InitProperties.is_userspace_reboot_supported().orElse(false);
    }

    /**