Bug 1360670 - Remove the PROCESS_TEXT intent from the search activity r?jhan
remove PROCESS_TEXT intent filter from search widget, remove related code.
MozReview-Commit-ID: 9MGDwDASzWP
--- a/mobile/android/search/java/org/mozilla/search/SearchActivity.java
+++ b/mobile/android/search/java/org/mozilla/search/SearchActivity.java
@@ -214,25 +214,17 @@ public class SearchActivity extends Loca
}
@Nullable
private String extractQuery(Bundle bundle) {
if (bundle == null) {
return null;
}
- String queryString = (String) bundle.getCharSequence("android.intent.extra.PROCESS_TEXT_READONLY");;
- if (TextUtils.isEmpty(queryString)) {
- queryString = (String) bundle.getCharSequence("android.intent.extra.PROCESS_TEXT");
- }
- if (TextUtils.isEmpty(queryString)) {
- queryString = bundle.getString(KEY_QUERY);
- }
-
- return queryString;
+ return bundle.getString(KEY_QUERY);
}
@Override
protected void onDestroy() {
super.onDestroy();
searchEngineManager.unregisterListeners();
engine = null;
suggestionsFragment = null;
--- a/mobile/android/search/manifests/SearchAndroidManifest_activities.xml.in
+++ b/mobile/android/search/manifests/SearchAndroidManifest_activities.xml.in
@@ -12,21 +12,16 @@
<action android:name="android.intent.action.SEARCH"/>
<action android:name="android.intent.action.SEARCH_LONG_PRESS"/>
<action android:name="android.intent.action.WEB_SEARCH"/>
<action android:name="com.google.android.gms.actions.SEARCH_ACTION"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
- <intent-filter>
- <action android:name="android.intent.action.PROCESS_TEXT"/>
- <data android:mimeType="text/plain"/>
- </intent-filter>
-
<!-- Pre Lollipop devices display a generic search icon, if none is
provided here. To use this we need to set the resource to 0.
For Lollipop and later the search launcher icon ist used.
To retrieve the resource value the Bundle.getInt() method is
used, so we use integer resources instead of drawables, because
setting a drawable referenced to 0 results in errors when used
as a real drawable resource somewhere else. -->
<meta-data