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

Commit 402ca3e3 authored by Andy Wickham's avatar Andy Wickham Committed by Android (Google) Code Review
Browse files

Merge "Add animateNavBarLongPress to SystemUiProxy and ANIMATE_LPNH flag" into main

parents 7bfdf504 24a50df1
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -401,6 +401,17 @@ public class SystemUiProxy implements ISystemUiProxy {
        }
    }

    @Override
    public void animateNavBarLongPress(boolean isTouchDown, long durationMs) {
        if (mSystemUiProxy != null) {
            try {
                mSystemUiProxy.animateNavBarLongPress(isTouchDown, durationMs);
            } catch (RemoteException e) {
                Log.w(TAG, "Failed call animateNavBarLongPress", e);
            }
        }
    }

    @Override
    public void notifyAccessibilityButtonClicked(int displayId) {
        if (mSystemUiProxy != null) {
+0 −2
Original line number Diff line number Diff line
@@ -38,7 +38,6 @@ public class NavHandleLongPressInputConsumer extends DelegateInputConsumer {
    private final NavHandleLongPressHandler mNavHandleLongPressHandler;
    private final float mNavHandleWidth;
    private final float mScreenWidth;
    private final ViewConfiguration mViewConfiguration;

    private final Runnable mTriggerLongPress = this::triggerLongPress;
    private final float mTouchSlopSquared;
@@ -49,7 +48,6 @@ public class NavHandleLongPressInputConsumer extends DelegateInputConsumer {
    public NavHandleLongPressInputConsumer(Context context, InputConsumer delegate,
            InputMonitorCompat inputMonitor, RecentsAnimationDeviceState deviceState) {
        super(delegate, inputMonitor);
        mViewConfiguration = ViewConfiguration.get(context);
        mNavHandleWidth = context.getResources().getDimensionPixelSize(
                R.dimen.navigation_home_handle_width);
        mScreenWidth = DisplayController.INSTANCE.get(context).getInfo().currentSize.x;
+4 −0
Original line number Diff line number Diff line
@@ -119,6 +119,10 @@ public final class FeatureFlags {
            getReleaseFlag(301680992, "CUSTOM_LPNH_THRESHOLDS", DISABLED,
                    "Add dev options to customize the LPNH trigger slop and milliseconds");

    public static final BooleanFlag ANIMATE_LPNH =
            getReleaseFlag(308693847, "ANIMATE_LPNH", TEAMFOOD,
                    "Animates navbar when long pressing");

    public static final IntFlag LPNH_SLOP_PERCENTAGE =
            getIntFlag(301680992, "LPNH_SLOP_PERCENTAGE", 100,
                    "Controls touch slop percentage for lpnh");