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

Commit ebe0ab74 authored by Sudheer Shanka's avatar Sudheer Shanka
Browse files

Report freezable state changes even when pending freezes are cancelled.

Bug: 305755046
Test: atest android.devicepolicy.cts.LostModeLocationTest
Change-Id: I0cccaa0980d05325b779de5669b9c0745b422eb3
parent e619e972
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -1428,10 +1428,13 @@ public final class CachedAppOptimizer {
            }
            return;
        }
        boolean processFreezableChangeReported = false;
        if (opt.isPendingFreeze()) {
            // Remove pending DO_FREEZE message
            mFreezeHandler.removeMessages(SET_FROZEN_PROCESS_MSG, app);
            opt.setPendingFreeze(false);
            reportProcessFreezableChangedLocked(app);
            processFreezableChangeReported = true;
            if (DEBUG_FREEZER) {
                Slog.d(TAG_AM, "Cancel freezing " + pid + " " + app.processName);
            }
@@ -1480,7 +1483,9 @@ public final class CachedAppOptimizer {
        if (processKilled) {
            return;
        }
        if (!processFreezableChangeReported) {
            reportProcessFreezableChangedLocked(app);
        }

        long freezeTime = opt.getFreezeUnfreezeTime();