Adjust hasAdoptable() based on debug flags.
When a developer has requested "sm set-force-adoptable", adjust the return value of hasAdoptable() to reflect it. This ensures that we run relevant CTS tests. Bug: 141540368 Test: none Change-Id: I483c0df1a574021eafcd1663d41a2f4097fe986a
This commit is contained in:
@@ -1580,7 +1580,14 @@ public class StorageManager {
|
||||
|
||||
/** {@hide} */
|
||||
public static boolean hasAdoptable() {
|
||||
return SystemProperties.getBoolean(PROP_HAS_ADOPTABLE, false);
|
||||
switch (SystemProperties.get(PROP_ADOPTABLE)) {
|
||||
case "force_on":
|
||||
return true;
|
||||
case "force_off":
|
||||
return false;
|
||||
default:
|
||||
return SystemProperties.getBoolean(PROP_HAS_ADOPTABLE, false);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user