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

Commit af41da9d authored by Tracy Zhou's avatar Tracy Zhou
Browse files

Hook up luma sampling state change from CommandQueue

Bug: 230395757
Test: Swipe up from maps. Make sure the bar color doesn't change during transition to overview
Change-Id: I392ef6de6fbd87ef6f50cc591f1ade04a2817011
parent 6cb651b1
Loading
Loading
Loading
Loading
+19 −14
Original line number Diff line number Diff line
@@ -88,6 +88,11 @@ oneway interface IOverviewProxy {
     */
    void onNavButtonsDarkIntensityChanged(float darkIntensity) = 22;

    /**
     * Sent when when navigation bar luma sampling is enabled or disabled.
     */
    void onNavigationBarLumaSamplingEnabled(int displayId, boolean enable) = 23;

    /**
     * Sent when split keyboard shortcut is triggered to enter stage split.
     */
+0 −6
Original line number Diff line number Diff line
@@ -302,9 +302,6 @@ public class NavigationBarControllerImpl implements
            final NavigationBarView navBarView = getNavigationBarView(displayId);
            if (navBarView != null) {
                navBarView.showPinningEnterExitToast(entering);
            } else if (displayId == mDisplayTracker.getDefaultDisplayId()
                    && mTaskbarDelegate.isInitialized()) {
                mTaskbarDelegate.showPinningEnterExitToast(entering);
            }
        }

@@ -314,9 +311,6 @@ public class NavigationBarControllerImpl implements
            final NavigationBarView navBarView = getNavigationBarView(displayId);
            if (navBarView != null) {
                navBarView.showPinningEscapeToast();
            } else if (displayId == mDisplayTracker.getDefaultDisplayId()
                    && mTaskbarDelegate.isInitialized()) {
                mTaskbarDelegate.showPinningEscapeToast();
            }
        }
    };
+5 −0
Original line number Diff line number Diff line
@@ -503,6 +503,11 @@ public class TaskbarDelegate implements CommandQueue.Callbacks,
        mEdgeBackGestureHandler.onConfigurationChanged(configuration);
    }

    @Override
    public void setNavigationBarLumaSamplingEnabled(int displayId, boolean enable) {
        mOverviewProxyService.onNavigationBarLumaSamplingEnabled(displayId, enable);
    }

    @Override
    public void showPinningEnterExitToast(boolean entering) {
        updateSysuiFlags();
+13 −0
Original line number Diff line number Diff line
@@ -1037,6 +1037,19 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis
        }
    }

    public void onNavigationBarLumaSamplingEnabled(int displayId, boolean enable) {
        try {
            if (mOverviewProxy != null) {
                mOverviewProxy.onNavigationBarLumaSamplingEnabled(displayId, enable);
            } else {
                Log.e(TAG_OPS, "Failed to get overview proxy to enable/disable nav bar luma"
                        + "sampling");
            }
        } catch (RemoteException e) {
            Log.e(TAG_OPS, "Failed to call onNavigationBarLumaSamplingEnabled()", e);
        }
    }

    private void updateEnabledState() {
        final int currentUser = mUserTracker.getUserId();
        mIsEnabled = mContext.getPackageManager().resolveServiceAsUser(mQuickStepIntent,