Commit f0e603f8 authored by Michael Thiessen's avatar Michael Thiessen Committed by Commit Bot

Disable Close from CCT toolbar in notouch mode

Bug: 941690
Change-Id: I45e8c531f63a7634ed77946032a3dd0fb10680be
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1595977Reviewed-by: default avatarYaron Friedman <yfriedman@chromium.org>
Commit-Queue: Michael Thiessen <mthiesse@chromium.org>
Cr-Commit-Position: refs/heads/master@{#657517}
parent 9a2945ab
......@@ -82,6 +82,7 @@ import org.chromium.chrome.browser.tabmodel.TabModelSelectorImpl;
import org.chromium.chrome.browser.toolbar.ToolbarManager;
import org.chromium.chrome.browser.toolbar.top.ToolbarControlContainer;
import org.chromium.chrome.browser.util.ColorUtils;
import org.chromium.chrome.browser.util.FeatureUtilities;
import org.chromium.chrome.browser.util.IntentUtils;
import org.chromium.content_public.browser.LoadUrlParams;
import org.chromium.content_public.browser.NavigationController;
......@@ -257,9 +258,11 @@ public class CustomTabActivity extends ChromeActivity<CustomTabActivityComponent
public void performPostInflationStartup() {
super.performPostInflationStartup();
getToolbarManager().setCloseButtonDrawable(mIntentDataProvider.getCloseButtonDrawable());
getToolbarManager().setShowTitle(mIntentDataProvider.getTitleVisibilityState()
== CustomTabsIntent.SHOW_PAGE_TITLE);
getToolbarManager().setCloseButtonDrawable(FeatureUtilities.isNoTouchModeEnabled()
? null
: mIntentDataProvider.getCloseButtonDrawable());
getToolbarManager().setShowTitle(
mIntentDataProvider.getTitleVisibilityState() == CustomTabsIntent.SHOW_PAGE_TITLE);
if (mConnection.shouldHideDomainForSession(mSession)) {
getToolbarManager().setUrlBarHidden(true);
}
......
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