Commit c6707330 authored by Wei-Yin Chen (陳威尹)'s avatar Wei-Yin Chen (陳威尹) Committed by Commit Bot

Fix AppThemeColorProvider for GridTabSwitcher

isTabGroupsAndroidEnabled() implies isGridTabSwitcherEnabled(), and all
callers of isGridTabSwitcherEnabled() should also check
isTabGroupsAndroidEnabled().

There's no visual difference because all the affected code paths are
in the bottom toolbar, which is force disabled when
isTabGroupsAndroidEnabled() is on.

Bug: None
Change-Id: I35542d90c7c5e8c1d3c9c9effd7567e16e3f088e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1594734Reviewed-by: default avatarBecky Zhou <huayinz@chromium.org>
Reviewed-by: default avatarMatthew Jones <mdjones@chromium.org>
Commit-Queue: Wei-Yin Chen (陳威尹) <wychen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#659759}
parent 43c0455d
...@@ -84,7 +84,8 @@ public class AppThemeColorProvider extends ThemeColorProvider implements Incogni ...@@ -84,7 +84,8 @@ public class AppThemeColorProvider extends ThemeColorProvider implements Incogni
final boolean isAccessibilityEnabled = DeviceClassManager.enableAccessibilityLayout(); final boolean isAccessibilityEnabled = DeviceClassManager.enableAccessibilityLayout();
final boolean isHorizontalTabSwitcherEnabled = final boolean isHorizontalTabSwitcherEnabled =
ChromeFeatureList.isEnabled(ChromeFeatureList.HORIZONTAL_TAB_SWITCHER_ANDROID); ChromeFeatureList.isEnabled(ChromeFeatureList.HORIZONTAL_TAB_SWITCHER_ANDROID);
final boolean isTabGridEnabled = FeatureUtilities.isGridTabSwitcherEnabled(); final boolean isTabGridEnabled = FeatureUtilities.isGridTabSwitcherEnabled()
|| FeatureUtilities.isTabGroupsAndroidEnabled();
final boolean shouldUseIncognitoBackground = mIsIncognito final boolean shouldUseIncognitoBackground = mIsIncognito
&& (isAccessibilityEnabled || isHorizontalTabSwitcherEnabled || isTabGridEnabled && (isAccessibilityEnabled || isHorizontalTabSwitcherEnabled || isTabGridEnabled
|| !mIsOverviewVisible); || !mIsOverviewVisible);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment