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

Commit b42e2db3 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Merge cherrypicks of ['googleplex-android-review.googlesource.com/35764073',...

Merge cherrypicks of ['googleplex-android-review.googlesource.com/35764073', 'googleplex-android-review.googlesource.com/35736456', 'googleplex-android-review.googlesource.com/35827136', 'googleplex-android-review.googlesource.com/35831026', 'googleplex-android-review.googlesource.com/35832404', 'googleplex-android-review.googlesource.com/35921281', 'googleplex-android-review.googlesource.com/35805220'] into 25Q4-release.

Change-Id: I211db50568d681cf4121c43e90e0719729324caf
parents b7ca87d5 c208182d
Loading
Loading
Loading
Loading
+0 −22
Original line number Original line Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2018 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<resources>
    <style name="TextAppearance.Toast">
        <item name="fontFamily">roboto</item>
        <item name="textSize">15sp</item>
    </style>
</resources>
 No newline at end of file
+6 −6
Original line number Original line Diff line number Diff line
@@ -129,6 +129,7 @@ public class BackAnimationController implements RemoteCallable<BackAnimationCont
    private boolean mOnBackStartDispatched = false;
    private boolean mOnBackStartDispatched = false;
    private boolean mThresholdCrossed = false;
    private boolean mThresholdCrossed = false;
    private boolean mPointersPilfered = false;
    private boolean mPointersPilfered = false;
    private boolean mBackAnimationTriggered = false;
    private final boolean mRequirePointerPilfer;
    private final boolean mRequirePointerPilfer;


    /** Registry for the back animations */
    /** Registry for the back animations */
@@ -480,9 +481,10 @@ public class BackAnimationController implements RemoteCallable<BackAnimationCont
            return;
            return;
        }
        }
        mShellExecutor.execute(() -> {
        mShellExecutor.execute(() -> {
            if (!shouldDispatchToAnimator()) {
            if (mBackAnimationTriggered || !shouldDispatchToAnimator()) {
                return;
                return;
            }
            }
            mBackAnimationTriggered = true;
            boolean started;
            boolean started;
            try {
            try {
                started = mActivityTaskManager.startPredictiveBackAnimation();
                started = mActivityTaskManager.startPredictiveBackAnimation();
@@ -554,14 +556,10 @@ public class BackAnimationController implements RemoteCallable<BackAnimationCont
                        onThresholdCrossed();
                        onThresholdCrossed();
                    }
                    }
                    mShouldStartOnNextMoveEvent = false;
                    mShouldStartOnNextMoveEvent = false;
                } else {
                    if (predictiveBackDelayWmTransition()) {
                        onGestureStarted(touchX, touchY, swipeEdge);
                } else {
                } else {
                    mShouldStartOnNextMoveEvent = true;
                    mShouldStartOnNextMoveEvent = true;
                }
                }
            }
            }
            }
        } else if (keyAction == MotionEvent.ACTION_MOVE) {
        } else if (keyAction == MotionEvent.ACTION_MOVE) {
            if (!mBackGestureStarted && mShouldStartOnNextMoveEvent) {
            if (!mBackGestureStarted && mShouldStartOnNextMoveEvent) {
                // Let the animation initialized here to make sure the onPointerDownOutsideFocus
                // Let the animation initialized here to make sure the onPointerDownOutsideFocus
@@ -612,6 +610,7 @@ public class BackAnimationController implements RemoteCallable<BackAnimationCont
            startSystemAnimation();
            startSystemAnimation();
        } else {
        } else {
            startBackNavigation(touchTracker);
            startBackNavigation(touchTracker);
            startPredictiveBackAnimationIfNeeded();
        }
        }
    }
    }


@@ -899,6 +898,7 @@ public class BackAnimationController implements RemoteCallable<BackAnimationCont
        // Reset gesture states.
        // Reset gesture states.
        mThresholdCrossed = false;
        mThresholdCrossed = false;
        mPointersPilfered = false;
        mPointersPilfered = false;
        mBackAnimationTriggered = false;
        mBackGestureStarted = false;
        mBackGestureStarted = false;
        activeTouchTracker.setState(BackTouchTracker.TouchTrackerState.FINISHED);
        activeTouchTracker.setState(BackTouchTracker.TouchTrackerState.FINISHED);
        mTransitionIdleRunner.mRequestCount = 0;
        mTransitionIdleRunner.mRequestCount = 0;
