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

Commit 626db83c authored by Riddle Hsu's avatar Riddle Hsu Committed by Android (Google) Code Review
Browse files

Merge "Respect bar transition delay of remote animation" into tm-qpr-dev

parents 50aee330 1ec55c29
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -4752,6 +4752,8 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
        if (mPendingRemoteAnimation != null) {
            mDisplayContent.mAppTransition.overridePendingAppTransitionRemote(
                    mPendingRemoteAnimation);
            mTransitionController.setStatusBarTransitionDelay(
                    mPendingRemoteAnimation.getStatusBarTransitionDelay());
        } else {
            if (mPendingOptions == null
                    || mPendingOptions.getAnimationType() == ANIM_SCENE_TRANSITION) {
+4 −1
Original line number Diff line number Diff line
@@ -199,6 +199,9 @@ class Transition extends Binder implements BLASTSyncEngine.TransactionReadyListe
    private boolean mNavBarAttachedToApp = false;
    private int mRecentsDisplayId = INVALID_DISPLAY;

    /** The delay for light bar appearance animation. */
    long mStatusBarTransitionDelay;

    /** @see #setCanPipOnFinish */
    private boolean mCanPipOnFinish = true;

@@ -871,7 +874,7 @@ class Transition extends Binder implements BLASTSyncEngine.TransactionReadyListe
        }
        buildFinishTransaction(mFinishTransaction, info.getRootLeash());
        if (mController.getTransitionPlayer() != null) {
            mController.dispatchLegacyAppTransitionStarting(info);
            mController.dispatchLegacyAppTransitionStarting(info, mStatusBarTransitionDelay);
            try {
                ProtoLog.v(ProtoLogGroup.WM_DEBUG_WINDOW_TRANSITIONS,
                        "Calling onTransitionReady: %s", info);
+9 −2
Original line number Diff line number Diff line
@@ -462,6 +462,12 @@ class TransitionController {
        }, true /* traverseTopToBottom */);
    }

    /** @see Transition#mStatusBarTransitionDelay */
    void setStatusBarTransitionDelay(long delay) {
        if (mCollectingTransition == null) return;
        mCollectingTransition.mStatusBarTransitionDelay = delay;
    }

    /** @see Transition#setOverrideAnimation */
    void setOverrideAnimation(TransitionInfo.AnimationOptions options,
            @Nullable IRemoteCallback startCallback, @Nullable IRemoteCallback finishCallback) {
@@ -600,13 +606,14 @@ class TransitionController {
        }
    }

    void dispatchLegacyAppTransitionStarting(TransitionInfo info) {
    void dispatchLegacyAppTransitionStarting(TransitionInfo info, long statusBarTransitionDelay) {
        final boolean keyguardGoingAway = info.isKeyguardGoingAway();
        for (int i = 0; i < mLegacyListeners.size(); ++i) {
            // TODO(shell-transitions): handle (un)occlude transition.
            mLegacyListeners.get(i).onAppTransitionStartingLocked(keyguardGoingAway,
                    false /* keyguardOcclude */, 0 /* durationHint */,
                    SystemClock.uptimeMillis(), AnimationAdapter.STATUS_BAR_TRANSITION_DURATION);
                    SystemClock.uptimeMillis() + statusBarTransitionDelay,
                    AnimationAdapter.STATUS_BAR_TRANSITION_DURATION);
        }
    }