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

Commit 42cfe214 authored by Tracy Zhou's avatar Tracy Zhou
Browse files

Do not tint task/nav bar icons in folded state when task bar on phones is enabled

This logic will be handled by TaskbarTransitions instead.

Bug: 349155860
Test: Make sure the buttons don't dim after going to an app in folded, when taskbarOnPhones is enabled.
Flag: com.android.wm.shell.enable_taskbar_on_phones
Change-Id: Ie8efa5c096123935458eb3bb451ace35e8914a30
parent 170092ef
Loading
Loading
Loading
Loading
+14 −8
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@ import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_Q
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_SCREEN_PINNING;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_SHORTCUT_HELPER_SHOWING;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_VOICE_INTERACTION_WINDOW_SHOWING;
import static com.android.wm.shell.Flags.enableTaskbarOnPhones;

import android.animation.ArgbEvaluator;
import android.animation.ObjectAnimator;
@@ -678,14 +679,19 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT
                mLightIconColorOnHome,
                mDarkIconColorOnHome);

        final int iconColor;
        if (ENABLE_TASKBAR_NAVBAR_UNIFICATION && enableTaskbarOnPhones()
                && mContext.isPhoneMode()) {
            iconColor = sysUiNavButtonIconColorOnHome;
        } else {
            // Override the color from framework if nav buttons are over an opaque Taskbar surface.
        final int iconColor = (int) argbEvaluator.evaluate(
                mOnBackgroundNavButtonColorOverrideMultiplier.value
                        * Math.max(
            iconColor = (int) argbEvaluator.evaluate(
                    mOnBackgroundNavButtonColorOverrideMultiplier.value * Math.max(
                            mOnTaskbarBackgroundNavButtonColorOverride.value,
                            mSlideInViewVisibleNavButtonColorOverride.value),
                    sysUiNavButtonIconColorOnHome,
                    mOnBackgroundIconColor);
        }

        for (ImageView button : mAllButtons) {
            button.setImageTintList(ColorStateList.valueOf(iconColor));