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

Commit b9ebff58 authored by Narayan Kamath's avatar Narayan Kamath Committed by android-build-merger
Browse files

Merge \"PackageManager: Don\'t fail app installs if dexopt fails.\" into nyc-dev

am: 5ae42bb6

Change-Id: I9b354c1bb42a17d020e40899526f9d9c61572db8
parents 8a8a489b 5ae42bb6
Loading
Loading
Loading
Loading
+4 −7
Original line number Diff line number Diff line
@@ -15138,16 +15138,13 @@ public class PackageManagerService extends IPackageManager.Stub {
            }
            Trace.traceBegin(TRACE_TAG_PACKAGE_MANAGER, "dexopt");
            // Do not run PackageDexOptimizer through the local performDexOpt
            // method because `pkg` is not in `mPackages` yet.
            int result = mPackageDexOptimizer.performDexOpt(pkg, pkg.usesLibraryFiles,
            // method because `pkg` may not be in `mPackages` yet.
            //
            // Also, don't fail application installs if the dexopt step fails.
            mPackageDexOptimizer.performDexOpt(pkg, pkg.usesLibraryFiles,
                    null /* instructionSets */, false /* checkProfiles */,
                    getCompilerFilterForReason(REASON_INSTALL));
            Trace.traceEnd(TRACE_TAG_PACKAGE_MANAGER);
            if (result == PackageDexOptimizer.DEX_OPT_FAILED) {
                String msg = "Extracting package failed for " + pkgName;
                res.setError(INSTALL_FAILED_DEXOPT, msg);
                return;
            }
            // Notify BackgroundDexOptService that the package has been changed.
            // If this is an update of a package which used to fail to compile,