summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenny Root <kroot@google.com>2012-05-09 13:28:54 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-05-09 13:28:54 -0700
commit7a7d8f182a2f18f1d548e76d629b8ed191caade5 (patch)
treedeefcef8e86a442da8b103cbeaf66043e81ec0e0
parent039495d3dc19b96e3953fde81b74c44d0ac5c2f0 (diff)
parentbad417df657128a988b23a6b70b4d08633e4ac5a (diff)
downloadframeworks_base-7a7d8f182a2f18f1d548e76d629b8ed191caade5.zip
frameworks_base-7a7d8f182a2f18f1d548e76d629b8ed191caade5.tar.gz
frameworks_base-7a7d8f182a2f18f1d548e76d629b8ed191caade5.tar.bz2
am bad417df: Merge "Throw RemoteException when MountService is not yet up" into jb-dev
* commit 'bad417df657128a988b23a6b70b4d08633e4ac5a': Throw RemoteException when MountService is not yet up
-rw-r--r--core/java/com/android/internal/content/PackageHelper.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/java/com/android/internal/content/PackageHelper.java b/core/java/com/android/internal/content/PackageHelper.java
index 48ed561..246b0c9 100644
--- a/core/java/com/android/internal/content/PackageHelper.java
+++ b/core/java/com/android/internal/content/PackageHelper.java
@@ -57,25 +57,25 @@ public class PackageHelper {
public static final int APP_INSTALL_INTERNAL = 1;
public static final int APP_INSTALL_EXTERNAL = 2;
- public static IMountService getMountService() {
+ public static IMountService getMountService() throws RemoteException {
IBinder service = ServiceManager.getService("mount");
if (service != null) {
return IMountService.Stub.asInterface(service);
} else {
Log.e(TAG, "Can't get mount service");
+ throw new RemoteException("Could not contact mount service");
}
- return null;
}
public static String createSdDir(int sizeMb, String cid, String sdEncKey, int uid,
boolean isExternal) {
// Create mount point via MountService
- IMountService mountService = getMountService();
+ try {
+ IMountService mountService = getMountService();
- if (localLOGV)
- Log.i(TAG, "Size of container " + sizeMb + " MB");
+ if (localLOGV)
+ Log.i(TAG, "Size of container " + sizeMb + " MB");
- try {
int rc = mountService.createSecureContainer(cid, sizeMb, "ext4", sdEncKey, uid,
isExternal);
if (rc != StorageResultCode.OperationSucceeded) {