Merge "Clear invisible undrawn activities when reporting drawn" into sc-v2-dev am: 29dd745564 am: bb37331b36
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15639324 Change-Id: I8fd3f09e31c12751e4cebd8081cd6b0f48c3d4a6
This commit is contained in:
@@ -703,6 +703,7 @@ class ActivityMetricsLogger {
|
||||
// Always calculate the delay because the caller may need to know the individual drawn time.
|
||||
info.mWindowsDrawnDelayMs = info.calculateDelay(timestampNs);
|
||||
info.removePendingDrawActivity(r);
|
||||
info.updatePendingDraw(false /* keepInitializing */);
|
||||
final TransitionInfoSnapshot infoSnapshot = new TransitionInfoSnapshot(info);
|
||||
if (info.mLoggedTransitionStarting && info.allDrawn()) {
|
||||
done(false /* abort */, info, "notifyWindowsDrawn - all windows drawn", timestampNs);
|
||||
|
||||
@@ -475,6 +475,16 @@ public class ActivityMetricsLaunchObserverTests extends WindowTestsBase {
|
||||
transitToDrawnAndVerifyOnLaunchFinished(mTopActivity);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testConsecutiveLaunch() {
|
||||
mTrampolineActivity.setState(ActivityRecord.State.INITIALIZING, "test");
|
||||
onActivityLaunched(mTrampolineActivity);
|
||||
mActivityMetricsLogger.notifyActivityLaunching(mTopActivity.intent,
|
||||
mTrampolineActivity /* caller */, mTrampolineActivity.getUid());
|
||||
notifyActivityLaunched(START_SUCCESS, mTopActivity);
|
||||
transitToDrawnAndVerifyOnLaunchFinished(mTopActivity);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testConsecutiveLaunchNewTask() {
|
||||
final IBinder launchCookie = mock(IBinder.class);
|
||||
|
||||
Reference in New Issue
Block a user