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

Commit 36635f19 authored by Andy Wickham's avatar Andy Wickham
Browse files

Honors three_button_corner_swipe flag.

This allows the corner swipe gesture to be recognized while in 3
button navigation mode.

Demo: https://drive.google.com/file/d/1cwma-K5Ht-CYYmFgHw4OgefCS8Zvp140/view?usp=drive_link&resourcekey=0-rYzpTFc0l8R53QnaLwBANg
 - Corner swipe works
 - Other swipes don't do anything
 - Buttons still behave as expected
 - Long Press Home still invokes Circle to Search

Bug: 361651619
Bug: 356441231
Test: See video
Flag: com.android.systemui.shared.three_button_corner_swipe
Change-Id: Ia9f196b7710239d01094ccb7d2725c6815d6f502
parent ad71615f
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -74,6 +74,7 @@ import com.android.systemui.navigationbar.gestural.EdgeBackGestureHandler;
import com.android.systemui.recents.OverviewProxyService;
import com.android.systemui.settings.DisplayTracker;
import com.android.systemui.settings.UserTracker;
import com.android.systemui.shared.Flags;
import com.android.systemui.shared.rotation.RotationPolicyUtil;
import com.android.systemui.shared.statusbar.phone.BarTransitions.TransitionMode;
import com.android.systemui.shared.system.QuickStepContract;
@@ -482,9 +483,11 @@ public final class NavBarHelper implements
                Settings.Secure.ASSIST_TOUCH_GESTURE_ENABLED, gestureDefault ? 1 : 0,
                mUserTracker.getUserId()) != 0;

        boolean supportsSwipeGesture = QuickStepContract.isGesturalMode(mNavBarMode)
                || (QuickStepContract.isLegacyMode(mNavBarMode) && Flags.threeButtonCornerSwipe());
        mAssistantAvailable = assistantAvailableForUser
                && mAssistantTouchGestureEnabled
                && QuickStepContract.isGesturalMode(mNavBarMode);
                && supportsSwipeGesture;
        dispatchAssistantEventUpdate(mAssistantAvailable, mLongPressHomeEnabled);
    }