Loading services/core/java/com/android/server/wm/ActivityMetricsLogger.java +3 −0 Original line number Diff line number Diff line Loading @@ -581,6 +581,9 @@ class ActivityMetricsLogger { /** * Notifies the tracker that all windows of the app have been drawn. * * @return Non-null info if the activity was pending to draw, otherwise it might have been set * to invisible (removed from active transition) or it was already drawn. */ @Nullable TransitionInfoSnapshot notifyWindowsDrawn(@NonNull ActivityRecord r, long timestampNs) { Loading services/core/java/com/android/server/wm/ActivityRecord.java +11 −5 Original line number Diff line number Diff line Loading @@ -5202,11 +5202,17 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A } final TransitionInfoSnapshot info = mStackSupervisor .getActivityMetricsLogger().notifyWindowsDrawn(this, timestampNs); final int windowsDrawnDelayMs = info != null ? info.windowsDrawnDelayMs : INVALID_DELAY; final @LaunchState int launchState = info != null ? info.getLaunchState() : -1; final boolean validInfo = info != null; final int windowsDrawnDelayMs = validInfo ? info.windowsDrawnDelayMs : INVALID_DELAY; final @LaunchState int launchState = validInfo ? info.getLaunchState() : -1; // The activity may have been requested to be invisible (another activity has been launched) // so there is no valid info. But if it is the current top activity (e.g. sleeping), the // invalid state is still reported to make sure the waiting result is notified. if (validInfo || this == mDisplayContent.topRunningActivity()) { mStackSupervisor.reportActivityLaunchedLocked(false /* timeout */, this, windowsDrawnDelayMs, launchState); mStackSupervisor.stopWaitingForActivityVisible(this, windowsDrawnDelayMs); } finishLaunchTickingLocked(); if (task != null) { task.hasBeenVisible = true; Loading Loading
services/core/java/com/android/server/wm/ActivityMetricsLogger.java +3 −0 Original line number Diff line number Diff line Loading @@ -581,6 +581,9 @@ class ActivityMetricsLogger { /** * Notifies the tracker that all windows of the app have been drawn. * * @return Non-null info if the activity was pending to draw, otherwise it might have been set * to invisible (removed from active transition) or it was already drawn. */ @Nullable TransitionInfoSnapshot notifyWindowsDrawn(@NonNull ActivityRecord r, long timestampNs) { Loading
services/core/java/com/android/server/wm/ActivityRecord.java +11 −5 Original line number Diff line number Diff line Loading @@ -5202,11 +5202,17 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A } final TransitionInfoSnapshot info = mStackSupervisor .getActivityMetricsLogger().notifyWindowsDrawn(this, timestampNs); final int windowsDrawnDelayMs = info != null ? info.windowsDrawnDelayMs : INVALID_DELAY; final @LaunchState int launchState = info != null ? info.getLaunchState() : -1; final boolean validInfo = info != null; final int windowsDrawnDelayMs = validInfo ? info.windowsDrawnDelayMs : INVALID_DELAY; final @LaunchState int launchState = validInfo ? info.getLaunchState() : -1; // The activity may have been requested to be invisible (another activity has been launched) // so there is no valid info. But if it is the current top activity (e.g. sleeping), the // invalid state is still reported to make sure the waiting result is notified. if (validInfo || this == mDisplayContent.topRunningActivity()) { mStackSupervisor.reportActivityLaunchedLocked(false /* timeout */, this, windowsDrawnDelayMs, launchState); mStackSupervisor.stopWaitingForActivityVisible(this, windowsDrawnDelayMs); } finishLaunchTickingLocked(); if (task != null) { task.hasBeenVisible = true; Loading