Commit 78b6b132 authored by gogerald's avatar gogerald Committed by Commit Bot

[StartSurface] Fix new tab button color on the start surface in incognito mode

Note that isGridTabSwitcherEnabled is already return true when the
start surface is enabled but not isStartSurfaceStackTabSwitcherEnabled

This CL adds missed changes in
https://chromium-review.googlesource.com/c/chromium/src/+/2173118

Screenshots:
https://drive.google.com/file/d/1WaqU4-N9jYOVC62eMvgOnGlQAwLzJphI/view?usp=sharing
https://drive.google.com/file/d/1uVFGZYEIguGQNlNOWjTSJCHOx5CdBFuK/view?usp=sharing

Bug: 1076449
Change-Id: Ib70134dee8d3e12f204716394c4263bb976dfbb7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2209391Reviewed-by: default avatarYusuf Ozuysal <yusufo@chromium.org>
Commit-Queue: Ganggui Tang <gogerald@chromium.org>
Auto-Submit: Ganggui Tang <gogerald@chromium.org>
Cr-Commit-Position: refs/heads/master@{#772431}
parent 7bc2e6a2
......@@ -18,6 +18,7 @@ import org.chromium.chrome.R;
import org.chromium.chrome.browser.device.DeviceClassManager;
import org.chromium.chrome.browser.tasks.tab_management.TabUiFeatureUtilities;
import org.chromium.chrome.browser.toolbar.IncognitoStateProvider.IncognitoStateObserver;
import org.chromium.chrome.features.start_surface.StartSurfaceConfiguration;
import org.chromium.ui.base.DeviceFormFactor;
import org.chromium.ui.widget.ChromeImageButton;
import org.chromium.ui.widget.Toast;
......@@ -86,7 +87,8 @@ public class NewTabButton
final boolean shouldUseLightMode =
DeviceFormFactor.isNonMultiDisplayContextOnTablet(getContext())
|| ((DeviceClassManager.enableAccessibilityLayout()
|| TabUiFeatureUtilities.isGridTabSwitcherEnabled())
|| TabUiFeatureUtilities.isGridTabSwitcherEnabled()
|| StartSurfaceConfiguration.isStartSurfaceEnabled())
&& mIsIncognito);
ApiCompatibilityUtils.setImageTintList(
this, shouldUseLightMode ? mLightModeTint : mDarkModeTint);
......
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