diff options
author | Kenny Root <kroot@google.com> | 2010-07-28 14:47:01 -0700 |
---|---|---|
committer | Kenny Root <kroot@google.com> | 2010-07-28 14:48:58 -0700 |
commit | f369a9b5f7b2ae75875753caf90ec68fd9dbc144 (patch) | |
tree | 65ddddfda965f4d2d140fcbc365317f4307be6db /services | |
parent | 56c02dc3d325bab8549ec34b9d6aa7c62ef742d0 (diff) | |
download | frameworks_base-f369a9b5f7b2ae75875753caf90ec68fd9dbc144.zip frameworks_base-f369a9b5f7b2ae75875753caf90ec68fd9dbc144.tar.gz frameworks_base-f369a9b5f7b2ae75875753caf90ec68fd9dbc144.tar.bz2 |
Remove stale temporary ASEC containers
When a temporary container is created, its existence should be
ephemeral. However, if there is an error that causes system_server to be
killed during the process of creating a finalized ASEC, delete the stale
containers on the next start-up of system_server.
Change-Id: I7be8f94638a824295474c9a95960594848cb726b
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/PackageManagerService.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/services/java/com/android/server/PackageManagerService.java b/services/java/com/android/server/PackageManagerService.java index 17ad9e3..1a4b59f 100644 --- a/services/java/com/android/server/PackageManagerService.java +++ b/services/java/com/android/server/PackageManagerService.java @@ -9787,10 +9787,15 @@ class PackageManagerService extends IPackageManager.Stub { if (doGc) { Runtime.getRuntime().gc(); } - // List stale containers. + // List stale containers and destroy stale temporary containers. if (removeCids != null) { for (String cid : removeCids) { - Log.w(TAG, "Container " + cid + " is stale"); + if (cid.startsWith(mTempContainerPrefix)) { + Log.i(TAG, "Destroying stale temporary container " + cid); + PackageHelper.destroySdDir(cid); + } else { + Log.w(TAG, "Container " + cid + " is stale"); + } } } } |