Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d6dc45c3 authored by Kenny Root's avatar Kenny Root Committed by Android Git Automerger
Browse files

am 125816a2: Merge "Failure to move .dex in eng builds is not fatal" into gingerbread

Merge commit '125816a2' into gingerbread-plus-aosp

* commit '125816a2':
  Failure to move .dex in eng builds is not fatal
parents 0b4e3ad3 125816a2
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -5867,10 +5867,19 @@ class PackageManagerService extends IPackageManager.Stub {
        if ((newPackage.applicationInfo.flags&ApplicationInfo.FLAG_HAS_CODE) != 0) {
            retCode = mInstaller.movedex(newPackage.mScanPath, newPackage.mPath);
            if (retCode != 0) {
                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;
    }