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

Commit 8864010a authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Don't hide the home handle when it is attaching to the app" into...

Merge "Don't hide the home handle when it is attaching to the app" into udc-dev am: 204388f1 am: fa106e18

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



Change-Id: I17d22aa1c5b552b8732048764c0635b6d50b90f6
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents e10367ad fa106e18
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -185,6 +185,8 @@ class AsyncRotationController extends FadeAnimationController implements Consume
                }
                }
            } else if (navigationBarCanMove || mTransitionOp == OP_CHANGE_MAY_SEAMLESS) {
            } else if (navigationBarCanMove || mTransitionOp == OP_CHANGE_MAY_SEAMLESS) {
                action = Operation.ACTION_SEAMLESS;
                action = Operation.ACTION_SEAMLESS;
            } else if (mDisplayContent.mTransitionController.mNavigationBarAttachedToApp) {
                return;
            }
            }
            mTargetWindowTokens.put(w.mToken, new Operation(action));
            mTargetWindowTokens.put(w.mToken, new Operation(action));
            return;
            return;
+13 −6
Original line number Original line Diff line number Diff line
@@ -234,9 +234,6 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
    private @TransitionState int mState = STATE_PENDING;
    private @TransitionState int mState = STATE_PENDING;
    private final ReadyTracker mReadyTracker = new ReadyTracker();
    private final ReadyTracker mReadyTracker = new ReadyTracker();


    // TODO(b/188595497): remove when not needed.
    /** @see RecentsAnimationController#mNavigationBarAttachedToApp */
    private boolean mNavBarAttachedToApp = false;
    private int mRecentsDisplayId = INVALID_DISPLAY;
    private int mRecentsDisplayId = INVALID_DISPLAY;


    /** The delay for light bar appearance animation. */
    /** The delay for light bar appearance animation. */
@@ -1781,7 +1778,7 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
        if (navWindow == null || navWindow.mToken == null) {
        if (navWindow == null || navWindow.mToken == null) {
            return;
            return;
        }
        }
        mNavBarAttachedToApp = true;
        mController.mNavigationBarAttachedToApp = true;
        navWindow.mToken.cancelAnimation();
        navWindow.mToken.cancelAnimation();
        final SurfaceControl.Transaction t = navWindow.mToken.getPendingTransaction();
        final SurfaceControl.Transaction t = navWindow.mToken.getPendingTransaction();
        final SurfaceControl navSurfaceControl = navWindow.mToken.getSurfaceControl();
        final SurfaceControl navSurfaceControl = navWindow.mToken.getSurfaceControl();
@@ -1803,8 +1800,10 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {


    /** @see RecentsAnimationController#restoreNavigationBarFromApp */
    /** @see RecentsAnimationController#restoreNavigationBarFromApp */
    void legacyRestoreNavigationBarFromApp() {
    void legacyRestoreNavigationBarFromApp() {
        if (!mNavBarAttachedToApp) return;
        if (!mController.mNavigationBarAttachedToApp) {
        mNavBarAttachedToApp = false;
            return;
        }
        mController.mNavigationBarAttachedToApp = false;


        if (mRecentsDisplayId == INVALID_DISPLAY) {
        if (mRecentsDisplayId == INVALID_DISPLAY) {
            Slog.e(TAG, "Reparented navigation bar without a valid display");
            Slog.e(TAG, "Reparented navigation bar without a valid display");
@@ -1837,6 +1836,11 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
            break;
            break;
        }
        }


        final AsyncRotationController asyncRotationController = dc.getAsyncRotationController();
        if (asyncRotationController != null) {
            asyncRotationController.accept(navWindow);
        }

        if (animate) {
        if (animate) {
            final NavBarFadeAnimationController controller =
            final NavBarFadeAnimationController controller =
                    new NavBarFadeAnimationController(dc);
                    new NavBarFadeAnimationController(dc);
@@ -1845,6 +1849,9 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
            // Reparent the SurfaceControl of nav bar token back.
            // Reparent the SurfaceControl of nav bar token back.
            t.reparent(navToken.getSurfaceControl(), parent.getSurfaceControl());
            t.reparent(navToken.getSurfaceControl(), parent.getSurfaceControl());
        }
        }

        // To apply transactions.
        dc.mWmService.scheduleAnimationLocked();
    }
    }


    private void reportStartReasonsToLogger() {
    private void reportStartReasonsToLogger() {
+5 −0
Original line number Original line Diff line number Diff line
@@ -206,6 +206,11 @@ class TransitionController {
     */
     */
    boolean mBuildingFinishLayers = false;
    boolean mBuildingFinishLayers = false;


    /**
     * Whether the surface of navigation bar token is reparented to an app.
     */
    boolean mNavigationBarAttachedToApp = false;

    private boolean mAnimatingState = false;
    private boolean mAnimatingState = false;


    final Handler mLoggerHandler = FgThread.getHandler();
    final Handler mLoggerHandler = FgThread.getHandler();