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

Commit 30e0597a authored by Tracy Zhou's avatar Tracy Zhou Committed by Android (Google) Code Review
Browse files

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

parents 94de34ce 42cfe214
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));