blob: 1938c6ddefa3d36b73d97b4e3387e8e8877ea552 [file] [log] [blame]
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001/*
2 * Copyright (C) 2008 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 Onoratofd52b182010-11-10 18:00:52 -080017package com.android.systemui.statusbar.phone;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080018
Adrian Roosc42a1e12014-07-07 23:35:53 +020019import android.app.AlarmManager;
Joe Onorato798ac4c2010-05-27 16:39:00 -040020import android.app.StatusBarManager;
Nick Pellybd022f42009-08-14 18:33:38 -070021import android.bluetooth.BluetoothAdapter;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080022import android.content.BroadcastReceiver;
23import android.content.Context;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080024import android.content.Intent;
25import android.content.IntentFilter;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080026import android.media.AudioManager;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080027import android.os.Handler;
Adrian Roosc42a1e12014-07-07 23:35:53 +020028import android.os.UserHandle;
John Spurlockae641c92014-06-30 18:11:40 -040029import android.provider.Settings.Global;
Tyler Gunnef9f6f92014-09-12 22:16:17 -070030import android.telecom.TelecomManager;
John Spurlockcd686b52013-06-05 10:13:46 -040031import android.util.Log;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080032
Wink Savillea639b312012-07-10 12:37:54 -070033import com.android.internal.telephony.IccCardConstants;
Wink Saville04e71b32009-04-02 11:00:54 -070034import com.android.internal.telephony.TelephonyIntents;
Joe Onorato798ac4c2010-05-27 16:39:00 -040035import com.android.systemui.R;
John Spurlock3c4076a2015-02-24 12:12:25 -050036import com.android.systemui.qs.tiles.DndTile;
John Spurlock96fe98d2014-08-27 09:36:02 -040037import com.android.systemui.statusbar.policy.CastController;
38import com.android.systemui.statusbar.policy.CastController.CastDevice;
Jason Monk952d5d82014-10-27 15:28:22 -040039import com.android.systemui.statusbar.policy.HotspotController;
Joe Onorato798ac4c2010-05-27 16:39:00 -040040
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080041/**
42 * This class contains all of the policy about which icons are installed in the status
Joe Onorato798ac4c2010-05-27 16:39:00 -040043 * bar at boot time. It goes through the normal API for icons, even though it probably
44 * strictly doesn't need to.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080045 */
Joe Onoratofd52b182010-11-10 18:00:52 -080046public class PhoneStatusBarPolicy {
47 private static final String TAG = "PhoneStatusBarPolicy";
John Spurlocka37e9c82014-07-08 09:40:31 -040048 private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
Robert Greenwaltd7085fc2010-09-08 15:24:47 -070049
John Spurlock96fe98d2014-08-27 09:36:02 -040050 private static final String SLOT_CAST = "cast";
Jason Monk952d5d82014-10-27 15:28:22 -040051 private static final String SLOT_HOTSPOT = "hotspot";
John Spurlocka37e9c82014-07-08 09:40:31 -040052 private static final String SLOT_BLUETOOTH = "bluetooth";
53 private static final String SLOT_TTY = "tty";
54 private static final String SLOT_ZEN = "zen";
55 private static final String SLOT_VOLUME = "volume";
John Spurlocka37e9c82014-07-08 09:40:31 -040056 private static final String SLOT_ALARM_CLOCK = "alarm_clock";
57
Dianne Hackborn4840e142009-03-24 22:40:29 -070058 private final Context mContext;
Joe Onorato798ac4c2010-05-27 16:39:00 -040059 private final StatusBarManager mService;
Joe Onorato10523b4d2010-10-25 10:42:46 -070060 private final Handler mHandler = new Handler();
John Spurlock96fe98d2014-08-27 09:36:02 -040061 private final CastController mCast;
Jason Monk952d5d82014-10-27 15:28:22 -040062 private final HotspotController mHotspot;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080063
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080064 // Assume it's all good unless we hear otherwise. We don't always seem
65 // to get broadcasts that it *is* there.
Wink Savillea639b312012-07-10 12:37:54 -070066 IccCardConstants.State mSimState = IccCardConstants.State.READY;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080067
John Spurlocka37e9c82014-07-08 09:40:31 -040068 private boolean mZenVisible;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080069 private boolean mVolumeVisible;
Wink Saville04e71b32009-04-02 11:00:54 -070070
John Spurlockae641c92014-06-30 18:11:40 -040071 private int mZen;
John Spurlockba2c6a02014-05-19 09:44:06 -040072
Daniel Sandlere3b7a2d2011-10-27 16:16:15 -040073 private boolean mBluetoothEnabled = false;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080074
Wink Savillee9b06d72009-05-18 21:47:50 -070075
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080076 private BroadcastReceiver mIntentReceiver = new BroadcastReceiver() {
77 @Override
78 public void onReceive(Context context, Intent intent) {
79 String action = intent.getAction();
Adrian Roosc42a1e12014-07-07 23:35:53 +020080 if (action.equals(AlarmManager.ACTION_NEXT_ALARM_CLOCK_CHANGED)) {
81 updateAlarm();
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080082 }
Nick Pellyde893f52009-09-08 13:15:33 -070083 else if (action.equals(BluetoothAdapter.ACTION_STATE_CHANGED) ||
Jaikumar Ganeshd9bb6882010-09-27 17:05:24 -070084 action.equals(BluetoothAdapter.ACTION_CONNECTION_STATE_CHANGED)) {
Jorim Jaggi2d75f9f2014-10-08 17:10:58 -070085 updateBluetooth();
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080086 }
John Spurlockbcc10872014-11-28 15:29:21 -050087 else if (action.equals(AudioManager.RINGER_MODE_CHANGED_ACTION) ||
88 action.equals(AudioManager.INTERNAL_RINGER_MODE_CHANGED_ACTION)) {
John Spurlocka37e9c82014-07-08 09:40:31 -040089 updateVolumeZen();
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080090 }
91 else if (action.equals(TelephonyIntents.ACTION_SIM_STATE_CHANGED)) {
92 updateSimState(intent);
93 }
Tyler Gunnef9f6f92014-09-12 22:16:17 -070094 else if (action.equals(TelecomManager.ACTION_CURRENT_TTY_MODE_CHANGED)) {
Wink Saville04e71b32009-04-02 11:00:54 -070095 updateTTY(intent);
96 }
Adrian Roosc42a1e12014-07-07 23:35:53 +020097 else if (action.equals(Intent.ACTION_USER_SWITCHED)) {
98 updateAlarm();
99 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800100 }
101 };
102
Jason Monk952d5d82014-10-27 15:28:22 -0400103 public PhoneStatusBarPolicy(Context context, CastController cast, HotspotController hotspot) {
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800104 mContext = context;
John Spurlock96fe98d2014-08-27 09:36:02 -0400105 mCast = cast;
Jason Monk952d5d82014-10-27 15:28:22 -0400106 mHotspot = hotspot;
Joe Onorato798ac4c2010-05-27 16:39:00 -0400107 mService = (StatusBarManager)context.getSystemService(Context.STATUS_BAR_SERVICE);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800108
Daniel Sandlere3b7a2d2011-10-27 16:16:15 -0400109 // listen for broadcasts
110 IntentFilter filter = new IntentFilter();
Adrian Roosc42a1e12014-07-07 23:35:53 +0200111 filter.addAction(AlarmManager.ACTION_NEXT_ALARM_CLOCK_CHANGED);
Daniel Sandlere3b7a2d2011-10-27 16:16:15 -0400112 filter.addAction(AudioManager.RINGER_MODE_CHANGED_ACTION);
John Spurlockbcc10872014-11-28 15:29:21 -0500113 filter.addAction(AudioManager.INTERNAL_RINGER_MODE_CHANGED_ACTION);
Daniel Sandlere3b7a2d2011-10-27 16:16:15 -0400114 filter.addAction(BluetoothAdapter.ACTION_STATE_CHANGED);
115 filter.addAction(BluetoothAdapter.ACTION_CONNECTION_STATE_CHANGED);
116 filter.addAction(TelephonyIntents.ACTION_SIM_STATE_CHANGED);
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700117 filter.addAction(TelecomManager.ACTION_CURRENT_TTY_MODE_CHANGED);
Adrian Roosc42a1e12014-07-07 23:35:53 +0200118 filter.addAction(Intent.ACTION_USER_SWITCHED);
Daniel Sandlere3b7a2d2011-10-27 16:16:15 -0400119 mContext.registerReceiver(mIntentReceiver, filter, null, mHandler);
120
Wink Saville04e71b32009-04-02 11:00:54 -0700121 // TTY status
John Spurlocka37e9c82014-07-08 09:40:31 -0400122 mService.setIcon(SLOT_TTY, R.drawable.stat_sys_tty_mode, 0, null);
123 mService.setIconVisibility(SLOT_TTY, false);
Wink Saville04e71b32009-04-02 11:00:54 -0700124
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800125 // bluetooth status
Jorim Jaggi2d75f9f2014-10-08 17:10:58 -0700126 updateBluetooth();
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800127
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800128 // Alarm clock
John Spurlocka37e9c82014-07-08 09:40:31 -0400129 mService.setIcon(SLOT_ALARM_CLOCK, R.drawable.stat_sys_alarm, 0, null);
130 mService.setIconVisibility(SLOT_ALARM_CLOCK, false);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800131
John Spurlocka37e9c82014-07-08 09:40:31 -0400132 // zen
133 mService.setIcon(SLOT_ZEN, R.drawable.stat_sys_zen_important, 0, null);
134 mService.setIconVisibility(SLOT_ZEN, false);
135
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800136 // volume
John Spurlockad494bc2014-07-19 15:56:19 -0400137 mService.setIcon(SLOT_VOLUME, R.drawable.stat_sys_ringer_vibrate, 0, null);
John Spurlocka37e9c82014-07-08 09:40:31 -0400138 mService.setIconVisibility(SLOT_VOLUME, false);
139 updateVolumeZen();
John Spurlock96fe98d2014-08-27 09:36:02 -0400140
141 // cast
142 mService.setIcon(SLOT_CAST, R.drawable.stat_sys_cast, 0, null);
143 mService.setIconVisibility(SLOT_CAST, false);
144 mCast.addCallback(mCastCallback);
Jason Monk952d5d82014-10-27 15:28:22 -0400145
146 // hotspot
147 mService.setIcon(SLOT_HOTSPOT, R.drawable.stat_sys_hotspot, 0, null);
148 mService.setIconVisibility(SLOT_HOTSPOT, mHotspot.isHotspotEnabled());
149 mHotspot.addCallback(mHotspotCallback);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800150 }
151
John Spurlockae641c92014-06-30 18:11:40 -0400152 public void setZenMode(int zen) {
John Spurlockba2c6a02014-05-19 09:44:06 -0400153 mZen = zen;
John Spurlocka37e9c82014-07-08 09:40:31 -0400154 updateVolumeZen();
John Spurlockba2c6a02014-05-19 09:44:06 -0400155 }
156
Adrian Roosc42a1e12014-07-07 23:35:53 +0200157 private void updateAlarm() {
158 AlarmManager alarmManager = (AlarmManager) mContext.getSystemService(Context.ALARM_SERVICE);
John Spurlock5b13e922015-01-07 11:04:58 -0500159 boolean alarmSet = alarmManager.getNextAlarmClock(UserHandle.USER_CURRENT) != null;
John Spurlocka37e9c82014-07-08 09:40:31 -0400160 mService.setIconVisibility(SLOT_ALARM_CLOCK, alarmSet);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800161 }
162
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800163 private final void updateSimState(Intent intent) {
Wink Savillea639b312012-07-10 12:37:54 -0700164 String stateExtra = intent.getStringExtra(IccCardConstants.INTENT_KEY_ICC_STATE);
165 if (IccCardConstants.INTENT_VALUE_ICC_ABSENT.equals(stateExtra)) {
166 mSimState = IccCardConstants.State.ABSENT;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800167 }
Rakesh Pallerlaf099a5f2013-02-06 11:44:23 +0530168 else if (IccCardConstants.INTENT_VALUE_ICC_CARD_IO_ERROR.equals(stateExtra)) {
169 mSimState = IccCardConstants.State.CARD_IO_ERROR;
170 }
Wink Savillea639b312012-07-10 12:37:54 -0700171 else if (IccCardConstants.INTENT_VALUE_ICC_READY.equals(stateExtra)) {
172 mSimState = IccCardConstants.State.READY;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800173 }
Wink Savillea639b312012-07-10 12:37:54 -0700174 else if (IccCardConstants.INTENT_VALUE_ICC_LOCKED.equals(stateExtra)) {
175 final String lockedReason =
176 intent.getStringExtra(IccCardConstants.INTENT_KEY_LOCKED_REASON);
177 if (IccCardConstants.INTENT_VALUE_LOCKED_ON_PIN.equals(lockedReason)) {
178 mSimState = IccCardConstants.State.PIN_REQUIRED;
johnwang347c5a22009-08-24 22:11:11 -0700179 }
Wink Savillea639b312012-07-10 12:37:54 -0700180 else if (IccCardConstants.INTENT_VALUE_LOCKED_ON_PUK.equals(lockedReason)) {
181 mSimState = IccCardConstants.State.PUK_REQUIRED;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800182 }
183 else {
Wink Savillea639b312012-07-10 12:37:54 -0700184 mSimState = IccCardConstants.State.NETWORK_LOCKED;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800185 }
186 } else {
Wink Savillea639b312012-07-10 12:37:54 -0700187 mSimState = IccCardConstants.State.UNKNOWN;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800188 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800189 }
190
John Spurlockbcc10872014-11-28 15:29:21 -0500191 private final void updateVolumeZen() {
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800192 AudioManager audioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);
John Spurlocka37e9c82014-07-08 09:40:31 -0400193
194 boolean zenVisible = false;
195 int zenIconId = 0;
196 String zenDescription = null;
197
198 boolean volumeVisible = false;
199 int volumeIconId = 0;
200 String volumeDescription = null;
201
John Spurlockf88d8082015-03-25 18:09:51 -0400202 if (DndTile.isVisible(mContext) || DndTile.isCombinedIcon(mContext)) {
John Spurlock3c4076a2015-02-24 12:12:25 -0500203 zenVisible = mZen != Global.ZEN_MODE_OFF;
204 zenIconId = R.drawable.stat_sys_dnd;
205 zenDescription = mContext.getString(R.string.quick_settings_dnd_label);
206 } else if (mZen == Global.ZEN_MODE_NO_INTERRUPTIONS) {
John Spurlocka37e9c82014-07-08 09:40:31 -0400207 zenVisible = true;
208 zenIconId = R.drawable.stat_sys_zen_none;
209 zenDescription = mContext.getString(R.string.zen_no_interruptions);
John Spurlockae641c92014-06-30 18:11:40 -0400210 } else if (mZen == Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS) {
John Spurlocka37e9c82014-07-08 09:40:31 -0400211 zenVisible = true;
212 zenIconId = R.drawable.stat_sys_zen_important;
213 zenDescription = mContext.getString(R.string.zen_important_interruptions);
Svetoslav Ganov6179ea32011-06-28 01:12:41 -0700214 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800215
John Spurlocka48d7792015-03-03 17:35:57 -0500216 if (DndTile.isVisible(mContext)
217 && audioManager.getRingerModeInternal() == AudioManager.RINGER_MODE_SILENT) {
218 volumeVisible = true;
219 volumeIconId = R.drawable.stat_sys_ringer_silent;
220 volumeDescription = mContext.getString(R.string.accessibility_ringer_silent);
221 } else if (mZen != Global.ZEN_MODE_NO_INTERRUPTIONS &&
John Spurlock661f2cf2014-11-17 10:29:10 -0500222 audioManager.getRingerModeInternal() == AudioManager.RINGER_MODE_VIBRATE) {
John Spurlocka37e9c82014-07-08 09:40:31 -0400223 volumeVisible = true;
224 volumeIconId = R.drawable.stat_sys_ringer_vibrate;
225 volumeDescription = mContext.getString(R.string.accessibility_ringer_vibrate);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800226 }
John Spurlocka37e9c82014-07-08 09:40:31 -0400227
228 if (zenVisible) {
229 mService.setIcon(SLOT_ZEN, zenIconId, 0, zenDescription);
230 }
231 if (zenVisible != mZenVisible) {
232 mService.setIconVisibility(SLOT_ZEN, zenVisible);
233 mZenVisible = zenVisible;
234 }
235
236 if (volumeVisible) {
237 mService.setIcon(SLOT_VOLUME, volumeIconId, 0, volumeDescription);
238 }
239 if (volumeVisible != mVolumeVisible) {
240 mService.setIconVisibility(SLOT_VOLUME, volumeVisible);
241 mVolumeVisible = volumeVisible;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800242 }
243 }
244
Jorim Jaggi2d75f9f2014-10-08 17:10:58 -0700245 private final void updateBluetooth() {
246 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
Joe Onorato798ac4c2010-05-27 16:39:00 -0400247 int iconId = R.drawable.stat_sys_data_bluetooth;
Jorim Jaggi2d75f9f2014-10-08 17:10:58 -0700248 String contentDescription =
249 mContext.getString(R.string.accessibility_bluetooth_disconnected);
250 if (adapter != null) {
251 mBluetoothEnabled = (adapter.getState() == BluetoothAdapter.STATE_ON);
252 if (adapter.getConnectionState() == BluetoothAdapter.STATE_CONNECTED) {
Jaikumar Ganeshd9bb6882010-09-27 17:05:24 -0700253 iconId = R.drawable.stat_sys_data_bluetooth_connected;
Svetoslav Ganov6179ea32011-06-28 01:12:41 -0700254 contentDescription = mContext.getString(R.string.accessibility_bluetooth_connected);
Jaikumar Ganesh084c6652009-12-07 10:58:18 -0800255 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800256 } else {
Jorim Jaggi2d75f9f2014-10-08 17:10:58 -0700257 mBluetoothEnabled = false;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800258 }
Wink Savillee9b06d72009-05-18 21:47:50 -0700259
John Spurlocka37e9c82014-07-08 09:40:31 -0400260 mService.setIcon(SLOT_BLUETOOTH, iconId, 0, contentDescription);
261 mService.setIconVisibility(SLOT_BLUETOOTH, mBluetoothEnabled);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800262 }
263
Wink Savillee9b06d72009-05-18 21:47:50 -0700264 private final void updateTTY(Intent intent) {
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700265 int currentTtyMode = intent.getIntExtra(TelecomManager.EXTRA_CURRENT_TTY_MODE,
266 TelecomManager.TTY_MODE_OFF);
267 boolean enabled = currentTtyMode != TelecomManager.TTY_MODE_OFF;
Wink Saville04e71b32009-04-02 11:00:54 -0700268
John Spurlocka37e9c82014-07-08 09:40:31 -0400269 if (DEBUG) Log.v(TAG, "updateTTY: enabled: " + enabled);
Wink Saville04e71b32009-04-02 11:00:54 -0700270
271 if (enabled) {
272 // TTY is on
John Spurlocka37e9c82014-07-08 09:40:31 -0400273 if (DEBUG) Log.v(TAG, "updateTTY: set TTY on");
274 mService.setIcon(SLOT_TTY, R.drawable.stat_sys_tty_mode, 0,
Svetoslav Ganov6179ea32011-06-28 01:12:41 -0700275 mContext.getString(R.string.accessibility_tty_enabled));
John Spurlocka37e9c82014-07-08 09:40:31 -0400276 mService.setIconVisibility(SLOT_TTY, true);
Wink Saville04e71b32009-04-02 11:00:54 -0700277 } else {
278 // TTY is off
John Spurlocka37e9c82014-07-08 09:40:31 -0400279 if (DEBUG) Log.v(TAG, "updateTTY: set TTY off");
280 mService.setIconVisibility(SLOT_TTY, false);
Wink Saville04e71b32009-04-02 11:00:54 -0700281 }
282 }
John Spurlock96fe98d2014-08-27 09:36:02 -0400283
284 private void updateCast() {
285 boolean isCasting = false;
286 for (CastDevice device : mCast.getCastDevices()) {
287 if (device.state == CastDevice.STATE_CONNECTING
288 || device.state == CastDevice.STATE_CONNECTED) {
289 isCasting = true;
290 break;
291 }
292 }
293 if (DEBUG) Log.v(TAG, "updateCast: isCasting: " + isCasting);
294 if (isCasting) {
295 mService.setIcon(SLOT_CAST, R.drawable.stat_sys_cast, 0,
296 mContext.getString(R.string.accessibility_casting));
297 }
298 mService.setIconVisibility(SLOT_CAST, isCasting);
299 }
300
Jason Monk952d5d82014-10-27 15:28:22 -0400301 private final HotspotController.Callback mHotspotCallback = new HotspotController.Callback() {
302 @Override
303 public void onHotspotChanged(boolean enabled) {
304 mService.setIconVisibility(SLOT_HOTSPOT, enabled);
305 }
306 };
307
John Spurlock96fe98d2014-08-27 09:36:02 -0400308 private final CastController.Callback mCastCallback = new CastController.Callback() {
309 @Override
310 public void onCastDevicesChanged() {
311 updateCast();
312 }
313 };
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800314}