blob: 717c3098398b898281ef58684bf1031d136482af [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
Joe Onorato7a0f36b2010-06-07 10:24:36 -070017package com.android.server;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080018
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080019import android.app.PendingIntent;
20import android.app.StatusBarManager;
21import android.content.BroadcastReceiver;
Joe Onorato9e875fc2010-06-07 11:12:11 -070022import android.content.ComponentName;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080023import android.content.Context;
24import android.content.Intent;
25import android.content.IntentFilter;
26import android.content.pm.PackageManager;
27import android.content.res.Resources;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080028import android.net.Uri;
29import android.os.IBinder;
30import android.os.RemoteException;
31import android.os.Binder;
Joe Onoratof3f0e052010-05-14 18:49:29 -070032import android.os.Handler;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080033import android.os.SystemClock;
Joe Onorato8a9b2202010-02-26 18:56:32 -080034import android.util.Slog;
Joe Onorato0cbda992010-05-02 16:28:15 -070035
36import com.android.internal.statusbar.IStatusBar;
37import com.android.internal.statusbar.IStatusBarService;
38import com.android.internal.statusbar.StatusBarIcon;
39import com.android.internal.statusbar.StatusBarIconList;
Joe Onorato18e69df2010-05-17 22:26:12 -070040import com.android.internal.statusbar.StatusBarNotification;
The Android Open Source Project10592532009-03-18 17:39:46 -070041
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080042import java.io.FileDescriptor;
43import java.io.PrintWriter;
44import java.util.ArrayList;
45import java.util.HashMap;
Joe Onorato75199e32010-05-29 17:22:51 -040046import java.util.List;
47import java.util.Map;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080048
49
50/**
Joe Onoratof3f0e052010-05-14 18:49:29 -070051 * A note on locking: We rely on the fact that calls onto mBar are oneway or
52 * if they are local, that they just enqueue messages to not deadlock.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080053 */
Joe Onorato089de882010-04-12 08:18:45 -070054public class StatusBarManagerService extends IStatusBarService.Stub
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080055{
Joe Onorato4762c2d2010-05-17 15:42:59 -070056 static final String TAG = "StatusBarManagerService";
Joe Onoratof3f0e052010-05-14 18:49:29 -070057 static final boolean SPEW = true;
Joe Onoratodf7dbb62009-11-17 10:43:37 -080058
Joe Onoratof3f0e052010-05-14 18:49:29 -070059 final Context mContext;
60 Handler mHandler = new Handler();
61 NotificationCallbacks mNotificationCallbacks;
Joe Onorato4762c2d2010-05-17 15:42:59 -070062 volatile IStatusBar mBar;
Joe Onoratof3f0e052010-05-14 18:49:29 -070063 StatusBarIconList mIcons = new StatusBarIconList();
Joe Onorato75199e32010-05-29 17:22:51 -040064 HashMap<IBinder,StatusBarNotification> mNotifications
65 = new HashMap<IBinder,StatusBarNotification>();
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080066
Joe Onoratof3f0e052010-05-14 18:49:29 -070067 // for disabling the status bar
68 ArrayList<DisableRecord> mDisableRecords = new ArrayList<DisableRecord>();
69 int mDisabled = 0;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080070
71 private class DisableRecord implements IBinder.DeathRecipient {
72 String pkg;
73 int what;
74 IBinder token;
75
76 public void binderDied() {
Joe Onorato8a9b2202010-02-26 18:56:32 -080077 Slog.i(TAG, "binder died for pkg=" + pkg);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080078 disable(0, token, pkg);
Suchi Amalapurapufff2fda2009-06-30 21:36:16 -070079 token.unlinkToDeath(this, 0);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080080 }
81 }
82
83 public interface NotificationCallbacks {
84 void onSetDisabled(int status);
85 void onClearAll();
Fred Quintana6ecaff12009-09-25 14:23:13 -070086 void onNotificationClick(String pkg, String tag, int id);
Daniel Sandler0f0b11c2010-08-04 15:54:58 -040087 void onNotificationClear(String pkg, String tag, int id);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080088 void onPanelRevealed();
Dianne Hackborn9d39d0c2010-06-24 15:57:42 -070089 void onNotificationError(String pkg, String tag, int id,
90 int uid, int initialPid, String message);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080091 }
92
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080093 /**
94 * Construct the service, add the status bar view to the window manager
95 */
Joe Onorato089de882010-04-12 08:18:45 -070096 public StatusBarManagerService(Context context) {
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080097 mContext = context;
Joe Onorato0cbda992010-05-02 16:28:15 -070098
99 final Resources res = context.getResources();
Joe Onorato75144ea2010-06-07 12:36:25 -0700100 mIcons.defineSlots(res.getStringArray(com.android.internal.R.array.config_statusBarIcons));
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800101 }
102
103 public void setNotificationCallbacks(NotificationCallbacks listener) {
104 mNotificationCallbacks = listener;
105 }
106
107 // ================================================================================
108 // Constructing the view
109 // ================================================================================
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800110
111 public void systemReady() {
Joe Onorato2314aab2010-04-08 16:41:23 -0500112 }
113
114 public void systemReady2() {
Joe Onorato9e875fc2010-06-07 11:12:11 -0700115 ComponentName cn = ComponentName.unflattenFromString(
116 mContext.getString(com.android.internal.R.string.config_statusBarComponent));
117 Intent intent = new Intent();
118 intent.setComponent(cn);
119 Slog.i(TAG, "Starting service: " + cn);
120 mContext.startService(intent);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800121 }
Joe Onorato4762c2d2010-05-17 15:42:59 -0700122
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800123 // ================================================================================
Joe Onorato25f95f92010-04-08 18:37:10 -0500124 // From IStatusBarService
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800125 // ================================================================================
Joe Onoratof3f0e052010-05-14 18:49:29 -0700126 public void expand() {
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800127 enforceExpandStatusBar();
Joe Onorato4762c2d2010-05-17 15:42:59 -0700128
129 if (mBar != null) {
130 try {
131 mBar.animateExpand();
132 } catch (RemoteException ex) {
133 }
134 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800135 }
136
Joe Onoratof3f0e052010-05-14 18:49:29 -0700137 public void collapse() {
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800138 enforceExpandStatusBar();
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800139
Joe Onorato4762c2d2010-05-17 15:42:59 -0700140 if (mBar != null) {
141 try {
142 mBar.animateCollapse();
143 } catch (RemoteException ex) {
144 }
145 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800146 }
147
148 public void disable(int what, IBinder token, String pkg) {
149 enforceStatusBar();
Joe Onoratof3f0e052010-05-14 18:49:29 -0700150
151 // It's important that the the callback and the call to mBar get done
152 // in the same order when multiple threads are calling this function
153 // so they are paired correctly. The messages on the handler will be
154 // handled in the order they were enqueued, but will be outside the lock.
155 synchronized (mDisableRecords) {
156 manageDisableListLocked(what, token, pkg);
157 final int net = gatherDisableActionsLocked();
158 Slog.d(TAG, "disable... net=0x" + Integer.toHexString(net));
159 if (net != mDisabled) {
160 mDisabled = net;
161 mHandler.post(new Runnable() {
162 public void run() {
163 mNotificationCallbacks.onSetDisabled(net);
164 }
165 });
166 if (mBar != null) {
167 try {
168 mBar.disable(net);
169 } catch (RemoteException ex) {
170 }
171 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800172 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800173 }
174 }
175
Joe Onorato0cbda992010-05-02 16:28:15 -0700176 public void setIcon(String slot, String iconPackage, int iconId, int iconLevel) {
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800177 enforceStatusBar();
Joe Onorato0cbda992010-05-02 16:28:15 -0700178
179 synchronized (mIcons) {
180 int index = mIcons.getSlotIndex(slot);
181 if (index < 0) {
182 throw new SecurityException("invalid status bar icon slot: " + slot);
183 }
184
185 StatusBarIcon icon = new StatusBarIcon(iconPackage, iconId, iconLevel);
Joe Onorato66d7d012010-05-14 10:05:10 -0700186 //Slog.d(TAG, "setIcon slot=" + slot + " index=" + index + " icon=" + icon);
Joe Onorato0cbda992010-05-02 16:28:15 -0700187 mIcons.setIcon(index, icon);
188
Joe Onorato0cbda992010-05-02 16:28:15 -0700189 if (mBar != null) {
190 try {
191 mBar.setIcon(index, icon);
192 } catch (RemoteException ex) {
193 }
194 }
195 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800196 }
197
Joe Onorato0cbda992010-05-02 16:28:15 -0700198 public void setIconVisibility(String slot, boolean visible) {
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800199 enforceStatusBar();
Joe Onorato0cbda992010-05-02 16:28:15 -0700200
Joe Onorato514ad6632010-05-13 18:49:00 -0700201 synchronized (mIcons) {
202 int index = mIcons.getSlotIndex(slot);
203 if (index < 0) {
204 throw new SecurityException("invalid status bar icon slot: " + slot);
205 }
206
207 StatusBarIcon icon = mIcons.getIcon(index);
208 if (icon == null) {
209 return;
210 }
211
212 if (icon.visible != visible) {
213 icon.visible = visible;
214
Joe Onorato514ad6632010-05-13 18:49:00 -0700215 if (mBar != null) {
216 try {
217 mBar.setIcon(index, icon);
218 } catch (RemoteException ex) {
219 }
220 }
221 }
222 }
Joe Onorato0cbda992010-05-02 16:28:15 -0700223 }
224
225 public void removeIcon(String slot) {
226 enforceStatusBar();
227
228 synchronized (mIcons) {
229 int index = mIcons.getSlotIndex(slot);
230 if (index < 0) {
231 throw new SecurityException("invalid status bar icon slot: " + slot);
232 }
233
234 mIcons.removeIcon(index);
235
Joe Onorato0cbda992010-05-02 16:28:15 -0700236 if (mBar != null) {
237 try {
238 mBar.removeIcon(index);
239 } catch (RemoteException ex) {
240 }
241 }
242 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800243 }
244
245 private void enforceStatusBar() {
Joe Onorato0cbda992010-05-02 16:28:15 -0700246 mContext.enforceCallingOrSelfPermission(android.Manifest.permission.STATUS_BAR,
Joe Onorato089de882010-04-12 08:18:45 -0700247 "StatusBarManagerService");
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800248 }
249
250 private void enforceExpandStatusBar() {
Joe Onorato0cbda992010-05-02 16:28:15 -0700251 mContext.enforceCallingOrSelfPermission(android.Manifest.permission.EXPAND_STATUS_BAR,
Joe Onorato089de882010-04-12 08:18:45 -0700252 "StatusBarManagerService");
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800253 }
254
Joe Onorato8bc6c512010-06-04 16:21:12 -0400255 private void enforceStatusBarService() {
256 mContext.enforceCallingOrSelfPermission(android.Manifest.permission.STATUS_BAR_SERVICE,
257 "StatusBarManagerService");
258 }
259
Joe Onorato4762c2d2010-05-17 15:42:59 -0700260
261 // ================================================================================
262 // Callbacks from the status bar service.
263 // ================================================================================
Joe Onorato75199e32010-05-29 17:22:51 -0400264 public void registerStatusBar(IStatusBar bar, StatusBarIconList iconList,
265 List<IBinder> notificationKeys, List<StatusBarNotification> notifications) {
Joe Onorato8bc6c512010-06-04 16:21:12 -0400266 enforceStatusBarService();
267
Joe Onorato0cbda992010-05-02 16:28:15 -0700268 Slog.i(TAG, "registerStatusBar bar=" + bar);
269 mBar = bar;
Joe Onorato75199e32010-05-29 17:22:51 -0400270 synchronized (mIcons) {
271 iconList.copyFrom(mIcons);
272 }
273 synchronized (mNotifications) {
274 for (Map.Entry<IBinder,StatusBarNotification> e: mNotifications.entrySet()) {
275 notificationKeys.add(e.getKey());
276 notifications.add(e.getValue());
277 }
278 }
Joe Onorato2314aab2010-04-08 16:41:23 -0500279 }
Joe Onoratoaaba60b2010-05-23 15:18:41 -0400280
Joe Onorato4762c2d2010-05-17 15:42:59 -0700281 /**
Joe Onoratof1f25912010-06-07 11:52:41 -0700282 * The status bar service should call this each time the user brings the panel from
283 * invisible to visible in order to clear the notification light.
Joe Onorato4762c2d2010-05-17 15:42:59 -0700284 */
Joe Onoratof1f25912010-06-07 11:52:41 -0700285 public void onPanelRevealed() {
Joe Onorato8bc6c512010-06-04 16:21:12 -0400286 enforceStatusBarService();
287
Joe Onoratof1f25912010-06-07 11:52:41 -0700288 // tell the notification manager to turn off the lights.
289 mNotificationCallbacks.onPanelRevealed();
Joe Onorato4762c2d2010-05-17 15:42:59 -0700290 }
291
Joe Onoratoaaba60b2010-05-23 15:18:41 -0400292 public void onNotificationClick(String pkg, String tag, int id) {
Joe Onorato8bc6c512010-06-04 16:21:12 -0400293 enforceStatusBarService();
294
Joe Onoratoaaba60b2010-05-23 15:18:41 -0400295 mNotificationCallbacks.onNotificationClick(pkg, tag, id);
296 }
297
Dianne Hackborn9d39d0c2010-06-24 15:57:42 -0700298 public void onNotificationError(String pkg, String tag, int id,
299 int uid, int initialPid, String message) {
Joe Onorato8bc6c512010-06-04 16:21:12 -0400300 enforceStatusBarService();
301
Joe Onorato005847b2010-06-04 16:08:02 -0400302 // WARNING: this will call back into us to do the remove. Don't hold any locks.
Dianne Hackborn9d39d0c2010-06-24 15:57:42 -0700303 mNotificationCallbacks.onNotificationError(pkg, tag, id, uid, initialPid, message);
Joe Onorato005847b2010-06-04 16:08:02 -0400304 }
305
Daniel Sandler0f0b11c2010-08-04 15:54:58 -0400306 public void onNotificationClear(String pkg, String tag, int id) {
307 enforceStatusBarService();
308
309 mNotificationCallbacks.onNotificationClear(pkg, tag, id);
310 }
311
Joe Onoratoaaba60b2010-05-23 15:18:41 -0400312 public void onClearAllNotifications() {
Joe Onorato8bc6c512010-06-04 16:21:12 -0400313 enforceStatusBarService();
314
Joe Onoratoaaba60b2010-05-23 15:18:41 -0400315 mNotificationCallbacks.onClearAll();
316 }
317
Joe Onorato18e69df2010-05-17 22:26:12 -0700318 // ================================================================================
319 // Callbacks for NotificationManagerService.
320 // ================================================================================
321 public IBinder addNotification(StatusBarNotification notification) {
322 synchronized (mNotifications) {
Joe Onoratoa0c56fe2010-05-20 10:21:52 -0700323 IBinder key = new Binder();
Joe Onorato75199e32010-05-29 17:22:51 -0400324 mNotifications.put(key, notification);
Joe Onoratoe345fff2010-05-23 15:18:27 -0400325 if (mBar != null) {
326 try {
327 mBar.addNotification(key, notification);
328 } catch (RemoteException ex) {
329 }
330 }
Joe Onorato18e69df2010-05-17 22:26:12 -0700331 return key;
332 }
Joe Onorato0cbda992010-05-02 16:28:15 -0700333 }
334
Joe Onorato18e69df2010-05-17 22:26:12 -0700335 public void updateNotification(IBinder key, StatusBarNotification notification) {
336 synchronized (mNotifications) {
Joe Onorato75199e32010-05-29 17:22:51 -0400337 if (!mNotifications.containsKey(key)) {
338 throw new IllegalArgumentException("updateNotification key not found: " + key);
339 }
340 mNotifications.put(key, notification);
Joe Onoratoe345fff2010-05-23 15:18:27 -0400341 if (mBar != null) {
342 try {
343 mBar.updateNotification(key, notification);
344 } catch (RemoteException ex) {
345 }
346 }
Joe Onorato18e69df2010-05-17 22:26:12 -0700347 }
Joe Onorato0cbda992010-05-02 16:28:15 -0700348 }
349
350 public void removeNotification(IBinder key) {
Joe Onorato18e69df2010-05-17 22:26:12 -0700351 synchronized (mNotifications) {
Joe Onorato75199e32010-05-29 17:22:51 -0400352 final StatusBarNotification n = mNotifications.remove(key);
353 if (n == null) {
354 throw new IllegalArgumentException("removeNotification key not found: " + key);
355 }
Joe Onoratoe345fff2010-05-23 15:18:27 -0400356 if (mBar != null) {
357 try {
358 mBar.removeNotification(key);
359 } catch (RemoteException ex) {
360 }
361 }
Joe Onorato18e69df2010-05-17 22:26:12 -0700362 }
Joe Onorato0cbda992010-05-02 16:28:15 -0700363 }
Joe Onorato2314aab2010-04-08 16:41:23 -0500364
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800365 // ================================================================================
366 // Can be called from any thread
367 // ================================================================================
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800368
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800369 // lock on mDisableRecords
370 void manageDisableListLocked(int what, IBinder token, String pkg) {
371 if (SPEW) {
Joe Onoratof3f0e052010-05-14 18:49:29 -0700372 Slog.d(TAG, "manageDisableList what=0x" + Integer.toHexString(what) + " pkg=" + pkg);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800373 }
374 // update the list
375 synchronized (mDisableRecords) {
376 final int N = mDisableRecords.size();
377 DisableRecord tok = null;
378 int i;
379 for (i=0; i<N; i++) {
380 DisableRecord t = mDisableRecords.get(i);
381 if (t.token == token) {
382 tok = t;
383 break;
384 }
385 }
386 if (what == 0 || !token.isBinderAlive()) {
387 if (tok != null) {
388 mDisableRecords.remove(i);
Suchi Amalapurapufff2fda2009-06-30 21:36:16 -0700389 tok.token.unlinkToDeath(tok, 0);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800390 }
391 } else {
392 if (tok == null) {
393 tok = new DisableRecord();
394 try {
395 token.linkToDeath(tok, 0);
396 }
397 catch (RemoteException ex) {
398 return; // give up
399 }
400 mDisableRecords.add(tok);
401 }
402 tok.what = what;
403 tok.token = token;
404 tok.pkg = pkg;
405 }
406 }
407 }
408
409 // lock on mDisableRecords
410 int gatherDisableActionsLocked() {
411 final int N = mDisableRecords.size();
412 // gather the new net flags
413 int net = 0;
414 for (int i=0; i<N; i++) {
415 net |= mDisableRecords.get(i).what;
416 }
417 return net;
418 }
419
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800420 // ================================================================================
421 // Always called from UI thread
422 // ================================================================================
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800423
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800424 protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
425 if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.DUMP)
426 != PackageManager.PERMISSION_GRANTED) {
427 pw.println("Permission Denial: can't dump StatusBar from from pid="
428 + Binder.getCallingPid()
429 + ", uid=" + Binder.getCallingUid());
430 return;
431 }
Joe Onorato0cbda992010-05-02 16:28:15 -0700432
Joe Onorato0cbda992010-05-02 16:28:15 -0700433 synchronized (mIcons) {
434 mIcons.dump(pw);
435 }
Joe Onorato18e69df2010-05-17 22:26:12 -0700436
437 synchronized (mNotifications) {
Joe Onorato75199e32010-05-29 17:22:51 -0400438 int i=0;
439 pw.println("Notification list:");
440 for (Map.Entry<IBinder,StatusBarNotification> e: mNotifications.entrySet()) {
441 pw.printf(" %2d: %s\n", i, e.getValue().toString());
442 i++;
443 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800444 }
Joe Onorato18e69df2010-05-17 22:26:12 -0700445
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800446 synchronized (mDisableRecords) {
447 final int N = mDisableRecords.size();
448 pw.println(" mDisableRecords.size=" + N
449 + " mDisabled=0x" + Integer.toHexString(mDisabled));
450 for (int i=0; i<N; i++) {
451 DisableRecord tok = mDisableRecords.get(i);
452 pw.println(" [" + i + "] what=0x" + Integer.toHexString(tok.what)
453 + " pkg=" + tok.pkg + " token=" + tok.token);
454 }
455 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800456 }
457
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800458 private BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
459 public void onReceive(Context context, Intent intent) {
460 String action = intent.getAction();
Joe Onoratof9e0e6b2009-09-08 16:24:36 -0400461 if (Intent.ACTION_CLOSE_SYSTEM_DIALOGS.equals(action)
462 || Intent.ACTION_SCREEN_OFF.equals(action)) {
Joe Onoratof3f0e052010-05-14 18:49:29 -0700463 collapse();
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800464 }
Joe Onorato0cbda992010-05-02 16:28:15 -0700465 /*
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800466 else if (Telephony.Intents.SPN_STRINGS_UPDATED_ACTION.equals(action)) {
467 updateNetworkName(intent.getBooleanExtra(Telephony.Intents.EXTRA_SHOW_SPN, false),
468 intent.getStringExtra(Telephony.Intents.EXTRA_SPN),
469 intent.getBooleanExtra(Telephony.Intents.EXTRA_SHOW_PLMN, false),
470 intent.getStringExtra(Telephony.Intents.EXTRA_PLMN));
471 }
472 else if (Intent.ACTION_CONFIGURATION_CHANGED.equals(action)) {
473 updateResources();
474 }
Joe Onorato0cbda992010-05-02 16:28:15 -0700475 */
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800476 }
477 };
478
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800479}