Commit 16f4007a authored by Jinsuk Kim's avatar Jinsuk Kim Committed by Commit Bot

Android: Ensure gesture navigation shows close indicator correctly

Occasionally the close indicator does not appear when left swipe exits
the app. The condition for exiting (minimizing) app had a bug not
reflecting the tab launch type (when launched from an external app).
This CL rectifies the condition.

Bug: 988546
Change-Id: I8bc93f48400dbf831c998806c7d00de61030b76e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1730294Reviewed-by: default avatarTed Choc <tedchoc@chromium.org>
Commit-Queue: Jinsuk Kim <jinsukkim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#683790}
parent 79d85bd3
......@@ -7,6 +7,7 @@ package org.chromium.chrome.browser.gesturenav;
import android.os.Handler;
import org.chromium.chrome.browser.tab.Tab;
import org.chromium.chrome.browser.tab.TabAssociatedApp;
/**
* Implementation of {@link NavigationHandler#ActionDelegate} that works with
......@@ -40,6 +41,8 @@ public class TabbedActionDelegate implements NavigationHandler.ActionDelegate {
@Override
public boolean willBackExitApp() {
return !mTab.canGoBack() && !mTab.getActivity().backShouldCloseTab(mTab);
return !mTab.canGoBack()
&& (!mTab.getActivity().backShouldCloseTab(mTab)
|| TabAssociatedApp.isOpenedFromExternalApp(mTab));
}
}
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