summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
authorBjorn Bringert <bringert@android.com>2009-06-22 10:03:21 +0100
committerBjorn Bringert <bringert@android.com>2009-06-22 10:05:48 +0100
commita68ca641e61f85ab9fffa7b782f693b7305df66c (patch)
tree8423e44a55dae3e03e84a8d7b7abd2b2a06c3093 /core/java
parent3e3324bae45ff21615c07507e6918ad21681a6a2 (diff)
downloadframeworks_base-a68ca641e61f85ab9fffa7b782f693b7305df66c.zip
frameworks_base-a68ca641e61f85ab9fffa7b782f693b7305df66c.tar.gz
frameworks_base-a68ca641e61f85ab9fffa7b782f693b7305df66c.tar.bz2
Remove checks for Activity Context when creating SearchManager
Since https://android-git.corp.google.com/g/3880 all activities create a SearchManager object, to handle saving and restoring the search dialog. This broke ActivityUnitTestCase, since ApplicationContext.getSearchManager() threw an exception in non-activity contexts. This change removes the activity context check from getSearchManager(). Since SearchManager is now just a thin wrapper for SearchManagerService, there shouldn't be anything activity-specific in it. Fixes http://b/issue?id=1926254
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/app/ApplicationContext.java5
1 files changed, 0 insertions, 5 deletions
diff --git a/core/java/android/app/ApplicationContext.java b/core/java/android/app/ApplicationContext.java
index 658baee..00b0593 100644
--- a/core/java/android/app/ApplicationContext.java
+++ b/core/java/android/app/ApplicationContext.java
@@ -1037,11 +1037,6 @@ class ApplicationContext extends Context {
}
private SearchManager getSearchManager() {
- // This is only useable in Activity Contexts
- if (getActivityToken() == null) {
- throw new AndroidRuntimeException(
- "Acquiring SearchManager objects only valid in Activity Contexts.");
- }
synchronized (mSync) {
if (mSearchManager == null) {
mSearchManager = new SearchManager(getOuterContext(), mMainThread.getHandler());