Bug 1423566 - Hide tabs tray when receiving an Assist App intent. r?nechen draft
authorJan Henning <jh+bugzilla@buttercookie.de>
Fri, 05 Jan 2018 17:33:06 +0100
changeset 716404 ae068cac8b19090a7a1ce6718ade920ad1ac9d48
parent 716381 547208db0c36b0313b2b99529234080165fece14
child 716424 4b138ea6c56642bed5b902814cd7535c50c7888c
child 716430 02a571bef41855e5151c4ee5dd5c931fdca4bb25
push id94431
push usermozilla@buttercookie.de
push dateFri, 05 Jan 2018 18:00:54 +0000
reviewersnechen
bugs1423566
milestone59.0a1
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);