diff options
author | San Mehat <san@google.com> | 2010-01-20 15:16:42 -0800 |
---|---|---|
committer | San Mehat <san@google.com> | 2010-01-20 18:14:09 -0800 |
commit | 8ab6135841ca0fede5b99fdd9ff166fbfe0176c0 (patch) | |
tree | 7187a066f8aa267340c598af1621146b69f71a7a /services/java/com | |
parent | 45891e8bfd77bbb55e2568933f490d6512add865 (diff) | |
download | frameworks_base-8ab6135841ca0fede5b99fdd9ff166fbfe0176c0.zip frameworks_base-8ab6135841ca0fede5b99fdd9ff166fbfe0176c0.tar.gz frameworks_base-8ab6135841ca0fede5b99fdd9ff166fbfe0176c0.tar.bz2 |
MountService: Codeshrink
Signed-off-by: San Mehat <san@google.com>
Diffstat (limited to 'services/java/com')
-rw-r--r-- | services/java/com/android/server/MountService.java | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/services/java/com/android/server/MountService.java b/services/java/com/android/server/MountService.java index 0d9f98f..381a300 100644 --- a/services/java/com/android/server/MountService.java +++ b/services/java/com/android/server/MountService.java @@ -1024,23 +1024,7 @@ class MountService extends IMountService.Stub } public String[] getSecureContainerList() throws IllegalStateException { - ArrayList<String> rsp = mConnector.doCommand("list_asec"); - - String[] rdata = new String[rsp.size()]; - int idx = 0; - - for (String line : rsp) { - String []tok = line.split(" "); - int code = Integer.parseInt(tok[0]); - if (code == VoldResponseCode.AsecListResult) { - rdata[idx++] = tok[1]; - } else if (code == NativeDaemonConnector.ResponseCode.CommandOkay) { - return rdata; - } else { - throw new IllegalStateException(String.format("Unexpected response code %d", code)); - } - } - throw new IllegalStateException("Got an empty response"); + return mConnector.doListCommand("list_asec", VoldResponseCode.AsecListResult); } public String createSecureContainer(String id, int sizeMb, String fstype, |