Bug 1533645 Search widget can trigger the Tab Queue prompt r=petru
authorAndrei Lazar <andrei.a.lazar@softvision.ro>
Fri, 08 Mar 2019 20:10:36 +0000
changeset 521250 f3eb6ce8dc445d1c53b0a5868d8f2512a1cb6255
parent 521249 3dfbf1afd9a717cf19bee20e4ba5521919982793
child 521251 0d7f08e68f759804937c9014028bfb0afb816252
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspetru
bugs1533645
milestone67.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 1533645 Search widget can trigger the Tab Queue prompt r=petru Added a flag on the search widget intent in order to skip the tab queue prompt. Depends on D22314 Differential Revision: https://phabricator.services.mozilla.com/D22681
mobile/android/base/java/org/mozilla/gecko/search/SearchWidgetProvider.java
--- a/mobile/android/base/java/org/mozilla/gecko/search/SearchWidgetProvider.java
+++ b/mobile/android/base/java/org/mozilla/gecko/search/SearchWidgetProvider.java
@@ -14,16 +14,18 @@ import android.content.Intent;
 import android.net.Uri;
 import android.os.Bundle;
 import android.widget.RemoteViews;
 
 import org.mozilla.gecko.LauncherActivity;
 import org.mozilla.gecko.R;
 import org.mozilla.gecko.mma.MmaDelegate;
 
+import static org.mozilla.gecko.db.BrowserContract.SKIP_TAB_QUEUE_FLAG;
+
 public final class SearchWidgetProvider extends AppWidgetProvider {
     private static final int VOICE_INTENT_RC = 1;
     private static final int TEXT_INTENT_RC = 0;
     public static String INPUT_TYPE_KEY = "input";
 
     public enum InputType {
         VOICE,
         TEXT
@@ -103,16 +105,17 @@ public final class SearchWidgetProvider 
             return 5;
         }
     }
 
     private static Intent makeSearchIntent(Context context, InputType inputType) {
         final Intent intent = new Intent(context, LauncherActivity.class);
 
         intent.putExtra(INPUT_TYPE_KEY, inputType);
+        intent.putExtra(SKIP_TAB_QUEUE_FLAG, true);
         intent.setAction(Intent.ACTION_VIEW);
         intent.setData(Uri.parse("about:home"));
 
         return intent;
     }
 
     private static void setVoicePendingIntent(Context context, RemoteViews remoteViews) {
         final PendingIntent pendingIntent = PendingIntent.getActivity(context, VOICE_INTENT_RC,