summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorKenny Root <kroot@google.com>2012-08-13 11:40:10 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-08-13 11:40:10 -0700
commit3221bf27ff6b8eebf360ed2496ad5c56b95fd689 (patch)
treea288fa2b522adea646206c8a20854755c0a4313a /services
parent82c2ff554682d4d3e99adb8ad4de664bb8a5bce9 (diff)
parent438a0efcfbee5dc953e8e5bbdf4cb3dbe94b3f80 (diff)
downloadframeworks_base-3221bf27ff6b8eebf360ed2496ad5c56b95fd689.zip
frameworks_base-3221bf27ff6b8eebf360ed2496ad5c56b95fd689.tar.gz
frameworks_base-3221bf27ff6b8eebf360ed2496ad5c56b95fd689.tar.bz2
am 438a0efc: Do not eject internal ASECs when storage unmounted
* commit '438a0efcfbee5dc953e8e5bbdf4cb3dbe94b3f80': Do not eject internal ASECs when storage unmounted
Diffstat (limited to 'services')
-rw-r--r--services/java/com/android/server/pm/PackageManagerService.java15
1 files changed, 12 insertions, 3 deletions
diff --git a/services/java/com/android/server/pm/PackageManagerService.java b/services/java/com/android/server/pm/PackageManagerService.java
index 3501e47..75b3f04 100644
--- a/services/java/com/android/server/pm/PackageManagerService.java
+++ b/services/java/com/android/server/pm/PackageManagerService.java
@@ -8833,7 +8833,7 @@ public class PackageManagerService extends IPackageManager.Stub {
// little while.
mHandler.post(new Runnable() {
public void run() {
- updateExternalMediaStatusInner(mediaStatus, reportStatus);
+ updateExternalMediaStatusInner(mediaStatus, reportStatus, true);
}
});
}
@@ -8843,7 +8843,7 @@ public class PackageManagerService extends IPackageManager.Stub {
* Should block until all the ASEC containers are finished being scanned.
*/
public void scanAvailableAsecs() {
- updateExternalMediaStatusInner(true, false);
+ updateExternalMediaStatusInner(true, false, false);
}
/*
@@ -8852,7 +8852,8 @@ public class PackageManagerService extends IPackageManager.Stub {
* Please note that we always have to report status if reportStatus has been
* set to true especially when unloading packages.
*/
- private void updateExternalMediaStatusInner(boolean isMounted, boolean reportStatus) {
+ private void updateExternalMediaStatusInner(boolean isMounted, boolean reportStatus,
+ boolean externalStorage) {
// Collection of uids
int uidArr[] = null;
// Collection of stale containers
@@ -8890,6 +8891,14 @@ public class PackageManagerService extends IPackageManager.Stub {
continue;
}
+ /*
+ * Skip packages that are not external if we're unmounting
+ * external storage.
+ */
+ if (externalStorage && !isMounted && !isExternal(ps)) {
+ continue;
+ }
+
final AsecInstallArgs args = new AsecInstallArgs(cid, isForwardLocked(ps));
// The package status is changed only if the code path
// matches between settings and the container id.