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