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

Avoid Grid tab switcher from showing a broken blank page

When the last tab is closed outside of the Grid tab switcher UI, for
example, after tapping "close all incognito tabs" from Android
notification, exit clank to avoid staying in a broken state.

Bug: 1028893
Change-Id: Id8a289f578430f330c0af44916d10c52e51404ef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2024275Reviewed-by: default avatarDavid Trainor <dtrainor@chromium.org>
Commit-Queue: Wei-Yin Chen (陳威尹) <wychen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#735707}
parent 546fff65
...@@ -568,12 +568,12 @@ public class ChromeTabbedActivity extends ChromeActivity { ...@@ -568,12 +568,12 @@ public class ChromeTabbedActivity extends ChromeActivity {
} }
// TODO(960196) : remove this when the associated bug fix. This is a band-aid // TODO(960196) : remove this when the associated bug fix. This is a band-aid
// fix for Tabgroups and closing tabs with TabGroupUi. // fix for TabGrid and closing tabs with TabGroupUi.
// If one of the following is true, then exit Chrome when TabGroupsAndroid is // If one of the following is true, then exit Chrome when TabGroupsAndroid is
// enabled, and tab switcher is not shown: // enabled, and tab switcher is not shown:
// 1. If the very last tab is closed. // 1. If the very last tab is closed.
// 2. If normal tab model is selected and no normal tabs. // 2. If normal tab model is selected and no normal tabs.
if (FeatureUtilities.isTabGroupsAndroidEnabled() if (FeatureUtilities.isGridTabSwitcherEnabled()
&& !mOverviewModeController.overviewVisible()) { && !mOverviewModeController.overviewVisible()) {
if (getTabModelSelector().getTotalTabCount() == 0 if (getTabModelSelector().getTotalTabCount() == 0
|| (!getTabModelSelector().isIncognitoSelected() || (!getTabModelSelector().isIncognitoSelected()
......
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