diff options
| author | 2010-08-04 13:35:33 -0700 | |
|---|---|---|
| committer | 2010-08-04 13:35:33 -0700 | |
| commit | e2f7417529439d4ff3fd23fbe7fc1fcac4230385 (patch) | |
| tree | cafb6120bf33d5e342baacf35f9b77dce0effa75 | |
| parent | 508715259c332613240b2399c77d35ea7214f91a (diff) | |
Failure to move .dex in eng builds is not fatal
When moving between program locations or application names, the .dex
file is moved by installd. However, in engineering builds, the
applications are run through dexopt on-demand. If the .dex file fails to
move, we can ignore it because it's most likely because the .dex file
does not exist yet.
Change-Id: Id5c4dbfa33f19c976acd9f184ccd637752326629
| -rw-r--r-- | services/java/com/android/server/PackageManagerService.java | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/services/java/com/android/server/PackageManagerService.java b/services/java/com/android/server/PackageManagerService.java index 7827d2698df2..0ff33d148683 100644 --- a/services/java/com/android/server/PackageManagerService.java +++ b/services/java/com/android/server/PackageManagerService.java @@ -5867,8 +5867,17 @@ class PackageManagerService extends IPackageManager.Stub { if ((newPackage.applicationInfo.flags&ApplicationInfo.FLAG_HAS_CODE) != 0) { retCode = mInstaller.movedex(newPackage.mScanPath, newPackage.mPath); if (retCode != 0) { - Slog.e(TAG, "Couldn't rename dex file: " + newPackage.mPath); - return PackageManager.INSTALL_FAILED_INSUFFICIENT_STORAGE; + if (mNoDexOpt) { + /* + * If we're in an engineering build, programs are lazily run + * through dexopt. If the .dex file doesn't exist yet, it + * will be created when the program is run next. + */ + Slog.i(TAG, "dex file doesn't exist, skipping move: " + newPackage.mPath); + } else { + Slog.e(TAG, "Couldn't rename dex file: " + newPackage.mPath); + return PackageManager.INSTALL_FAILED_INSUFFICIENT_STORAGE; + } } } return PackageManager.INSTALL_SUCCEEDED; |