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

Commit 4b9636fb authored by Ajinkya Chalke's avatar Ajinkya Chalke
Browse files

Update TaskbarDelegate to only set default display flags

- Some flags in TaskbarDelegate are not per display so end up getting overriden in methods that are displayId specific.
- The mDisabledFlags isn't set for non primary displays as a result TaskbarDelegate set the flag to 0 when a display is connected. And then TaskbarDelegate updated the SysUIState causing the state to be wrong and also impacting connected displays SysUIState.
- So, updated TaskbarState to only store and apply these flags to SysUIState for primary display.

Fix: 430559029
Test: m
Flag: EXEMPT minor refactor / bug fix
Change-Id: I2505d83222d3818af710537628394e4c2daed156
parent 9a99d9ce
Loading
Loading
Loading
Loading
+14 −6
Original line number Diff line number Diff line
@@ -504,6 +504,10 @@ public class TaskbarDelegate implements CommandQueue.Callbacks,
    @Override
    public void setImeWindowStatus(int displayId, @ImeWindowVisibility int vis,
            @BackDispositionMode int backDisposition, boolean showImeSwitcher) {
        if (displayId != mDefaultDisplayId) {
            return;
        }

        final boolean isImeVisible = mNavBarHelper.isImeVisible(vis);
        final int flags = Utilities.updateNavbarFlagsFromIme(mNavbarFlags, backDisposition,
                isImeVisible, showImeSwitcher);
@@ -532,8 +536,10 @@ public class TaskbarDelegate implements CommandQueue.Callbacks,

    @Override
    public void disable(int displayId, int state1, int state2, boolean animate) {
        if (displayId == mDefaultDisplayId) {
            mDisabledFlags = state1;
            updateSysuiFlags();
        }
        mLauncherProxyService.disable(displayId, state1, state2, animate);
    }

@@ -543,16 +549,18 @@ public class TaskbarDelegate implements CommandQueue.Callbacks,
            @InsetsType int requestedVisibleTypes, String packageName,
            LetterboxDetails[] letterboxDetails) {
        mLauncherProxyService.onSystemBarAttributesChanged(displayId, behavior);
        if (displayId != mDefaultDisplayId) {
            return;
        }

        boolean nbModeChanged = false;
        if (mAppearance != appearance) {
            mAppearance = appearance;
            nbModeChanged = updateTransitionMode(
                    transitionMode(mTaskbarTransientShowing, appearance));
        }
        if (displayId == mDefaultDisplayId) {
        mLightBarController.onNavigationBarAppearanceChanged(appearance, nbModeChanged,
                mTransitionMode, navbarColorManagedByIme);
        }
        if (mBehavior != behavior) {
            mBehavior = behavior;
            updateSysuiFlags();