Blend in force adoptable flag when set.
Bug: 19993667 Change-Id: Ic7f348d171a89e889281b7efb1aa0cbade048975
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user