blob: 203cca692df02dc69678192c8ca65fe2739ab2e0 [file] [log] [blame]
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001/*
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
17package com.android.server;
18
Jim Millera75a8832013-02-07 16:53:32 -080019import android.app.ActivityManager;
The Android Open Source Projectc39a6e02009-03-11 12:11:56 -070020import android.appwidget.AppWidgetProviderInfo;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080021import android.content.BroadcastReceiver;
22import android.content.ComponentName;
23import android.content.Context;
24import android.content.Intent;
25import android.content.IntentFilter;
Winson Chung81f39eb2011-01-11 18:05:01 -080026import android.content.pm.PackageManager;
Amith Yamasani8fd96ec2012-09-21 17:48:49 -070027import android.os.Binder;
Adam Cohene8724c82012-04-19 17:11:40 -070028import android.os.Bundle;
Adam Cohena1a2f962012-11-01 14:06:16 -070029import android.os.Handler;
Winson Chung81f39eb2011-01-11 18:05:01 -080030import android.os.IBinder;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080031import android.os.RemoteException;
Dianne Hackborn41203752012-08-31 14:05:51 -070032import android.os.UserHandle;
Joe Onorato8a9b2202010-02-26 18:56:32 -080033import android.util.Slog;
Amith Yamasani742a6712011-05-04 14:49:28 -070034import android.util.SparseArray;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080035import android.widget.RemoteViews;
36
The Android Open Source Projectc39a6e02009-03-11 12:11:56 -070037import com.android.internal.appwidget.IAppWidgetHost;
Winson Chung81f39eb2011-01-11 18:05:01 -080038import com.android.internal.appwidget.IAppWidgetService;
Dianne Hackborn8d044e82013-04-30 17:24:15 -070039import com.android.internal.os.BackgroundThread;
Amith Yamasani8320de82012-10-05 16:10:38 -070040import com.android.internal.util.IndentingPrintWriter;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080041
Adam Cohen97300312011-10-12 15:48:13 -070042import java.io.FileDescriptor;
Adam Cohen97300312011-10-12 15:48:13 -070043import java.io.PrintWriter;
Adam Cohen97300312011-10-12 15:48:13 -070044import java.util.List;
45import java.util.Locale;
46
Amith Yamasani742a6712011-05-04 14:49:28 -070047
48/**
49 * Redirects calls to this service to the instance of the service for the appropriate user.
50 */
The Android Open Source Projectc39a6e02009-03-11 12:11:56 -070051class AppWidgetService extends IAppWidgetService.Stub
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080052{
The Android Open Source Projectc39a6e02009-03-11 12:11:56 -070053 private static final String TAG = "AppWidgetService";
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080054
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080055 Context mContext;
Eric Fischer63c2d9e2009-10-22 15:22:50 -070056 Locale mLocale;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080057 PackageManager mPackageManager;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080058 boolean mSafeMode;
Adam Cohena1a2f962012-11-01 14:06:16 -070059 private final Handler mSaveStateHandler;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080060
Amith Yamasani742a6712011-05-04 14:49:28 -070061 private final SparseArray<AppWidgetServiceImpl> mAppWidgetServices;
Adam Cohen7bb98832011-10-05 18:10:13 -070062
The Android Open Source Projectc39a6e02009-03-11 12:11:56 -070063 AppWidgetService(Context context) {
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080064 mContext = context;
Adam Cohena1a2f962012-11-01 14:06:16 -070065
Dianne Hackborn8d044e82013-04-30 17:24:15 -070066 mSaveStateHandler = BackgroundThread.getHandler();
Adam Cohena1a2f962012-11-01 14:06:16 -070067
Amith Yamasani742a6712011-05-04 14:49:28 -070068 mAppWidgetServices = new SparseArray<AppWidgetServiceImpl>(5);
Adam Cohena1a2f962012-11-01 14:06:16 -070069 AppWidgetServiceImpl primary = new AppWidgetServiceImpl(context, 0, mSaveStateHandler);
Amith Yamasani742a6712011-05-04 14:49:28 -070070 mAppWidgetServices.append(0, primary);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080071 }
72
Svetoslav Ganova0027152013-06-25 14:59:53 -070073 public void systemRunning(boolean safeMode) {
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080074 mSafeMode = safeMode;
75
Amith Yamasani742a6712011-05-04 14:49:28 -070076 mAppWidgetServices.get(0).systemReady(safeMode);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080077
78 // Register for the boot completed broadcast, so we can send the
Amith Yamasani742a6712011-05-04 14:49:28 -070079 // ENABLE broacasts. If we try to send them now, they time out,
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080080 // because the system isn't ready to handle them yet.
Dianne Hackborn20e80982012-08-31 19:00:44 -070081 mContext.registerReceiverAsUser(mBroadcastReceiver, UserHandle.ALL,
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080082 new IntentFilter(Intent.ACTION_BOOT_COMPLETED), null, null);
83
Eric Fischer63c2d9e2009-10-22 15:22:50 -070084 // Register for configuration changes so we can update the names
85 // of the widgets when the locale changes.
Dianne Hackbornfd8bf5c2012-09-04 18:48:37 -070086 mContext.registerReceiverAsUser(mBroadcastReceiver, UserHandle.ALL,
87 new IntentFilter(Intent.ACTION_CONFIGURATION_CHANGED), null, null);
Eric Fischer63c2d9e2009-10-22 15:22:50 -070088
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080089 // Register for broadcasts about package install, etc., so we can
90 // update the provider list.
91 IntentFilter filter = new IntentFilter();
92 filter.addAction(Intent.ACTION_PACKAGE_ADDED);
Joe Onoratod070e892011-01-07 20:50:37 -080093 filter.addAction(Intent.ACTION_PACKAGE_CHANGED);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080094 filter.addAction(Intent.ACTION_PACKAGE_REMOVED);
95 filter.addDataScheme("package");
Dianne Hackborn20e80982012-08-31 19:00:44 -070096 mContext.registerReceiverAsUser(mBroadcastReceiver, UserHandle.ALL,
97 filter, null, null);
Suchi Amalapurapu08675a32010-01-28 09:57:30 -080098 // Register for events related to sdcard installation.
99 IntentFilter sdFilter = new IntentFilter();
Suchi Amalapurapub56ae202010-02-04 22:51:07 -0800100 sdFilter.addAction(Intent.ACTION_EXTERNAL_APPLICATIONS_AVAILABLE);
101 sdFilter.addAction(Intent.ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE);
Dianne Hackborn20e80982012-08-31 19:00:44 -0700102 mContext.registerReceiverAsUser(mBroadcastReceiver, UserHandle.ALL,
103 sdFilter, null, null);
Amith Yamasani13593602012-03-22 16:16:17 -0700104
105 IntentFilter userFilter = new IntentFilter();
106 userFilter.addAction(Intent.ACTION_USER_REMOVED);
Amith Yamasani756901d2012-10-12 12:30:07 -0700107 userFilter.addAction(Intent.ACTION_USER_STOPPING);
Amith Yamasani13593602012-03-22 16:16:17 -0700108 mContext.registerReceiver(new BroadcastReceiver() {
109 @Override
110 public void onReceive(Context context, Intent intent) {
Amith Yamasani756901d2012-10-12 12:30:07 -0700111 if (Intent.ACTION_USER_REMOVED.equals(intent.getAction())) {
112 onUserRemoved(intent.getIntExtra(Intent.EXTRA_USER_HANDLE,
113 UserHandle.USER_NULL));
114 } else if (Intent.ACTION_USER_STOPPING.equals(intent.getAction())) {
115 onUserStopping(intent.getIntExtra(Intent.EXTRA_USER_HANDLE,
116 UserHandle.USER_NULL));
117 }
Amith Yamasani13593602012-03-22 16:16:17 -0700118 }
119 }, userFilter);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800120 }
121
Amith Yamasani742a6712011-05-04 14:49:28 -0700122 @Override
Jim Millera75a8832013-02-07 16:53:32 -0800123 public int allocateAppWidgetId(String packageName, int hostId, int userId)
Adam Cohen0aa2d422012-09-07 17:37:26 -0700124 throws RemoteException {
Jim Millera75a8832013-02-07 16:53:32 -0800125 return getImplForUser(userId).allocateAppWidgetId(packageName, hostId);
126 }
127
128 @Override
129 public int[] getAppWidgetIdsForHost(int hostId, int userId) throws RemoteException {
130 return getImplForUser(userId).getAppWidgetIdsForHost(hostId);
131 }
132
133 @Override
134 public void deleteAppWidgetId(int appWidgetId, int userId) throws RemoteException {
135 getImplForUser(userId).deleteAppWidgetId(appWidgetId);
136 }
137
138 @Override
139 public void deleteHost(int hostId, int userId) throws RemoteException {
140 getImplForUser(userId).deleteHost(hostId);
141 }
142
143 @Override
144 public void deleteAllHosts(int userId) throws RemoteException {
145 getImplForUser(userId).deleteAllHosts();
146 }
147
148 @Override
149 public void bindAppWidgetId(int appWidgetId, ComponentName provider, Bundle options, int userId)
150 throws RemoteException {
151 getImplForUser(userId).bindAppWidgetId(appWidgetId, provider, options);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800152 }
153
Amith Yamasani742a6712011-05-04 14:49:28 -0700154 @Override
Michael Jurka61a5b012012-04-13 10:39:45 -0700155 public boolean bindAppWidgetIdIfAllowed(
Jim Millera75a8832013-02-07 16:53:32 -0800156 String packageName, int appWidgetId, ComponentName provider, Bundle options, int userId)
Adam Cohen0aa2d422012-09-07 17:37:26 -0700157 throws RemoteException {
Jim Millera75a8832013-02-07 16:53:32 -0800158 return getImplForUser(userId).bindAppWidgetIdIfAllowed(
Adam Cohen0aa2d422012-09-07 17:37:26 -0700159 packageName, appWidgetId, provider, options);
Michael Jurka61a5b012012-04-13 10:39:45 -0700160 }
161
162 @Override
Jim Millera75a8832013-02-07 16:53:32 -0800163 public boolean hasBindAppWidgetPermission(String packageName, int userId)
164 throws RemoteException {
165 return getImplForUser(userId).hasBindAppWidgetPermission(packageName);
Michael Jurka61a5b012012-04-13 10:39:45 -0700166 }
167
168 @Override
Jim Millera75a8832013-02-07 16:53:32 -0800169 public void setBindAppWidgetPermission(String packageName, boolean permission, int userId)
Michael Jurka61a5b012012-04-13 10:39:45 -0700170 throws RemoteException {
Jim Millera75a8832013-02-07 16:53:32 -0800171 getImplForUser(userId).setBindAppWidgetPermission(packageName, permission);
Michael Jurka61a5b012012-04-13 10:39:45 -0700172 }
173
174 @Override
Amith Yamasanic566b432012-11-30 15:26:21 -0800175 public void bindRemoteViewsService(int appWidgetId, Intent intent, IBinder connection,
176 int userId) throws RemoteException {
Jim Millera75a8832013-02-07 16:53:32 -0800177 getImplForUser(userId).bindRemoteViewsService(appWidgetId, intent, connection);
Winson Chung81f39eb2011-01-11 18:05:01 -0800178 }
179
Amith Yamasani742a6712011-05-04 14:49:28 -0700180 @Override
181 public int[] startListening(IAppWidgetHost host, String packageName, int hostId,
Amith Yamasanic566b432012-11-30 15:26:21 -0800182 List<RemoteViews> updatedViews, int userId) throws RemoteException {
Amith Yamasanic566b432012-11-30 15:26:21 -0800183 return getImplForUser(userId).startListening(host, packageName, hostId, updatedViews);
184 }
185
Amith Yamasani13593602012-03-22 16:16:17 -0700186 public void onUserRemoved(int userId) {
Amith Yamasani13593602012-03-22 16:16:17 -0700187 if (userId < 1) return;
Amith Yamasani8320de82012-10-05 16:10:38 -0700188 synchronized (mAppWidgetServices) {
189 AppWidgetServiceImpl impl = mAppWidgetServices.get(userId);
190 mAppWidgetServices.remove(userId);
Amith Yamasani756901d2012-10-12 12:30:07 -0700191
Amith Yamasani8320de82012-10-05 16:10:38 -0700192 if (impl == null) {
193 AppWidgetServiceImpl.getSettingsFile(userId).delete();
194 } else {
195 impl.onUserRemoved();
196 }
Amith Yamasani13593602012-03-22 16:16:17 -0700197 }
Winson Chung84bbb022011-02-21 13:57:45 -0800198 }
199
Amith Yamasani756901d2012-10-12 12:30:07 -0700200 public void onUserStopping(int userId) {
201 if (userId < 1) return;
202 synchronized (mAppWidgetServices) {
203 AppWidgetServiceImpl impl = mAppWidgetServices.get(userId);
204 if (impl != null) {
205 mAppWidgetServices.remove(userId);
206 impl.onUserStopping();
207 }
208 }
Dianne Hackborn20e80982012-08-31 19:00:44 -0700209 }
210
Jim Millera75a8832013-02-07 16:53:32 -0800211 private void checkPermission(int userId) {
212 int realUserId = ActivityManager.handleIncomingUser(
213 Binder.getCallingPid(),
214 Binder.getCallingUid(),
215 userId,
216 false, /* allowAll */
217 true, /* requireFull */
218 this.getClass().getSimpleName(),
219 this.getClass().getPackage().getName());
220 }
221
Dianne Hackborn41203752012-08-31 14:05:51 -0700222 private AppWidgetServiceImpl getImplForUser(int userId) {
Jim Millera75a8832013-02-07 16:53:32 -0800223 checkPermission(userId);
Amith Yamasani8320de82012-10-05 16:10:38 -0700224 boolean sendInitial = false;
225 AppWidgetServiceImpl service;
226 synchronized (mAppWidgetServices) {
227 service = mAppWidgetServices.get(userId);
228 if (service == null) {
229 Slog.i(TAG, "Unable to find AppWidgetServiceImpl for user " + userId + ", adding");
230 // TODO: Verify that it's a valid user
Adam Cohena1a2f962012-11-01 14:06:16 -0700231 service = new AppWidgetServiceImpl(mContext, userId, mSaveStateHandler);
Amith Yamasani8320de82012-10-05 16:10:38 -0700232 service.systemReady(mSafeMode);
233 // Assume that BOOT_COMPLETED was received, as this is a non-primary user.
234 mAppWidgetServices.append(userId, service);
235 sendInitial = true;
236 }
Winson Chung84bbb022011-02-21 13:57:45 -0800237 }
Amith Yamasani8320de82012-10-05 16:10:38 -0700238 if (sendInitial) {
239 service.sendInitialBroadcasts();
240 }
Amith Yamasani742a6712011-05-04 14:49:28 -0700241 return service;
Winson Chung84bbb022011-02-21 13:57:45 -0800242 }
243
Amith Yamasani742a6712011-05-04 14:49:28 -0700244 @Override
Jim Millera75a8832013-02-07 16:53:32 -0800245 public int[] getAppWidgetIds(ComponentName provider, int userId) throws RemoteException {
246 return getImplForUser(userId).getAppWidgetIds(provider);
Winson Chung84bbb022011-02-21 13:57:45 -0800247 }
248
Amith Yamasani742a6712011-05-04 14:49:28 -0700249 @Override
Jim Millera75a8832013-02-07 16:53:32 -0800250 public AppWidgetProviderInfo getAppWidgetInfo(int appWidgetId, int userId)
Adam Cohend9e5af32012-11-28 16:34:57 -0800251 throws RemoteException {
Jim Millera75a8832013-02-07 16:53:32 -0800252 return getImplForUser(userId).getAppWidgetInfo(appWidgetId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800253 }
254
Amith Yamasani742a6712011-05-04 14:49:28 -0700255 @Override
Jim Millera75a8832013-02-07 16:53:32 -0800256 public RemoteViews getAppWidgetViews(int appWidgetId, int userId) throws RemoteException {
257 return getImplForUser(userId).getAppWidgetViews(appWidgetId);
258 }
259
260 @Override
261 public void updateAppWidgetOptions(int appWidgetId, Bundle options, int userId) {
262 getImplForUser(userId).updateAppWidgetOptions(appWidgetId, options);
263 }
264
265 @Override
266 public Bundle getAppWidgetOptions(int appWidgetId, int userId) {
267 return getImplForUser(userId).getAppWidgetOptions(appWidgetId);
268 }
269
270 @Override
271 public List<AppWidgetProviderInfo> getInstalledProviders(int categoryFilter, int userId)
Amith Yamasani742a6712011-05-04 14:49:28 -0700272 throws RemoteException {
Jim Millera75a8832013-02-07 16:53:32 -0800273 return getImplForUser(userId).getInstalledProviders(categoryFilter);
274 }
275
276 @Override
277 public void notifyAppWidgetViewDataChanged(int[] appWidgetIds, int viewId, int userId)
278 throws RemoteException {
279 getImplForUser(userId).notifyAppWidgetViewDataChanged(
Dianne Hackborn41203752012-08-31 14:05:51 -0700280 appWidgetIds, viewId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800281 }
282
Amith Yamasani742a6712011-05-04 14:49:28 -0700283 @Override
Jim Millera75a8832013-02-07 16:53:32 -0800284 public void partiallyUpdateAppWidgetIds(int[] appWidgetIds, RemoteViews views, int userId)
Amith Yamasani742a6712011-05-04 14:49:28 -0700285 throws RemoteException {
Jim Millera75a8832013-02-07 16:53:32 -0800286 getImplForUser(userId).partiallyUpdateAppWidgetIds(
Dianne Hackborn41203752012-08-31 14:05:51 -0700287 appWidgetIds, views);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800288 }
289
Amith Yamasani742a6712011-05-04 14:49:28 -0700290 @Override
Jim Millera75a8832013-02-07 16:53:32 -0800291 public void stopListening(int hostId, int userId) throws RemoteException {
Amith Yamasanic566b432012-11-30 15:26:21 -0800292 getImplForUser(userId).stopListening(hostId);
293 }
294
295 @Override
296 public void unbindRemoteViewsService(int appWidgetId, Intent intent, int userId)
297 throws RemoteException {
Amith Yamasanic566b432012-11-30 15:26:21 -0800298 getImplForUser(userId).unbindRemoteViewsService(
Dianne Hackborn41203752012-08-31 14:05:51 -0700299 appWidgetId, intent);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800300 }
301
Amith Yamasani742a6712011-05-04 14:49:28 -0700302 @Override
Jim Millera75a8832013-02-07 16:53:32 -0800303 public void updateAppWidgetIds(int[] appWidgetIds, RemoteViews views, int userId)
304 throws RemoteException {
305 getImplForUser(userId).updateAppWidgetIds(appWidgetIds, views);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800306 }
Adam Cohen97300312011-10-12 15:48:13 -0700307
Amith Yamasani742a6712011-05-04 14:49:28 -0700308 @Override
Jim Millera75a8832013-02-07 16:53:32 -0800309 public void updateAppWidgetProvider(ComponentName provider, RemoteViews views, int userId)
Amith Yamasani742a6712011-05-04 14:49:28 -0700310 throws RemoteException {
Jim Millera75a8832013-02-07 16:53:32 -0800311 getImplForUser(userId).updateAppWidgetProvider(provider, views);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800312 }
313
Amith Yamasani742a6712011-05-04 14:49:28 -0700314 @Override
315 public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
Jeff Sharkey52801aa2012-10-12 16:06:16 -0700316 mContext.enforceCallingOrSelfPermission(android.Manifest.permission.DUMP, TAG);
317
Amith Yamasani742a6712011-05-04 14:49:28 -0700318 // Dump the state of all the app widget providers
Amith Yamasani8320de82012-10-05 16:10:38 -0700319 synchronized (mAppWidgetServices) {
320 IndentingPrintWriter ipw = new IndentingPrintWriter(pw, " ");
321 for (int i = 0; i < mAppWidgetServices.size(); i++) {
322 pw.println("User: " + mAppWidgetServices.keyAt(i));
323 ipw.increaseIndent();
324 AppWidgetServiceImpl service = mAppWidgetServices.valueAt(i);
325 service.dump(fd, ipw, args);
326 ipw.decreaseIndent();
327 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800328 }
329 }
330
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800331 BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
332 public void onReceive(Context context, Intent intent) {
333 String action = intent.getAction();
Amith Yamasani742a6712011-05-04 14:49:28 -0700334 // Slog.d(TAG, "received " + action);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800335 if (Intent.ACTION_BOOT_COMPLETED.equals(action)) {
Amith Yamasani756901d2012-10-12 12:30:07 -0700336 int userId = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, UserHandle.USER_NULL);
Dianne Hackborn41203752012-08-31 14:05:51 -0700337 if (userId >= 0) {
338 getImplForUser(userId).sendInitialBroadcasts();
339 } else {
Amith Yamasani756901d2012-10-12 12:30:07 -0700340 Slog.w(TAG, "Incorrect user handle supplied in " + intent);
Dianne Hackborn41203752012-08-31 14:05:51 -0700341 }
Eric Fischer63c2d9e2009-10-22 15:22:50 -0700342 } else if (Intent.ACTION_CONFIGURATION_CHANGED.equals(action)) {
Amith Yamasani742a6712011-05-04 14:49:28 -0700343 for (int i = 0; i < mAppWidgetServices.size(); i++) {
344 AppWidgetServiceImpl service = mAppWidgetServices.valueAt(i);
345 service.onConfigurationChanged();
Eric Fischer63c2d9e2009-10-22 15:22:50 -0700346 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800347 } else {
Dianne Hackborn20e80982012-08-31 19:00:44 -0700348 int sendingUser = getSendingUserId();
349 if (sendingUser == UserHandle.USER_ALL) {
350 for (int i = 0; i < mAppWidgetServices.size(); i++) {
351 AppWidgetServiceImpl service = mAppWidgetServices.valueAt(i);
352 service.onBroadcastReceived(intent);
353 }
354 } else {
355 AppWidgetServiceImpl service = mAppWidgetServices.get(sendingUser);
356 if (service != null) {
357 service.onBroadcastReceived(intent);
358 }
Amith Yamasani483f3b02012-03-13 16:08:00 -0700359 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800360 }
361 }
362 };
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800363}