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

Commit 55fe0d06 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Wire up reserved blocks presence for tests.

This is how we tell CTS if the device has reserved blocks set aside
for system critical services.

Test: builds, boots
Bug: 62024591
Change-Id: Ib970554235b49346f9e9df7d3d1646beb168cd92
parent edfc6f98
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -114,6 +114,8 @@ public class StorageManager {
    /** {@hide} */
    public static final String PROP_HAS_ADOPTABLE = "vold.has_adoptable";
    /** {@hide} */
    public static final String PROP_HAS_RESERVED = "vold.has_reserved";
    /** {@hide} */
    public static final String PROP_FORCE_ADOPTABLE = "persist.fw.force_adoptable";
    /** {@hide} */
    public static final String PROP_EMULATE_FBE = "persist.sys.emulate_fbe";
+5 −2
Original line number Diff line number Diff line
@@ -168,9 +168,12 @@ public class StorageStatsService extends IStorageStatsManager.Stub {
    public boolean isReservedSupported(String volumeUuid, String callingPackage) {
        enforcePermission(Binder.getCallingUid(), callingPackage);

        // TODO: implement as part of b/62024591
        if (volumeUuid == StorageManager.UUID_PRIVATE_INTERNAL) {
            return SystemProperties.getBoolean(StorageManager.PROP_HAS_RESERVED, false);
        } else {
            return false;
        }
    }

    @Override
    public long getTotalBytes(String volumeUuid, String callingPackage) {