summaryrefslogtreecommitdiffstats
path: root/cmds
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2015-05-15 21:55:51 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-05-15 21:55:57 +0000
commit2177ed407b8323e6f50d2aa64a62fbdc773e1859 (patch)
tree13c94e7b2f138e0f6e23bbb2f673d966b5bc989e /cmds
parent038959e851603500eb39b52fef33cbe75dbd73e3 (diff)
parent4c099d0c49c8366efd3c26854465b3ceef49b627 (diff)
downloadframeworks_base-2177ed407b8323e6f50d2aa64a62fbdc773e1859.zip
frameworks_base-2177ed407b8323e6f50d2aa64a62fbdc773e1859.tar.gz
frameworks_base-2177ed407b8323e6f50d2aa64a62fbdc773e1859.tar.bz2
Merge changes from topic 'bench' into mnc-dev
* changes: Command to change force adoptable state. Initial pass at storage benchmarks.
Diffstat (limited to 'cmds')
-rw-r--r--cmds/sm/src/com/android/commands/sm/Sm.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/cmds/sm/src/com/android/commands/sm/Sm.java b/cmds/sm/src/com/android/commands/sm/Sm.java
index 4a8cf08..0dad4dc 100644
--- a/cmds/sm/src/com/android/commands/sm/Sm.java
+++ b/cmds/sm/src/com/android/commands/sm/Sm.java
@@ -71,6 +71,8 @@ public final class Sm {
runHasAdoptable();
} else if ("get-primary-storage-uuid".equals(op)) {
runGetPrimaryStorageUuid();
+ } else if ("set-force-adoptable".equals(op)) {
+ runSetForceAdoptable();
} else if ("partition".equals(op)) {
runPartition();
} else if ("mount".equals(op)) {
@@ -116,14 +118,19 @@ public final class Sm {
}
public void runHasAdoptable() {
- System.out.println(SystemProperties.getBoolean(StorageManager.PROP_HAS_ADOPTABLE, false)
- || SystemProperties.getBoolean(StorageManager.PROP_FORCE_ADOPTABLE, false));
+ System.out.println(SystemProperties.getBoolean(StorageManager.PROP_HAS_ADOPTABLE, false));
}
public void runGetPrimaryStorageUuid() throws RemoteException {
System.out.println(mSm.getPrimaryStorageUuid());
}
+ public void runSetForceAdoptable() throws RemoteException {
+ final boolean forceAdoptable = Boolean.parseBoolean(nextArg());
+ mSm.setDebugFlags(forceAdoptable ? StorageManager.DEBUG_FORCE_ADOPTABLE : 0,
+ StorageManager.DEBUG_FORCE_ADOPTABLE);
+ }
+
public void runPartition() throws RemoteException {
final String diskId = nextArg();
final String type = nextArg();
@@ -177,6 +184,7 @@ public final class Sm {
System.err.println(" sm list-volumes [public|private|emulated|all]");
System.err.println(" sm has-adoptable");
System.err.println(" sm get-primary-storage-uuid");
+ System.err.println(" sm set-force-adoptable [true|false]");
System.err.println("");
System.err.println(" sm partition DISK [public|private|mixed] [ratio]");
System.err.println(" sm mount VOLUME");