+41 −0
Original line number Original line Diff line number Diff line
@@ -360,6 +360,47 @@ public class BackAnimationControllerTest extends ShellTestCase {
        verify(mActivityTaskManager, times(1)).startBackNavigation(any(), any());
        verify(mActivityTaskManager, times(1)).startBackNavigation(any(), any());
    }
    }


    // Delay starting gesture tracking to allow the system to receive onPointerDownOutsideFocus
    // first. This is critical for interactions in multi-windowing mode.
    @Test
    public void noStartBackNavigationWhenActionDown() throws RemoteException {
        registerAnimation(BackNavigationInfo.TYPE_RETURN_TO_HOME);
        createNavigationInfo(BackNavigationInfo.TYPE_RETURN_TO_HOME,
                /* enableAnimation = */ true,
                /* isAnimationCallback = */ false);
        doMotionEvent(MotionEvent.ACTION_DOWN, 0);
        verify(mActivityTaskManager, never()).startBackNavigation(any(), any());
        doMotionEvent(MotionEvent.ACTION_MOVE, 100);
        verify(mActivityTaskManager).startBackNavigation(any(), any());
    }

    @EnableFlags(Flags.FLAG_PREDICTIVE_BACK_DELAY_WM_TRANSITION)
    @Test
    public void ensureStartBackAnimation_ThresholdBeforeStartBackNavigation()
            throws RemoteException {
        registerAnimation(BackNavigationInfo.TYPE_RETURN_TO_HOME);
        createNavigationInfo(BackNavigationInfo.TYPE_RETURN_TO_HOME,
                /* enableAnimation = */ true,
                /* isAnimationCallback = */ false);
        doMotionEvent(MotionEvent.ACTION_DOWN, 0);
        mController.onThresholdCrossed();
        doMotionEvent(MotionEvent.ACTION_MOVE, 100);
        mShellExecutor.flushAll();
        verify(mActivityTaskManager).startPredictiveBackAnimation();
    }

    @EnableFlags(Flags.FLAG_PREDICTIVE_BACK_DELAY_WM_TRANSITION)
    @Test
    public void ensureStarBackAnimation_ThresholdAfterStartBackNavigation() throws RemoteException {
        registerAnimation(BackNavigationInfo.TYPE_RETURN_TO_HOME);
        createNavigationInfo(BackNavigationInfo.TYPE_RETURN_TO_HOME,
                /* enableAnimation = */ true,
                /* isAnimationCallback = */ false);
        doStartEvents(0, 100);
        mShellExecutor.flushAll();
        verify(mActivityTaskManager).startPredictiveBackAnimation();
    }

    @Test
    @Test
    public void backToHome_dispatchesEvents() throws RemoteException {
    public void backToHome_dispatchesEvents() throws RemoteException {
        registerAnimation(BackNavigationInfo.TYPE_RETURN_TO_HOME);
        registerAnimation(BackNavigationInfo.TYPE_RETURN_TO_HOME);
+1 −1
Original line number Original line Diff line number Diff line
@@ -130,7 +130,7 @@ fun BiometricPromptFallbackView(promptViewModel: PromptViewModel, callback: Spag
            }
            }
            Spacer(modifier = Modifier.height(16.dp))
            Spacer(modifier = Modifier.height(16.dp))
            Column(
            Column(
                modifier = Modifier.fillMaxWidth().verticalScroll(scrollState).weight(1f),
                modifier = Modifier.fillMaxWidth().verticalScroll(scrollState),
                verticalArrangement = Arrangement.spacedBy(2.dp),
                verticalArrangement = Arrangement.spacedBy(2.dp),
            ) {
            ) {
                val options = mutableListOf<@Composable (Int, Int) -> Unit>()
                val options = mutableListOf<@Composable (Int, Int) -> Unit>()
+1 −0
Original line number Original line Diff line number Diff line
@@ -328,6 +328,7 @@ constructor(
                        R.dimen.hover_system_icons_container_padding_bottom
                        R.dimen.hover_system_icons_container_padding_bottom
                    ),
                    ),
                )
                )
                statusBarIconController.refreshIconGroup(iconManager)
            }
            }


            override fun onDensityOrFontScaleChanged() {
            override fun onDensityOrFontScaleChanged() {
Loading