Bug 1339921 - Clicking the "New Tab" icon from the widget should always show the newly opened tab
Add check for open tabs panel when opening url from external app
MozReview-Commit-ID: 2HVzZaIa9yl
--- a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
+++ b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
@@ -3872,16 +3872,21 @@ public class BrowserApp extends GeckoApp
final boolean isBookmarkAction = GeckoApp.ACTION_HOMESCREEN_SHORTCUT.equals(action);
final boolean isTabQueueAction = TabQueueHelper.LOAD_URLS_ACTION.equals(action);
final boolean isViewMultipleAction = ACTION_VIEW_MULTIPLE.equals(action);
if (mInitialized && (isViewAction || isBookmarkAction)) {
// Dismiss editing mode if the user is loading a URL from an external app.
mBrowserToolbar.cancelEdit();
+ // Dismiss tabs panel if the user is loading a URL from an external app.
+ if (areTabsShown()) {
+ mTabsPanel.hide();
+ }
+
// Hide firstrun-pane if the user is loading a URL from an external app.
hideFirstrunPager(TelemetryContract.Method.NONE);
if (isBookmarkAction) {
// GeckoApp.ACTION_HOMESCREEN_SHORTCUT means we're opening a bookmark that
// was added to Android's homescreen.
Telemetry.sendUIEvent(TelemetryContract.Event.LOAD_URL, TelemetryContract.Method.HOMESCREEN);
}