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

Commit f9e30270 authored by Winson Chung's avatar Winson Chung
Browse files

Update onboarding based on swipe up state

- We now use the fallback activity for the existing nav layout, which means
  that we are always bound. We should update the onboarding listener when
  the interaction flags change as well.

Bug: 76309872
Test: Manual
Change-Id: Ib6ad10e9e767adf2e305d8a0a2074516961a60c4
parent a1ff74c6
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -171,7 +171,7 @@ public class NavigationBarFragment extends Fragment implements Callbacks {
    private final OverviewProxyListener mOverviewProxyListener = new OverviewProxyListener() {
        @Override
        public void onConnectionChanged(boolean isConnected) {
            mNavigationBarView.onOverviewProxyConnectionChanged(isConnected);
            mNavigationBarView.updateStates();
            updateScreenPinningGestures();
            WindowManagerWrapper.getInstance()
                    .setNavBarVirtualKeyHapticFeedbackEnabled(!isConnected);
@@ -188,6 +188,7 @@ public class NavigationBarFragment extends Fragment implements Callbacks {
        @Override
        public void onInteractionFlagsChanged(@InteractionType int flags) {
            mNavigationBarView.updateStates();
            updateScreenPinningGestures();
        }
    };

+2 −6
Original line number Diff line number Diff line
@@ -681,6 +681,7 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav
        updateSlippery();
        reloadNavIcons();
        updateNavButtonIcons();
        setUpSwipeUpOnboarding(isQuickStepSwipeUpEnabled());
    }

    private void updateSlippery() {
@@ -816,11 +817,6 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav
        }
    }

    public void onOverviewProxyConnectionChanged(boolean isConnected) {
        updateStates();
        setUpSwipeUpOnboarding(isQuickStepSwipeUpEnabled());
    }

    @Override
    protected void onDraw(Canvas canvas) {
        mGestureHelper.onDraw(canvas);
@@ -1038,7 +1034,7 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav
        onPluginDisconnected(null); // Create default gesture helper
        Dependency.get(PluginManager.class).addPluginListener(this,
                NavGesture.class, false /* Only one */);
        setUpSwipeUpOnboarding(mOverviewProxyService.getProxy() != null);
        setUpSwipeUpOnboarding(isQuickStepSwipeUpEnabled());
    }

    @Override