Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3640)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivity.java

Issue 2816733003: 🔍 Update how shared preferences are handled by the widget (Closed)
Patch Set: Ugh eclipse Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivity.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivity.java
index deeb6a1b76a8530722efb9808dd143de33229f90..84d23c9ba249f0c0fe37d73ddba466164c45ef63 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivity.java
@@ -7,20 +7,17 @@ package org.chromium.chrome.browser.searchwidget;
import android.content.Intent;
import android.net.Uri;
import android.os.Handler;
-import android.support.customtabs.CustomTabsIntent;
import android.support.v4.app.ActivityOptionsCompat;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
-import org.chromium.base.ContextUtils;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.IntentHandler;
import org.chromium.chrome.browser.WebContentsFactory;
import org.chromium.chrome.browser.WindowDelegate;
import org.chromium.chrome.browser.customtabs.CustomTabsConnection;
-import org.chromium.chrome.browser.document.ChromeLauncherActivity;
import org.chromium.chrome.browser.init.AsyncInitializationActivity;
import org.chromium.chrome.browser.init.ChromeBrowserInitializer;
import org.chromium.chrome.browser.omnibox.AutocompleteController;
@@ -171,22 +168,12 @@ public class SearchActivity extends AsyncInitializationActivity
// resending a queued query after the user deleted it.
if (TextUtils.isEmpty(url)) return;
- // Fix up the URL and send it to a tab.
+ // Fix up the URL and send it to the full browser.
String fixedUrl = UrlFormatter.fixupUrl(url);
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(fixedUrl));
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_NEW_DOCUMENT);
-
- boolean useHerbTab = ContextUtils.getAppSharedPreferences().getBoolean(
- SearchWidgetProvider.PREF_USE_HERB_TAB, false);
- if (useHerbTab) {
- intent = ChromeLauncherActivity.createCustomTabActivityIntent(this, intent, true);
- intent.putExtra(CustomTabsIntent.EXTRA_TITLE_VISIBILITY_STATE,
- CustomTabsIntent.SHOW_PAGE_TITLE);
- } else {
- intent.setPackage(getPackageName());
- IntentHandler.addTrustedIntentExtras(intent);
- }
-
+ intent.setPackage(getPackageName());
+ IntentHandler.addTrustedIntentExtras(intent);
IntentUtils.safeStartActivity(this, intent,
ActivityOptionsCompat
.makeCustomAnimation(this, android.R.anim.fade_in, android.R.anim.fade_out)

Powered by Google App Engine
This is Rietveld 408576698