Bug 1423566 - Hide tabs tray when receiving an Assist App intent. r=nechen
authorJan Henning <jh+bugzilla@buttercookie.de>
Fri, 05 Jan 2018 17:33:06 +0100
changeset 398179 2837beb133208466c90650d4c3fc6b7c9233882c
parent 398178 d1753698af2a8b171939333acc6fc47f8bb3b48d
child 398180 827dbe8a6f8131c4e6f9794312a91b2a88c2f2e8
push id33211
push userbtara@mozilla.com
push dateMon, 08 Jan 2018 22:02:30 +0000
treeherdermozilla-central@cd0a659c0263 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnechen
bugs1423566
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1423566 - Hide tabs tray when receiving an Assist App intent. r=nechen We're still somewhat undecided on how to exactly handle external intents arriving while the tabs tray is open, however in the case of Assist App intents - opening a new tab in editing mode while the tabs tray remains open causes some weird behaviour (the keyboard appears in front of the tabs tray and no matter which tab is selected on the tabs tray, you first enter editing mode and then always end up in the tab opened by the Assist App intent) - the goal of our Assist App intent handling is to allow the user to enter a search query or an address into the URL bar hence we should hide the tabs tray (if open) when handling such an intent. MozReview-Commit-ID: GpwrscdNjZP
mobile/android/base/java/org/mozilla/gecko/GeckoApp.java
--- a/mobile/android/base/java/org/mozilla/gecko/GeckoApp.java
+++ b/mobile/android/base/java/org/mozilla/gecko/GeckoApp.java
@@ -1781,16 +1781,17 @@ public abstract class GeckoApp extends G
                     if (isFirstTab) {
                         flags |= Tabs.LOADURL_FIRST_AFTER_ACTIVITY_UNHIDDEN;
                     }
                     Tabs.getInstance().loadUrlWithIntentExtras(url, intent, flags);
                 }
             });
         } else if (Intent.ACTION_ASSIST.equals(action)) {
             Tabs.getInstance().addTab(Tabs.LOADURL_START_EDITING | Tabs.LOADURL_EXTERNAL);
+            autoHideTabs();
         } else if (ACTION_HOMESCREEN_SHORTCUT.equals(action)) {
             final GeckoBundle data = new GeckoBundle(2);
             data.putString("uri", uri);
             data.putString("flags", "OPEN_SWITCHTAB");
             getAppEventDispatcher().dispatch("Tab:OpenUri", data);
         } else if (Intent.ACTION_SEARCH.equals(action)) {
             final GeckoBundle data = new GeckoBundle(2);
             data.putString("uri", uri);