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

Commit 5804ed79 authored by tomnatan's avatar tomnatan
Browse files

Fix issue where NOT_VISIBLE state is sometimes not logged

This happens because ActivityMetricsLogger#notifyActivityRemoved is sometimes called before ActivityMetricsLogger#logAppCompatState is called from ActivityRecord#setVisibility.

Fix: 203417779
Test: atest WmTests:SizeCompatTests
Change-Id: Ib49f8fd6d01a3b6b6797902e8c517b580649a7d8
parent 66889d32
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4713,6 +4713,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
        if (app != null) {
            mTaskSupervisor.onProcessActivityStateChanged(app, false /* forceBatch */);
        }
        logAppCompatState();
    }

    /**
@@ -4740,7 +4741,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
                ActivityTaskManagerService.LAYOUT_REASON_VISIBILITY_CHANGED);
        mTaskSupervisor.getActivityMetricsLogger().notifyVisibilityChanged(this);
        mTaskSupervisor.mAppVisibilitiesChangedSinceLastPause = true;
        logAppCompatState();
    }

    @VisibleForTesting