Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dfbbf201 authored by Wei Sheng Shih's avatar Wei Sheng Shih Committed by Automerger Merge Worker
Browse files

Merge "Fix launch app crash could stuck system ui render thread." into...

Merge "Fix launch app crash could stuck system ui render thread." into tm-qpr-dev am: 01276d68 am: a01a7fec

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19084696



Change-Id: I60a71fad72b565c9d0ad95568cd2b10dfdbf0dd0
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents c2d5e6b2 a01a7fec
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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();
+14 −7
Original line number Diff line number Diff line
@@ -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,15 +684,17 @@ 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) {
            // 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 {
            lastOrganizer.removeStartingWindow(removalInfo);
        } catch (RemoteException e) {