summaryrefslogtreecommitdiffstats
path: root/core/java/android
diff options
context:
space:
mode:
authorBjorn Bringert <bringert@android.com>2009-10-01 09:57:33 +0100
committerBjorn Bringert <bringert@android.com>2009-10-01 09:57:33 +0100
commitb782a2f4f0a3072f2677f6f10fb255c77468ae66 (patch)
tree6df73726c6b934d58dc5dfe16b861e063c87d7dc /core/java/android
parent9825ec61b4a40ed92a5bb28019289e5bab9cfb56 (diff)
downloadframeworks_base-b782a2f4f0a3072f2677f6f10fb255c77468ae66.zip
frameworks_base-b782a2f4f0a3072f2677f6f10fb255c77468ae66.tar.gz
frameworks_base-b782a2f4f0a3072f2677f6f10fb255c77468ae66.tar.bz2
Remove globalSearch argument from triggerSearch()
API council says: "In reviewing the new triggerSearch API, we are concerned that applications could use the option to perform a global search to spam the user with frequent searches. We would like the global search option to be removed for now (not just hidden, but removed from the internal IPC API so that nobody can find this and abuse it). The rest of the API should be fine as long as it is restricted to local searches." Fixes http://b/editIssue?id=2158785 Change-Id: Ie69a9c0ab6373cc4427aab50606885bdede40585
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/app/Activity.java8
-rw-r--r--core/java/android/app/ISearchManager.aidl1
-rw-r--r--core/java/android/app/SearchManager.java9
-rw-r--r--core/java/android/server/search/SearchManagerService.java3
4 files changed, 5 insertions, 16 deletions
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index 9095ec9..49ebce3 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -2619,14 +2619,10 @@ public class Activity extends ContextThemeWrapper
* context here, in order to improve quality or specificity of its own
* searches. This data will be returned with SEARCH intent(s). Null if
* no extra data is required.
- * @param globalSearch If false, this will only launch the search that has been specifically
- * defined by the application (which is usually defined as a local search). If no default
- * search is defined in the current application or activity, no search will be launched.
- * If true, this will always launch a platform-global (e.g. web-based) search instead.
*/
- public void triggerSearch(String query, Bundle appSearchData, boolean globalSearch) {
+ public void triggerSearch(String query, Bundle appSearchData) {
ensureSearchManager();
- mSearchManager.triggerSearch(query, getComponentName(), appSearchData, globalSearch);
+ mSearchManager.triggerSearch(query, getComponentName(), appSearchData);
}
/**
diff --git a/core/java/android/app/ISearchManager.aidl b/core/java/android/app/ISearchManager.aidl
index ed5dd3d..a7d6378 100644
--- a/core/java/android/app/ISearchManager.aidl
+++ b/core/java/android/app/ISearchManager.aidl
@@ -41,7 +41,6 @@ interface ISearchManager {
in ComponentName launchActivity,
in Bundle appSearchData,
ISearchManagerCallback searchManagerCallback,
- boolean globalSearch,
int ident);
void stopSearch();
diff --git a/core/java/android/app/SearchManager.java b/core/java/android/app/SearchManager.java
index ae33fad..3265ac4 100644
--- a/core/java/android/app/SearchManager.java
+++ b/core/java/android/app/SearchManager.java
@@ -1785,17 +1785,12 @@ public class SearchManager
* context here, in order to improve quality or specificity of its own
* searches. This data will be returned with SEARCH intent(s). Null if
* no extra data is required.
- * @param globalSearch If false, this will only launch the search that has been specifically
- * defined by the application (which is usually defined as a local search). If no default
- * search is defined in the current application or activity, no search will be launched.
- * If true, this will always launch a platform-global (e.g. web-based) search instead.
*
* @see #startSearch
*/
public void triggerSearch(String query,
ComponentName launchActivity,
- Bundle appSearchData,
- boolean globalSearch) {
+ Bundle appSearchData) {
if (mIdent == 0) throw new IllegalArgumentException(
"Called from outside of an Activity context");
if (!mAssociatedPackage.equals(launchActivity.getPackageName())) {
@@ -1808,7 +1803,7 @@ public class SearchManager
}
try {
mService.triggerSearch(query, launchActivity, appSearchData, mSearchManagerCallback,
- globalSearch, mIdent);
+ mIdent);
} catch (RemoteException ex) {
Log.e(TAG, "triggerSearch() failed.", ex);
}
diff --git a/core/java/android/server/search/SearchManagerService.java b/core/java/android/server/search/SearchManagerService.java
index 5e0b3d2..78ea2e3 100644
--- a/core/java/android/server/search/SearchManagerService.java
+++ b/core/java/android/server/search/SearchManagerService.java
@@ -247,14 +247,13 @@ public class SearchManagerService extends ISearchManager.Stub {
ComponentName launchActivity,
Bundle appSearchData,
ISearchManagerCallback searchManagerCallback,
- boolean globalSearch,
int ident) {
getSearchDialog().startSearch(
query,
false,
launchActivity,
appSearchData,
- globalSearch,
+ false,
searchManagerCallback,
ident,
true); // triger search after launching