The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2007 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
Jeff Sharkey | 7a96c39 | 2012-11-15 14:01:46 -0800 | [diff] [blame] | 17 | package com.android.server.search; |
Bjorn Bringert | ab5d96c | 2010-02-23 22:48:46 +0000 | [diff] [blame] | 18 | |
Amith Yamasani | c1d07a4 | 2012-08-14 09:32:02 -0700 | [diff] [blame] | 19 | import android.app.ActivityManager; |
| 20 | import android.app.ActivityManagerNative; |
| 21 | import android.app.AppGlobals; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 22 | import android.app.ISearchManager; |
Bjorn Bringert | 8d17f3f | 2009-06-05 13:22:28 +0100 | [diff] [blame] | 23 | import android.app.SearchManager; |
Bjorn Bringert | 2126aac | 2009-12-03 15:48:19 +0000 | [diff] [blame] | 24 | import android.app.SearchableInfo; |
Bjorn Bringert | 2c7b197 | 2010-05-04 20:44:16 +0100 | [diff] [blame] | 25 | import android.content.BroadcastReceiver; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 26 | import android.content.ComponentName; |
Narayan Kamath | ee69ff4 | 2011-06-28 12:07:18 +0100 | [diff] [blame] | 27 | import android.content.ContentResolver; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 28 | import android.content.Context; |
| 29 | import android.content.Intent; |
Bjorn Bringert | 2c7b197 | 2010-05-04 20:44:16 +0100 | [diff] [blame] | 30 | import android.content.IntentFilter; |
Amith Yamasani | c1d07a4 | 2012-08-14 09:32:02 -0700 | [diff] [blame] | 31 | import android.content.pm.IPackageManager; |
| 32 | import android.content.pm.PackageManager; |
Narayan Kamath | ee69ff4 | 2011-06-28 12:07:18 +0100 | [diff] [blame] | 33 | import android.content.pm.ResolveInfo; |
| 34 | import android.database.ContentObserver; |
Amith Yamasani | 5bb87cd | 2012-06-14 11:32:13 -0700 | [diff] [blame] | 35 | import android.os.Binder; |
Bjorn Bringert | 2c7b197 | 2010-05-04 20:44:16 +0100 | [diff] [blame] | 36 | import android.os.Process; |
Amith Yamasani | c1d07a4 | 2012-08-14 09:32:02 -0700 | [diff] [blame] | 37 | import android.os.RemoteException; |
Dianne Hackborn | f02b60a | 2012-08-16 10:48:27 -0700 | [diff] [blame] | 38 | import android.os.UserHandle; |
Amith Yamasani | 258848d | 2012-08-10 17:06:33 -0700 | [diff] [blame] | 39 | import android.os.UserManager; |
Narayan Kamath | ee69ff4 | 2011-06-28 12:07:18 +0100 | [diff] [blame] | 40 | import android.provider.Settings; |
Bjorn Bringert | 8d17f3f | 2009-06-05 13:22:28 +0100 | [diff] [blame] | 41 | import android.util.Log; |
Amith Yamasani | c1d07a4 | 2012-08-14 09:32:02 -0700 | [diff] [blame] | 42 | import android.util.Slog; |
Amith Yamasani | 5bb87cd | 2012-06-14 11:32:13 -0700 | [diff] [blame] | 43 | import android.util.SparseArray; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 44 | |
Jeff Sharkey | 7a96c39 | 2012-11-15 14:01:46 -0800 | [diff] [blame] | 45 | import com.android.internal.content.PackageMonitor; |
| 46 | import com.android.internal.util.IndentingPrintWriter; |
| 47 | |
Amith Yamasani | 64442c1 | 2012-10-07 08:17:46 -0700 | [diff] [blame] | 48 | import java.io.FileDescriptor; |
| 49 | import java.io.PrintWriter; |
Bjorn Bringert | 6d72e02 | 2009-04-29 14:56:12 +0100 | [diff] [blame] | 50 | import java.util.List; |
| 51 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 52 | /** |
Bjorn Bringert | 444c727 | 2009-07-06 21:32:50 +0100 | [diff] [blame] | 53 | * The search manager service handles the search UI, and maintains a registry of searchable |
| 54 | * activities. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 55 | */ |
Bjorn Bringert | 444c727 | 2009-07-06 21:32:50 +0100 | [diff] [blame] | 56 | public class SearchManagerService extends ISearchManager.Stub { |
| 57 | |
| 58 | // general debugging support |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 59 | private static final String TAG = "SearchManagerService"; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 60 | |
Bjorn Bringert | 444c727 | 2009-07-06 21:32:50 +0100 | [diff] [blame] | 61 | // Context that the service is running in. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 62 | private final Context mContext; |
Bjorn Bringert | 8d17f3f | 2009-06-05 13:22:28 +0100 | [diff] [blame] | 63 | |
Bjorn Bringert | ab5d96c | 2010-02-23 22:48:46 +0000 | [diff] [blame] | 64 | // This field is initialized lazily in getSearchables(), and then never modified. |
Amith Yamasani | 64442c1 | 2012-10-07 08:17:46 -0700 | [diff] [blame] | 65 | private final SparseArray<Searchables> mSearchables = new SparseArray<Searchables>(); |
Narayan Kamath | ee69ff4 | 2011-06-28 12:07:18 +0100 | [diff] [blame] | 66 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 67 | /** |
Karl Rosaen | 875d50a | 2009-04-23 19:00:21 -0700 | [diff] [blame] | 68 | * Initializes the Search Manager service in the provided system context. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 69 | * Only one instance of this object should be created! |
| 70 | * |
| 71 | * @param context to use for accessing DB, window manager, etc. |
| 72 | */ |
Satish Sampath | f9acde2 | 2009-06-04 11:51:17 +0100 | [diff] [blame] | 73 | public SearchManagerService(Context context) { |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 74 | mContext = context; |
Bjorn Bringert | 2c7b197 | 2010-05-04 20:44:16 +0100 | [diff] [blame] | 75 | mContext.registerReceiver(new BootCompletedReceiver(), |
| 76 | new IntentFilter(Intent.ACTION_BOOT_COMPLETED)); |
Amith Yamasani | e668794 | 2012-10-29 14:29:05 -0700 | [diff] [blame] | 77 | mContext.registerReceiver(new UserReceiver(), |
Amith Yamasani | 64442c1 | 2012-10-07 08:17:46 -0700 | [diff] [blame] | 78 | new IntentFilter(Intent.ACTION_USER_REMOVED)); |
| 79 | new MyPackageMonitor().register(context, null, UserHandle.ALL, true); |
Bjorn Bringert | 444c727 | 2009-07-06 21:32:50 +0100 | [diff] [blame] | 80 | } |
| 81 | |
Amith Yamasani | 64442c1 | 2012-10-07 08:17:46 -0700 | [diff] [blame] | 82 | private Searchables getSearchables(int userId) { |
Amith Yamasani | 5bb87cd | 2012-06-14 11:32:13 -0700 | [diff] [blame] | 83 | long origId = Binder.clearCallingIdentity(); |
Amith Yamasani | 64442c1 | 2012-10-07 08:17:46 -0700 | [diff] [blame] | 84 | try { |
| 85 | boolean userExists = ((UserManager) mContext.getSystemService(Context.USER_SERVICE)) |
| 86 | .getUserInfo(userId) != null; |
| 87 | if (!userExists) return null; |
| 88 | } finally { |
| 89 | Binder.restoreCallingIdentity(origId); |
Amith Yamasani | 5bb87cd | 2012-06-14 11:32:13 -0700 | [diff] [blame] | 90 | } |
Amith Yamasani | 64442c1 | 2012-10-07 08:17:46 -0700 | [diff] [blame] | 91 | synchronized (mSearchables) { |
| 92 | Searchables searchables = mSearchables.get(userId); |
| 93 | |
| 94 | if (searchables == null) { |
Dianne Hackborn | 40e9f29 | 2012-11-27 19:12:23 -0800 | [diff] [blame] | 95 | //Log.i(TAG, "Building list of searchable activities for userId=" + userId); |
Amith Yamasani | 64442c1 | 2012-10-07 08:17:46 -0700 | [diff] [blame] | 96 | searchables = new Searchables(mContext, userId); |
| 97 | searchables.buildSearchableList(); |
| 98 | mSearchables.append(userId, searchables); |
| 99 | } |
| 100 | return searchables; |
| 101 | } |
| 102 | } |
| 103 | |
| 104 | private void onUserRemoved(int userId) { |
| 105 | if (userId != UserHandle.USER_OWNER) { |
| 106 | synchronized (mSearchables) { |
| 107 | mSearchables.remove(userId); |
| 108 | } |
| 109 | } |
Bjorn Bringert | 9bc75cb | 2009-07-13 13:17:27 +0100 | [diff] [blame] | 110 | } |
| 111 | |
Bjorn Bringert | 444c727 | 2009-07-06 21:32:50 +0100 | [diff] [blame] | 112 | /** |
Bjorn Bringert | 2c7b197 | 2010-05-04 20:44:16 +0100 | [diff] [blame] | 113 | * Creates the initial searchables list after boot. |
| 114 | */ |
| 115 | private final class BootCompletedReceiver extends BroadcastReceiver { |
| 116 | @Override |
| 117 | public void onReceive(Context context, Intent intent) { |
| 118 | new Thread() { |
| 119 | @Override |
| 120 | public void run() { |
| 121 | Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND); |
| 122 | mContext.unregisterReceiver(BootCompletedReceiver.this); |
Amith Yamasani | 5bb87cd | 2012-06-14 11:32:13 -0700 | [diff] [blame] | 123 | getSearchables(0); |
Bjorn Bringert | 2c7b197 | 2010-05-04 20:44:16 +0100 | [diff] [blame] | 124 | } |
| 125 | }.start(); |
| 126 | } |
| 127 | } |
| 128 | |
Amith Yamasani | 64442c1 | 2012-10-07 08:17:46 -0700 | [diff] [blame] | 129 | private final class UserReceiver extends BroadcastReceiver { |
| 130 | @Override |
| 131 | public void onReceive(Context context, Intent intent) { |
| 132 | onUserRemoved(intent.getIntExtra(Intent.EXTRA_USER_HANDLE, UserHandle.USER_OWNER)); |
| 133 | } |
| 134 | } |
| 135 | |
Bjorn Bringert | 2c7b197 | 2010-05-04 20:44:16 +0100 | [diff] [blame] | 136 | /** |
Bjorn Bringert | 444c727 | 2009-07-06 21:32:50 +0100 | [diff] [blame] | 137 | * Refreshes the "searchables" list when packages are added/removed. |
| 138 | */ |
Bjorn Bringert | ab5d96c | 2010-02-23 22:48:46 +0000 | [diff] [blame] | 139 | class MyPackageMonitor extends PackageMonitor { |
Amith Yamasani | 13bc602 | 2011-08-23 12:11:35 -0700 | [diff] [blame] | 140 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 141 | @Override |
Bjorn Bringert | ab5d96c | 2010-02-23 22:48:46 +0000 | [diff] [blame] | 142 | public void onSomePackagesChanged() { |
Amith Yamasani | 13bc602 | 2011-08-23 12:11:35 -0700 | [diff] [blame] | 143 | updateSearchables(); |
| 144 | } |
| 145 | |
| 146 | @Override |
| 147 | public void onPackageModified(String pkg) { |
| 148 | updateSearchables(); |
| 149 | } |
| 150 | |
| 151 | private void updateSearchables() { |
Amith Yamasani | 64442c1 | 2012-10-07 08:17:46 -0700 | [diff] [blame] | 152 | final int changingUserId = getChangingUserId(); |
| 153 | synchronized (mSearchables) { |
Amith Yamasani | 5bb87cd | 2012-06-14 11:32:13 -0700 | [diff] [blame] | 154 | // Update list of searchable activities |
| 155 | for (int i = 0; i < mSearchables.size(); i++) { |
Amith Yamasani | 64442c1 | 2012-10-07 08:17:46 -0700 | [diff] [blame] | 156 | if (changingUserId == mSearchables.keyAt(i)) { |
| 157 | getSearchables(mSearchables.keyAt(i)).buildSearchableList(); |
| 158 | break; |
| 159 | } |
Amith Yamasani | 5bb87cd | 2012-06-14 11:32:13 -0700 | [diff] [blame] | 160 | } |
| 161 | } |
Bjorn Bringert | ab5d96c | 2010-02-23 22:48:46 +0000 | [diff] [blame] | 162 | // Inform all listeners that the list of searchables has been updated. |
| 163 | Intent intent = new Intent(SearchManager.INTENT_ACTION_SEARCHABLES_CHANGED); |
Amith Yamasani | e668794 | 2012-10-29 14:29:05 -0700 | [diff] [blame] | 164 | intent.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING |
| 165 | | Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT); |
Amith Yamasani | 64442c1 | 2012-10-07 08:17:46 -0700 | [diff] [blame] | 166 | mContext.sendBroadcastAsUser(intent, new UserHandle(changingUserId)); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 167 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 168 | } |
| 169 | |
Narayan Kamath | ee69ff4 | 2011-06-28 12:07:18 +0100 | [diff] [blame] | 170 | class GlobalSearchProviderObserver extends ContentObserver { |
| 171 | private final ContentResolver mResolver; |
| 172 | |
| 173 | public GlobalSearchProviderObserver(ContentResolver resolver) { |
| 174 | super(null); |
| 175 | mResolver = resolver; |
| 176 | mResolver.registerContentObserver( |
| 177 | Settings.Secure.getUriFor(Settings.Secure.SEARCH_GLOBAL_SEARCH_ACTIVITY), |
| 178 | false /* notifyDescendants */, |
| 179 | this); |
| 180 | } |
| 181 | |
| 182 | @Override |
| 183 | public void onChange(boolean selfChange) { |
Amith Yamasani | 64442c1 | 2012-10-07 08:17:46 -0700 | [diff] [blame] | 184 | synchronized (mSearchables) { |
Amith Yamasani | 5bb87cd | 2012-06-14 11:32:13 -0700 | [diff] [blame] | 185 | for (int i = 0; i < mSearchables.size(); i++) { |
| 186 | getSearchables(mSearchables.keyAt(i)).buildSearchableList(); |
| 187 | } |
| 188 | } |
Narayan Kamath | ee69ff4 | 2011-06-28 12:07:18 +0100 | [diff] [blame] | 189 | Intent intent = new Intent(SearchManager.INTENT_GLOBAL_SEARCH_ACTIVITY_CHANGED); |
| 190 | intent.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING); |
Dianne Hackborn | 5ac72a2 | 2012-08-29 18:32:08 -0700 | [diff] [blame] | 191 | mContext.sendBroadcastAsUser(intent, UserHandle.ALL); |
Narayan Kamath | ee69ff4 | 2011-06-28 12:07:18 +0100 | [diff] [blame] | 192 | } |
| 193 | |
| 194 | } |
| 195 | |
Bjorn Bringert | 444c727 | 2009-07-06 21:32:50 +0100 | [diff] [blame] | 196 | // |
| 197 | // Searchable activities API |
| 198 | // |
Bjorn Bringert | a48a5af | 2009-05-20 17:58:39 +0100 | [diff] [blame] | 199 | |
| 200 | /** |
Bjorn Bringert | 444c727 | 2009-07-06 21:32:50 +0100 | [diff] [blame] | 201 | * Returns the SearchableInfo for a given activity. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 202 | * |
| 203 | * @param launchActivity The activity from which we're launching this search. |
Karl Rosaen | 875d50a | 2009-04-23 19:00:21 -0700 | [diff] [blame] | 204 | * @return Returns a SearchableInfo record describing the parameters of the search, |
| 205 | * or null if no searchable metadata was available. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 206 | */ |
Bjorn Bringert | 6cf7a32 | 2010-02-23 13:17:06 +0000 | [diff] [blame] | 207 | public SearchableInfo getSearchableInfo(final ComponentName launchActivity) { |
| 208 | if (launchActivity == null) { |
| 209 | Log.e(TAG, "getSearchableInfo(), activity == null"); |
| 210 | return null; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 211 | } |
Dianne Hackborn | f02b60a | 2012-08-16 10:48:27 -0700 | [diff] [blame] | 212 | return getSearchables(UserHandle.getCallingUserId()).getSearchableInfo(launchActivity); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 213 | } |
Satish Sampath | f9acde2 | 2009-06-04 11:51:17 +0100 | [diff] [blame] | 214 | |
Bjorn Bringert | 6d72e02 | 2009-04-29 14:56:12 +0100 | [diff] [blame] | 215 | /** |
| 216 | * Returns a list of the searchable activities that can be included in global search. |
| 217 | */ |
| 218 | public List<SearchableInfo> getSearchablesInGlobalSearch() { |
Dianne Hackborn | f02b60a | 2012-08-16 10:48:27 -0700 | [diff] [blame] | 219 | return getSearchables(UserHandle.getCallingUserId()).getSearchablesInGlobalSearchList(); |
Bjorn Bringert | 6d72e02 | 2009-04-29 14:56:12 +0100 | [diff] [blame] | 220 | } |
Bjorn Bringert | 8d17f3f | 2009-06-05 13:22:28 +0100 | [diff] [blame] | 221 | |
Narayan Kamath | ee69ff4 | 2011-06-28 12:07:18 +0100 | [diff] [blame] | 222 | public List<ResolveInfo> getGlobalSearchActivities() { |
Dianne Hackborn | f02b60a | 2012-08-16 10:48:27 -0700 | [diff] [blame] | 223 | return getSearchables(UserHandle.getCallingUserId()).getGlobalSearchActivities(); |
Narayan Kamath | ee69ff4 | 2011-06-28 12:07:18 +0100 | [diff] [blame] | 224 | } |
| 225 | |
Bjorn Bringert | 8d17f3f | 2009-06-05 13:22:28 +0100 | [diff] [blame] | 226 | /** |
Bjorn Bringert | 6cf7a32 | 2010-02-23 13:17:06 +0000 | [diff] [blame] | 227 | * Gets the name of the global search activity. |
Bjorn Bringert | 8d17f3f | 2009-06-05 13:22:28 +0100 | [diff] [blame] | 228 | */ |
Bjorn Bringert | 6cf7a32 | 2010-02-23 13:17:06 +0000 | [diff] [blame] | 229 | public ComponentName getGlobalSearchActivity() { |
Dianne Hackborn | f02b60a | 2012-08-16 10:48:27 -0700 | [diff] [blame] | 230 | return getSearchables(UserHandle.getCallingUserId()).getGlobalSearchActivity(); |
Bjorn Bringert | 444c727 | 2009-07-06 21:32:50 +0100 | [diff] [blame] | 231 | } |
| 232 | |
| 233 | /** |
Bjorn Bringert | 6cf7a32 | 2010-02-23 13:17:06 +0000 | [diff] [blame] | 234 | * Gets the name of the web search activity. |
Bjorn Bringert | 444c727 | 2009-07-06 21:32:50 +0100 | [diff] [blame] | 235 | */ |
Bjorn Bringert | 6cf7a32 | 2010-02-23 13:17:06 +0000 | [diff] [blame] | 236 | public ComponentName getWebSearchActivity() { |
Dianne Hackborn | f02b60a | 2012-08-16 10:48:27 -0700 | [diff] [blame] | 237 | return getSearchables(UserHandle.getCallingUserId()).getWebSearchActivity(); |
Bjorn Bringert | 444c727 | 2009-07-06 21:32:50 +0100 | [diff] [blame] | 238 | } |
| 239 | |
Amith Yamasani | c1d07a4 | 2012-08-14 09:32:02 -0700 | [diff] [blame] | 240 | @Override |
| 241 | public ComponentName getAssistIntent(int userHandle) { |
| 242 | try { |
Ben Pietrzak | 05cb363 | 2012-12-12 11:31:57 -0800 | [diff] [blame] | 243 | userHandle = ActivityManager.handleIncomingUser(Binder.getCallingPid(), |
| 244 | Binder.getCallingUid(), userHandle, true, false, "getAssistIntent", null); |
Amith Yamasani | c1d07a4 | 2012-08-14 09:32:02 -0700 | [diff] [blame] | 245 | IPackageManager pm = AppGlobals.getPackageManager(); |
| 246 | Intent assistIntent = new Intent(Intent.ACTION_ASSIST); |
| 247 | ResolveInfo info = |
| 248 | pm.resolveIntent(assistIntent, |
| 249 | assistIntent.resolveTypeIfNeeded(mContext.getContentResolver()), |
| 250 | PackageManager.MATCH_DEFAULT_ONLY, userHandle); |
| 251 | if (info != null) { |
| 252 | return new ComponentName( |
| 253 | info.activityInfo.applicationInfo.packageName, |
| 254 | info.activityInfo.name); |
| 255 | } |
| 256 | } catch (RemoteException re) { |
| 257 | // Local call |
| 258 | Log.e(TAG, "RemoteException in getAssistIntent: " + re); |
| 259 | } catch (Exception e) { |
| 260 | Log.e(TAG, "Exception in getAssistIntent: " + e); |
| 261 | } |
| 262 | return null; |
| 263 | } |
Amith Yamasani | 64442c1 | 2012-10-07 08:17:46 -0700 | [diff] [blame] | 264 | |
| 265 | @Override |
| 266 | public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { |
Jeff Sharkey | 52801aa | 2012-10-12 16:06:16 -0700 | [diff] [blame] | 267 | mContext.enforceCallingOrSelfPermission(android.Manifest.permission.DUMP, TAG); |
| 268 | |
Amith Yamasani | 64442c1 | 2012-10-07 08:17:46 -0700 | [diff] [blame] | 269 | IndentingPrintWriter ipw = new IndentingPrintWriter(pw, " "); |
| 270 | synchronized (mSearchables) { |
| 271 | for (int i = 0; i < mSearchables.size(); i++) { |
| 272 | ipw.print("\nUser: "); ipw.println(mSearchables.keyAt(i)); |
| 273 | ipw.increaseIndent(); |
| 274 | mSearchables.valueAt(i).dump(fd, ipw, args); |
| 275 | ipw.decreaseIndent(); |
| 276 | } |
| 277 | } |
| 278 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 279 | } |