Merge "Skip reveal animation with invisible starting window"

This commit is contained in:
Riddle Hsu
2022-07-27 07:03:05 +00:00
committed by Android (Google) Code Review
2 changed files with 13 additions and 28 deletions

View File

@@ -907,6 +907,12 @@
"group": "WM_DEBUG_REMOTE_ANIMATIONS",
"at": "com\/android\/server\/wm\/RemoteAnimationController.java"
},
"-1237827119": {
"message": "Schedule remove starting %s startingWindow=%s animate=%b Callers=%s",
"level": "VERBOSE",
"group": "WM_DEBUG_STARTING_WINDOW",
"at": "com\/android\/server\/wm\/ActivityRecord.java"
},
"-1228653755": {
"message": "Launch on display check: displayId=%d callingPid=%d callingUid=%d",
"level": "DEBUG",
@@ -1015,12 +1021,6 @@
"group": "WM_DEBUG_ORIENTATION",
"at": "com\/android\/server\/wm\/WindowState.java"
},
"-1128015008": {
"message": "Schedule remove starting %s startingWindow=%s startingView=%s Callers=%s",
"level": "VERBOSE",
"group": "WM_DEBUG_STARTING_WINDOW",
"at": "com\/android\/server\/wm\/ActivityRecord.java"
},
"-1117599386": {
"message": "Deferring rotation, display is not enabled.",
"level": "VERBOSE",
@@ -3877,12 +3877,6 @@
"group": "WM_ERROR",
"at": "com\/android\/server\/wm\/WindowManagerService.java"
},
"1742235936": {
"message": "Removing startingView=%s",
"level": "VERBOSE",
"group": "WM_DEBUG_STARTING_WINDOW",
"at": "com\/android\/server\/wm\/ActivityRecord.java"
},
"1746778201": {
"message": "Set freezing of %s: visible=%b freezing=%b visibleRequested=%b. %s",
"level": "INFO",

View File

@@ -2728,8 +2728,13 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
}
final StartingSurfaceController.StartingSurface surface;
final StartingData startingData = mStartingData;
final boolean animate;
if (mStartingData != null) {
animate = prepareAnimation && mStartingData.needRevealAnimation()
&& mStartingWindow.isVisibleByPolicy();
ProtoLog.v(WM_DEBUG_STARTING_WINDOW, "Schedule remove starting %s startingWindow=%s"
+ " animate=%b Callers=%s", this, mStartingWindow, animate,
Debug.getCallers(5));
surface = mStartingSurface;
mStartingData = null;
mStartingSurface = null;
@@ -2747,21 +2752,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
return;
}
ProtoLog.v(WM_DEBUG_STARTING_WINDOW, "Schedule remove starting %s startingWindow=%s"
+ " startingView=%s Callers=%s", this, mStartingWindow, mStartingSurface,
Debug.getCallers(5));
final Runnable removeSurface = () -> {
ProtoLog.v(WM_DEBUG_STARTING_WINDOW, "Removing startingView=%s", surface);
try {
surface.remove(prepareAnimation && startingData.needRevealAnimation());
} catch (Exception e) {
Slog.w(TAG_WM, "Exception when removing starting window", e);
}
};
removeSurface.run();
surface.remove(animate);
}
/**