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

Commit 1b974dc9 authored by skuhne@google.com's avatar skuhne@google.com Committed by Stefan Kuhne
Browse files

Fixing timeout caused by non executed animation

The problem became apparent after a springboard activity
called another activity and a moveTaskToFront got requested.

This issue is similar to ag/1647538 where an
ExecuteAppTransision was missing and a timeout occured.

Bug: 33307856
Test: Start PlayStore on ARC++ several times to see that
it shows up immediately and not after a considerable delay.

Change-Id: I25b63bd65385a4ad45bbb1803ae92fb48fe5fe4d
(cherry picked from commit 06f78e83d1010fa5420c7fe88a0b27eb3651bdc3)
parent 221bffe0
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -2150,9 +2150,7 @@ final class ActivityStack extends ConfigurationContainer {
                    mStackSupervisor.allResumedActivitiesComplete()) {
            // Make sure we have executed any pending transitions, since there
            // should be nothing left to do at this point.
            mWindowManager.executeAppTransition();
            mNoAnimActivities.clear();
            ActivityOptions.abort(options);
            executeAppTransition(options);
            if (DEBUG_STATES) Slog.d(TAG_STATES,
                    "resumeTopActivityLocked: Top activity resumed " + next);
            if (DEBUG_STACK) mStackSupervisor.validateTopActivitiesLocked();
@@ -2187,9 +2185,7 @@ final class ActivityStack extends ConfigurationContainer {
                && mStackSupervisor.allPausedActivitiesComplete()) {
            // Make sure we have executed any pending transitions, since there
            // should be nothing left to do at this point.
            mWindowManager.executeAppTransition();
            mNoAnimActivities.clear();
            ActivityOptions.abort(options);
            executeAppTransition(options);
            if (DEBUG_STATES) Slog.d(TAG_STATES,
                    "resumeTopActivityLocked: Going to sleep and all paused");
            if (DEBUG_STACK) mStackSupervisor.validateTopActivitiesLocked();
@@ -2252,9 +2248,7 @@ final class ActivityStack extends ConfigurationContainer {
            // So, nothing else to-do except:
            // Make sure we have executed any pending transitions, since there
            // should be nothing left to do at this point.
            mWindowManager.executeAppTransition();
            mNoAnimActivities.clear();
            ActivityOptions.abort(options);
            executeAppTransition(options);
            if (DEBUG_STATES) Slog.d(TAG_STATES,
                    "resumeTopActivityLocked: Top activity resumed (dontWaitForPause) " + next);
            if (DEBUG_STACK) mStackSupervisor.validateTopActivitiesLocked();
@@ -5056,4 +5050,10 @@ final class ActivityStack extends ConfigurationContainer {
            mTaskHistory.get(taskNdx).setLockTaskAuth();
        }
    }

    void executeAppTransition(ActivityOptions options) {
        mWindowManager.executeAppTransition();
        mNoAnimActivities.clear();
        ActivityOptions.abort(options);
    }
}
+3 −0
Original line number Diff line number Diff line
@@ -1844,6 +1844,9 @@ public class ActivityStackSupervisor extends ConfigurationContainer
        final ActivityRecord r = mFocusedStack.topRunningActivityLocked();
        if (r == null || r.state != RESUMED) {
            mFocusedStack.resumeTopActivityUncheckedLocked(null, null);
        } else if (r.state == RESUMED) {
            // Kick off any lingering app transitions form the MoveTaskToFront operation.
            mFocusedStack.executeAppTransition(targetOptions);
        }
        return false;
    }