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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user