diff options
author | Fredrik Helmer <fredrik.helmer@sonyericsson.com> | 2011-02-09 16:16:10 +0100 |
---|---|---|
committer | Johan Redestig <johan.redestig@sonyericsson.com> | 2011-04-04 14:38:24 +0200 |
commit | a20c8ef471666cf8b0dca91a8739ff18af1741a5 (patch) | |
tree | 3fcf6ffe241ab64583a55fb207d323a314d6bd16 /services | |
parent | c6b22e2727bd3730edd5ad72831a9bb4670d00f3 (diff) | |
download | frameworks_base-a20c8ef471666cf8b0dca91a8739ff18af1741a5.zip frameworks_base-a20c8ef471666cf8b0dca91a8739ff18af1741a5.tar.gz frameworks_base-a20c8ef471666cf8b0dca91a8739ff18af1741a5.tar.bz2 |
Avoid crash in system server when mounting container
A race condition when mounting a container in PackageHelper may cause
the system_server to crash (uncaught exception). Calling methods are
prepared to handle null, so return null instead.
Change-Id: I852ee21a2d847e37d81c1b900c27ddf94ef24fcb
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/MountService.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/services/java/com/android/server/MountService.java b/services/java/com/android/server/MountService.java index e6e3e5f..4d934b6 100644 --- a/services/java/com/android/server/MountService.java +++ b/services/java/com/android/server/MountService.java @@ -1509,7 +1509,8 @@ class MountService extends IMountService.Stub } catch (NativeDaemonConnectorException e) { int code = e.getCode(); if (code == VoldResponseCode.OpFailedStorageNotFound) { - throw new IllegalArgumentException(String.format("Container '%s' not found", id)); + Slog.i(TAG, String.format("Container '%s' not found", id)); + return null; } else { throw new IllegalStateException(String.format("Unexpected response code %d", code)); } |