Merge "Fix launch app crash could stuck system ui render thread." into tm-qpr-dev am: 01276d685c am: a01a7fecc3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19084696 Change-Id: I60a71fad72b565c9d0ad95568cd2b10dfdbf0dd0 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -2611,7 +2611,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
|
||||
// either way, abort and reset the sequence.
|
||||
if (parcelable == null
|
||||
|| mTransferringSplashScreenState != TRANSFER_SPLASH_SCREEN_COPYING
|
||||
|| mStartingWindow == null
|
||||
|| mStartingWindow == null || mStartingWindow.mRemoved
|
||||
|| finishing) {
|
||||
if (parcelable != null) {
|
||||
parcelable.clearIfNeeded();
|
||||
|
||||
@@ -632,6 +632,11 @@ class TaskOrganizerController extends ITaskOrganizerController.Stub {
|
||||
final Rect mainFrame = window.getRelativeFrame();
|
||||
final StartingWindowAnimationAdaptor adaptor = new StartingWindowAnimationAdaptor();
|
||||
window.startAnimation(t, adaptor, false, ANIMATION_TYPE_STARTING_REVEAL);
|
||||
if (adaptor.mAnimationLeash == null) {
|
||||
Slog.e(TAG, "Cannot start starting window animation, the window " + window
|
||||
+ " was removed");
|
||||
return null;
|
||||
}
|
||||
t.setPosition(adaptor.mAnimationLeash, mainFrame.left, mainFrame.top);
|
||||
return adaptor.mAnimationLeash;
|
||||
}
|
||||
@@ -679,13 +684,15 @@ class TaskOrganizerController extends ITaskOrganizerController.Stub {
|
||||
if (topActivity != null) {
|
||||
removalInfo.deferRemoveForIme = topActivity.mDisplayContent
|
||||
.mayImeShowOnLaunchingActivity(topActivity);
|
||||
if (removalInfo.playRevealAnimation && playShiftUpAnimation) {
|
||||
final WindowState mainWindow =
|
||||
topActivity.findMainWindow(false/* includeStartingApp */);
|
||||
if (mainWindow != null) {
|
||||
removalInfo.windowAnimationLeash = applyStartingWindowAnimation(mainWindow);
|
||||
removalInfo.mainFrame = mainWindow.getRelativeFrame();
|
||||
}
|
||||
final WindowState mainWindow =
|
||||
topActivity.findMainWindow(false/* includeStartingApp */);
|
||||
// No app window for this activity, app might be crashed.
|
||||
// Remove starting window immediately without playing reveal animation.
|
||||
if (mainWindow == null || mainWindow.mRemoved) {
|
||||
removalInfo.playRevealAnimation = false;
|
||||
} else if (removalInfo.playRevealAnimation && playShiftUpAnimation) {
|
||||
removalInfo.windowAnimationLeash = applyStartingWindowAnimation(mainWindow);
|
||||
removalInfo.mainFrame = mainWindow.getRelativeFrame();
|
||||
}
|
||||
}
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user