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

Commit 33fb2573 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "[am] check if codePath is null before checking incremental" into sc-dev

parents 54fc08e8 efcd3258
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -7726,16 +7726,17 @@ public class ActivityManagerService extends IActivityManager.Stub
            ApplicationErrorReport.CrashInfo crashInfo) {
        float loadingProgress = 1;
        IncrementalMetrics incrementalMetrics = null;
        // Notify package manager service to possibly update package state
        // Obtain Incremental information if available
        if (r != null && r.info != null && r.info.packageName != null) {
            final String codePath = r.info.getCodePath();
            IncrementalStatesInfo incrementalStatesInfo =
                    mPackageManagerInt.getIncrementalStatesInfo(r.info.packageName, r.uid,
                            r.userId);
            if (incrementalStatesInfo != null) {
                loadingProgress = incrementalStatesInfo.getProgress();
            }
            if (IncrementalManager.isIncrementalPath(codePath)) {
            final String codePath = r.info.getCodePath();
            if (codePath != null && !codePath.isEmpty()
                    && IncrementalManager.isIncrementalPath(codePath)) {
                // Report in the main log about the incremental package
                Slog.e(TAG, "App crashed on incremental package " + r.info.packageName
                        + " which is " + ((int) (loadingProgress * 100)) + "% loaded.");
+2 −1
Original line number Diff line number Diff line
@@ -400,7 +400,8 @@ class ProcessErrorStateRecord {
                loadingProgress = incrementalStatesInfo.getProgress();
            }
            final String codePath = mApp.info.getCodePath();
            if (IncrementalManager.isIncrementalPath(codePath)) {
            if (codePath != null && !codePath.isEmpty()
                    && IncrementalManager.isIncrementalPath(codePath)) {
                // Report in the main log that the incremental package is still loading
                Slog.e(TAG, "App ANR on incremental package " + mApp.info.packageName
                        + " which is " + ((int) (loadingProgress * 100)) + "% loaded.");