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

Commit 74acbbb2 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Blend in force adoptable flag when set.

Bug: 19993667
Change-Id: Ic7f348d171a89e889281b7efb1aa0cbade048975
parent eba260d6
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -68,6 +68,9 @@ public class DiskInfo implements Parcelable {
        if (TextUtils.isEmpty(label)) {
            return false;
        }
        if (label.equalsIgnoreCase("ata")) {
            return false;
        }
        if (label.toLowerCase().contains("generic")) {
            return false;
        }
+2 −0
Original line number Diff line number Diff line
@@ -69,6 +69,8 @@ public class StorageManager {

    /** {@hide} */
    public static final String PROP_PRIMARY_PHYSICAL = "ro.vold.primary_physical";
    /** {@hide} */
    public static final String PROP_FORCE_ADOPTABLE = "persist.fw.force_adoptable";

    /** {@hide} */
    public static final int FLAG_ALL_METADATA = 1 << 0;
+4 −1
Original line number Diff line number Diff line
@@ -823,7 +823,10 @@ class MountService extends IMountService.Stub
            case VoldResponseCode.DISK_CREATED: {
                if (cooked.length != 3) break;
                final String id = cooked[1];
                final int flags = Integer.parseInt(cooked[2]);
                int flags = Integer.parseInt(cooked[2]);
                if (SystemProperties.getBoolean(StorageManager.PROP_FORCE_ADOPTABLE, false)) {
                    flags |= DiskInfo.FLAG_ADOPTABLE;
                }
                mDisks.put(id, new DiskInfo(id, flags));
                break;
            }