blob: 5282b29c6d357491fc5bcee153037c3c9ac3822a [file] [log] [blame]
Santos Cordon7d4ddf62013-07-10 11:58:08 -07001/*
2 * Copyright (C) 2006 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.phone;
18
19import android.app.Activity;
20import android.app.KeyguardManager;
Santos Cordon7d4ddf62013-07-10 11:58:08 -070021import android.app.ProgressDialog;
Santos Cordon7d4ddf62013-07-10 11:58:08 -070022import android.content.BroadcastReceiver;
Santos Cordon7d4ddf62013-07-10 11:58:08 -070023import android.content.ContentResolver;
24import android.content.Context;
25import android.content.ContextWrapper;
26import android.content.Intent;
27import android.content.IntentFilter;
Santos Cordon7d4ddf62013-07-10 11:58:08 -070028import android.media.AudioManager;
Santos Cordone18902f2016-03-22 17:16:04 -070029import android.net.ConnectivityManager;
Santos Cordon7d4ddf62013-07-10 11:58:08 -070030import android.net.Uri;
Brad Ebinger533c6c12017-08-02 11:38:48 -070031import android.net.sip.SipManager;
Santos Cordon7d4ddf62013-07-10 11:58:08 -070032import android.os.AsyncResult;
Junda Liu605148f2015-04-28 15:23:40 -070033import android.os.Bundle;
Santos Cordon7d4ddf62013-07-10 11:58:08 -070034import android.os.Handler;
Santos Cordon7d4ddf62013-07-10 11:58:08 -070035import android.os.Message;
Jonathan Basseric31f1f32015-05-12 10:13:03 -070036import android.os.PersistableBundle;
Santos Cordon7d4ddf62013-07-10 11:58:08 -070037import android.os.PowerManager;
Santos Cordon7d4ddf62013-07-10 11:58:08 -070038import android.os.SystemClock;
39import android.os.SystemProperties;
40import android.os.UpdateLock;
Brad Ebinger3fa43462016-04-12 16:06:48 -070041import android.os.UserManager;
Santos Cordon7d4ddf62013-07-10 11:58:08 -070042import android.preference.PreferenceManager;
Sanket Padawe4c699232016-02-09 11:07:22 -080043import android.provider.Settings;
Tyler Gunn900d8fd2018-09-21 09:22:12 -070044import android.telecom.TelecomManager;
Junda Liu12f7d802015-05-01 12:06:44 -070045import android.telephony.CarrierConfigManager;
Santos Cordon7d4ddf62013-07-10 11:58:08 -070046import android.telephony.ServiceState;
Andrew Lee385019f2014-11-24 14:19:50 -080047import android.telephony.SubscriptionManager;
Jack Yu1a2fc352017-07-14 17:14:37 -070048import android.telephony.TelephonyManager;
49import android.util.LocalLog;
Santos Cordon7d4ddf62013-07-10 11:58:08 -070050import android.util.Log;
Santos Cordone18902f2016-03-22 17:16:04 -070051import android.widget.Toast;
Ta-wei Yenb29425b2016-09-21 17:28:14 -070052
Santos Cordon7d4ddf62013-07-10 11:58:08 -070053import com.android.internal.telephony.CallManager;
Santos Cordon7d4ddf62013-07-10 11:58:08 -070054import com.android.internal.telephony.IccCardConstants;
55import com.android.internal.telephony.MmiCode;
56import com.android.internal.telephony.Phone;
57import com.android.internal.telephony.PhoneConstants;
58import com.android.internal.telephony.PhoneFactory;
Jack Yu1a2fc352017-07-14 17:14:37 -070059import com.android.internal.telephony.SettingsObserver;
Santos Cordon7d4ddf62013-07-10 11:58:08 -070060import com.android.internal.telephony.TelephonyCapabilities;
61import com.android.internal.telephony.TelephonyIntents;
Jack Yu1a2fc352017-07-14 17:14:37 -070062import com.android.internal.telephony.dataconnection.DataConnectionReasons;
63import com.android.internal.telephony.dataconnection.DataConnectionReasons.DataDisallowedReasonType;
64import com.android.internal.util.IndentingPrintWriter;
Andrew Leefb7f92e2015-02-26 16:23:32 -080065import com.android.phone.settings.SettingsConstants;
Ta-wei Yenf0a71bc2017-05-17 12:28:28 -070066import com.android.phone.vvm.CarrierVvmPackageInstalledReceiver;
Brad Ebinger28626122017-08-10 14:13:35 -070067import com.android.services.telephony.sip.SipAccountRegistry;
Brad Ebinger3fa43462016-04-12 16:06:48 -070068import com.android.services.telephony.sip.SipUtil;
Santos Cordon7d4ddf62013-07-10 11:58:08 -070069
Jack Yu1a2fc352017-07-14 17:14:37 -070070import java.io.FileDescriptor;
71import java.io.PrintWriter;
72
Santos Cordon7d4ddf62013-07-10 11:58:08 -070073/**
74 * Global state for the telephony subsystem when running in the primary
75 * phone process.
76 */
Sailesh Nepalbf900542014-07-15 16:18:32 -070077public class PhoneGlobals extends ContextWrapper {
Jack Yu1a2fc352017-07-14 17:14:37 -070078 public static final String LOG_TAG = "PhoneGlobals";
Santos Cordon7d4ddf62013-07-10 11:58:08 -070079
80 /**
81 * Phone app-wide debug level:
82 * 0 - no debug logging
83 * 1 - normal debug logging if ro.debuggable is set (which is true in
84 * "eng" and "userdebug" builds but not "user" builds)
85 * 2 - ultra-verbose debug logging
86 *
87 * Most individual classes in the phone app have a local DBG constant,
88 * typically set to
89 * (PhoneApp.DBG_LEVEL >= 1) && (SystemProperties.getInt("ro.debuggable", 0) == 1)
90 * or else
91 * (PhoneApp.DBG_LEVEL >= 2)
92 * depending on the desired verbosity.
93 *
94 * ***** DO NOT SUBMIT WITH DBG_LEVEL > 0 *************
95 */
Andrew Lee88b51e22014-10-29 15:48:51 -070096 public static final int DBG_LEVEL = 0;
Santos Cordon7d4ddf62013-07-10 11:58:08 -070097
98 private static final boolean DBG =
99 (PhoneGlobals.DBG_LEVEL >= 1) && (SystemProperties.getInt("ro.debuggable", 0) == 1);
100 private static final boolean VDBG = (PhoneGlobals.DBG_LEVEL >= 2);
101
102 // Message codes; see mHandler below.
103 private static final int EVENT_SIM_NETWORK_LOCKED = 3;
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700104 private static final int EVENT_SIM_STATE_CHANGED = 8;
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700105 private static final int EVENT_DATA_ROAMING_DISCONNECTED = 10;
106 private static final int EVENT_DATA_ROAMING_OK = 11;
107 private static final int EVENT_UNSOL_CDMA_INFO_RECORD = 12;
Brad Ebinger3fa43462016-04-12 16:06:48 -0700108 private static final int EVENT_RESTART_SIP = 13;
Jack Yu1a2fc352017-07-14 17:14:37 -0700109 private static final int EVENT_DATA_ROAMING_SETTINGS_CHANGED = 14;
110 private static final int EVENT_MOBILE_DATA_SETTINGS_CHANGED = 15;
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700111
112 // The MMI codes are also used by the InCallScreen.
113 public static final int MMI_INITIATE = 51;
114 public static final int MMI_COMPLETE = 52;
115 public static final int MMI_CANCEL = 53;
116 // Don't use message codes larger than 99 here; those are reserved for
117 // the individual Activities of the Phone UI.
118
Santos Cordone18902f2016-03-22 17:16:04 -0700119 public static final int AIRPLANE_ON = 1;
120 public static final int AIRPLANE_OFF = 0;
121
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700122 /**
123 * Allowable values for the wake lock code.
124 * SLEEP means the device can be put to sleep.
125 * PARTIAL means wake the processor, but we display can be kept off.
126 * FULL means wake both the processor and the display.
127 */
128 public enum WakeState {
129 SLEEP,
130 PARTIAL,
131 FULL
132 }
133
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700134 private static PhoneGlobals sMe;
135
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700136 CallManager mCM;
Santos Cordon63a84242013-07-23 13:32:52 -0700137 CallNotifier notifier;
138 CallerInfoCache callerInfoCache;
Santos Cordon63a84242013-07-23 13:32:52 -0700139 NotificationMgr notificationMgr;
Andrew Lee9431b832015-03-09 18:46:45 -0700140 public PhoneInterfaceManager phoneMgr;
Jonathan Basseri6465afd2015-02-25 13:05:57 -0800141 CarrierConfigLoader configLoader;
Santos Cordon63a84242013-07-23 13:32:52 -0700142
Sandeep Kuntade73a6a2014-10-15 18:45:56 +0530143 private Phone phoneInEcm;
Santos Cordon63a84242013-07-23 13:32:52 -0700144
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700145 static boolean sVoiceCapable = true;
146
Santos Cordonc593d002015-06-03 15:41:15 -0700147 // TODO: Remove, no longer used.
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700148 CdmaPhoneCallState cdmaPhoneCallState;
149
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700150 // The currently-active PUK entry activity and progress dialog.
151 // Normally, these are the Emergency Dialer and the subsequent
152 // progress dialog. null if there is are no such objects in
153 // the foreground.
154 private Activity mPUKEntryActivity;
155 private ProgressDialog mPUKEntryProgressDialog;
156
Jack Yu1a2fc352017-07-14 17:14:37 -0700157 private boolean mNoDataDueToRoaming = false;
Jack Yu953f9352017-05-18 14:41:06 -0700158
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700159 private WakeState mWakeState = WakeState.SLEEP;
160
161 private PowerManager mPowerManager;
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700162 private PowerManager.WakeLock mWakeLock;
163 private PowerManager.WakeLock mPartialWakeLock;
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700164 private KeyguardManager mKeyguardManager;
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700165
166 private UpdateLock mUpdateLock;
167
Jack Yu1a2fc352017-07-14 17:14:37 -0700168 private int mDefaultDataSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID;
169 private final LocalLog mDataRoamingNotifLog = new LocalLog(50);
170
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700171 // Broadcast receiver for various intent broadcasts (see onCreate())
172 private final BroadcastReceiver mReceiver = new PhoneAppBroadcastReceiver();
Brad Ebinger533c6c12017-08-02 11:38:48 -0700173 // Broadcast receiver for SIP based intents (see onCreate())
Brad Ebinger28626122017-08-10 14:13:35 -0700174 private final SipReceiver mSipReceiver = new SipReceiver();
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700175
Ta-wei Yenf0a71bc2017-05-17 12:28:28 -0700176 private final CarrierVvmPackageInstalledReceiver mCarrierVvmPackageInstalledReceiver =
177 new CarrierVvmPackageInstalledReceiver();
178
Jack Yu1a2fc352017-07-14 17:14:37 -0700179 private final SettingsObserver mSettingsObserver;
180
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700181 Handler mHandler = new Handler() {
182 @Override
183 public void handleMessage(Message msg) {
184 PhoneConstants.State phoneState;
Jack Yu1a2fc352017-07-14 17:14:37 -0700185 if (VDBG) Log.v(LOG_TAG, "event=" + msg.what);
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700186 switch (msg.what) {
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700187 // TODO: This event should be handled by the lock screen, just
188 // like the "SIM missing" and "Sim locked" cases (bug 1804111).
189 case EVENT_SIM_NETWORK_LOCKED:
Jonathan Basseri9504c6b2015-06-04 14:23:32 -0700190 if (getCarrierConfig().getBoolean(
191 CarrierConfigManager.KEY_IGNORE_SIM_NETWORK_LOCKED_EVENTS_BOOL)) {
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700192 // Some products don't have the concept of a "SIM network lock"
193 Log.i(LOG_TAG, "Ignoring EVENT_SIM_NETWORK_LOCKED event; "
Eric Erfanian945409f2018-02-21 19:26:15 +0000194 + "not showing 'SIM network unlock' PIN entry screen");
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700195 } else {
196 // Normal case: show the "SIM network unlock" PIN entry screen.
197 // The user won't be able to do anything else until
198 // they enter a valid SIM network PIN.
199 Log.i(LOG_TAG, "show sim depersonal panel");
Biljana Maneva96291112018-01-30 13:12:59 +0800200 Phone phone = (Phone) ((AsyncResult) msg.obj).userObj;
201 IccNetworkDepersonalizationPanel.showDialog(phone);
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700202 }
203 break;
204
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700205 case EVENT_DATA_ROAMING_DISCONNECTED:
Pengquan Meng8783d932017-10-16 14:57:40 -0700206 notificationMgr.showDataDisconnectedRoaming(msg.arg1);
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700207 break;
208
209 case EVENT_DATA_ROAMING_OK:
210 notificationMgr.hideDataDisconnectedRoaming();
211 break;
212
213 case MMI_COMPLETE:
214 onMMIComplete((AsyncResult) msg.obj);
215 break;
216
217 case MMI_CANCEL:
Stuart Scottdcf40a92014-12-09 10:45:01 -0800218 PhoneUtils.cancelMmiCode(mCM.getFgPhone());
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700219 break;
220
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700221 case EVENT_SIM_STATE_CHANGED:
222 // Marks the event where the SIM goes into ready state.
223 // Right now, this is only used for the PUK-unlocking
224 // process.
225 if (msg.obj.equals(IccCardConstants.INTENT_VALUE_ICC_READY)) {
226 // when the right event is triggered and there
227 // are UI objects in the foreground, we close
228 // them to display the lock panel.
229 if (mPUKEntryActivity != null) {
230 mPUKEntryActivity.finish();
231 mPUKEntryActivity = null;
232 }
233 if (mPUKEntryProgressDialog != null) {
234 mPUKEntryProgressDialog.dismiss();
235 mPUKEntryProgressDialog = null;
236 }
237 }
238 break;
239
240 case EVENT_UNSOL_CDMA_INFO_RECORD:
241 //TODO: handle message here;
242 break;
Brad Ebinger3fa43462016-04-12 16:06:48 -0700243 case EVENT_RESTART_SIP:
244 // This should only run if the Phone process crashed and was restarted. We do
245 // not want this running if the device is still in the FBE encrypted state.
Brad Ebinger28626122017-08-10 14:13:35 -0700246 // This is the same procedure that is triggered in the SipIncomingCallReceiver
Brad Ebinger3fa43462016-04-12 16:06:48 -0700247 // upon BOOT_COMPLETED.
248 UserManager userManager = UserManager.get(sMe);
249 if (userManager != null && userManager.isUserUnlocked()) {
250 SipUtil.startSipService();
251 }
252 break;
Jack Yu1a2fc352017-07-14 17:14:37 -0700253 case EVENT_DATA_ROAMING_SETTINGS_CHANGED:
254 case EVENT_MOBILE_DATA_SETTINGS_CHANGED:
255 updateDataRoamingStatus();
256 break;
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700257 }
258 }
259 };
260
261 public PhoneGlobals(Context context) {
262 super(context);
263 sMe = this;
Jack Yu1a2fc352017-07-14 17:14:37 -0700264 mSettingsObserver = new SettingsObserver(context, mHandler);
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700265 }
266
267 public void onCreate() {
268 if (VDBG) Log.v(LOG_TAG, "onCreate()...");
269
270 ContentResolver resolver = getContentResolver();
271
272 // Cache the "voice capable" flag.
273 // This flag currently comes from a resource (which is
274 // overrideable on a per-product basis):
275 sVoiceCapable =
276 getResources().getBoolean(com.android.internal.R.bool.config_voice_capable);
277 // ...but this might eventually become a PackageManager "system
278 // feature" instead, in which case we'd do something like:
279 // sVoiceCapable =
280 // getPackageManager().hasSystemFeature(PackageManager.FEATURE_TELEPHONY_VOICE_CALLS);
281
Stuart Scottdcf40a92014-12-09 10:45:01 -0800282 if (mCM == null) {
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700283 // Initialize the telephony framework
284 PhoneFactory.makeDefaultPhones(this);
285
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700286 // Start TelephonyDebugService After the default phone is created.
287 Intent intent = new Intent(this, TelephonyDebugService.class);
288 startService(intent);
289
290 mCM = CallManager.getInstance();
Stuart Scottdcf40a92014-12-09 10:45:01 -0800291 for (Phone phone : PhoneFactory.getPhones()) {
292 mCM.registerPhone(phone);
Stuart Scottdcf40a92014-12-09 10:45:01 -0800293 }
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700294
295 // Create the NotificationMgr singleton, which is used to display
296 // status bar icons and control other status bar behavior.
297 notificationMgr = NotificationMgr.init(this);
298
Brad Ebinger3fa43462016-04-12 16:06:48 -0700299 // If PhoneGlobals has crashed and is being restarted, then restart.
300 mHandler.sendEmptyMessage(EVENT_RESTART_SIP);
301
Anthony Lee03ebdfc2015-07-27 08:12:02 -0700302 // Create an instance of CdmaPhoneCallState and initialize it to IDLE
303 cdmaPhoneCallState = new CdmaPhoneCallState();
304 cdmaPhoneCallState.CdmaPhoneCallStateInit();
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700305
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700306 // before registering for phone state changes
307 mPowerManager = (PowerManager) getSystemService(Context.POWER_SERVICE);
308 mWakeLock = mPowerManager.newWakeLock(PowerManager.FULL_WAKE_LOCK, LOG_TAG);
309 // lock used to keep the processor awake, when we don't care for the display.
310 mPartialWakeLock = mPowerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK
311 | PowerManager.ON_AFTER_RELEASE, LOG_TAG);
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700312
313 mKeyguardManager = (KeyguardManager) getSystemService(Context.KEYGUARD_SERVICE);
314
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700315 // Get UpdateLock to suppress system-update related events (e.g. dialog show-up)
316 // during phone calls.
317 mUpdateLock = new UpdateLock("phone");
318
319 if (DBG) Log.d(LOG_TAG, "onCreate: mUpdateLock: " + mUpdateLock);
320
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700321 // Create the CallerInfoCache singleton, which remembers custom ring tone and
322 // send-to-voicemail settings.
323 //
324 // The asynchronous caching will start just after this call.
325 callerInfoCache = CallerInfoCache.init(this);
326
Stuart Scottdcf40a92014-12-09 10:45:01 -0800327 phoneMgr = PhoneInterfaceManager.init(this, PhoneFactory.getDefaultPhone());
Santos Cordon406c0342013-08-28 00:07:47 -0700328
Jonathan Basseri6465afd2015-02-25 13:05:57 -0800329 configLoader = CarrierConfigLoader.init(this);
330
Jack Yu1a2fc352017-07-14 17:14:37 -0700331 // Create the CallNotifier singleton, which handles
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700332 // asynchronous events from the telephony layer (like
333 // launching the incoming-call UI when an incoming call comes
334 // in.)
Brad Ebingera9c6b6d2016-01-07 17:24:16 -0800335 notifier = CallNotifier.init(this);
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700336
Stuart Scottdcf40a92014-12-09 10:45:01 -0800337 PhoneUtils.registerIccStatus(mHandler, EVENT_SIM_NETWORK_LOCKED);
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700338
339 // register for MMI/USSD
340 mCM.registerForMmiComplete(mHandler, MMI_COMPLETE, null);
341
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700342 // Register for misc other intent broadcasts.
343 IntentFilter intentFilter =
344 new IntentFilter(Intent.ACTION_AIRPLANE_MODE_CHANGED);
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700345 intentFilter.addAction(TelephonyIntents.ACTION_SIM_STATE_CHANGED);
346 intentFilter.addAction(TelephonyIntents.ACTION_RADIO_TECHNOLOGY_CHANGED);
347 intentFilter.addAction(TelephonyIntents.ACTION_SERVICE_STATE_CHANGED);
348 intentFilter.addAction(TelephonyIntents.ACTION_EMERGENCY_CALLBACK_MODE_CHANGED);
Jack Yu1a2fc352017-07-14 17:14:37 -0700349 intentFilter.addAction(TelephonyIntents.ACTION_DEFAULT_DATA_SUBSCRIPTION_CHANGED);
350 intentFilter.addAction(CarrierConfigManager.ACTION_CARRIER_CONFIG_CHANGED);
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700351 registerReceiver(mReceiver, intentFilter);
352
Brad Ebinger533c6c12017-08-02 11:38:48 -0700353 IntentFilter sipIntentFilter = new IntentFilter(Intent.ACTION_BOOT_COMPLETED);
Brad Ebinger533c6c12017-08-02 11:38:48 -0700354 sipIntentFilter.addAction(SipManager.ACTION_SIP_SERVICE_UP);
355 sipIntentFilter.addAction(SipManager.ACTION_SIP_CALL_OPTION_CHANGED);
356 sipIntentFilter.addAction(SipManager.ACTION_SIP_REMOVE_PHONE);
Brad Ebinger28626122017-08-10 14:13:35 -0700357 registerReceiver(mSipReceiver, sipIntentFilter);
Brad Ebinger533c6c12017-08-02 11:38:48 -0700358
Ta-wei Yenf0a71bc2017-05-17 12:28:28 -0700359 mCarrierVvmPackageInstalledReceiver.register(this);
360
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700361 //set the default values for the preferences in the phone.
pkanward702e542017-02-08 15:44:54 -0800362 PreferenceManager.setDefaultValues(this, R.xml.network_setting_fragment, false);
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700363
364 PreferenceManager.setDefaultValues(this, R.xml.call_feature_setting, false);
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700365 }
366
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700367 // XXX pre-load the SimProvider so that it's ready
368 resolver.getType(Uri.parse("content://icc/adn"));
369
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700370 // TODO: Register for Cdma Information Records
371 // phone.registerCdmaInformationRecord(mHandler, EVENT_UNSOL_CDMA_INFO_RECORD, null);
372
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700373 // Read HAC settings and configure audio hardware
374 if (getResources().getBoolean(R.bool.hac_enabled)) {
Stuart Scottdcf40a92014-12-09 10:45:01 -0800375 int hac = android.provider.Settings.System.getInt(
376 getContentResolver(),
377 android.provider.Settings.System.HEARING_AID,
378 0);
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700379 AudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
Andrew Leefb7f92e2015-02-26 16:23:32 -0800380 audioManager.setParameter(SettingsConstants.HAC_KEY,
381 hac == SettingsConstants.HAC_ENABLED
382 ? SettingsConstants.HAC_VAL_ON : SettingsConstants.HAC_VAL_OFF);
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700383 }
Santos Cordonff506f52013-11-21 19:13:19 -0800384 }
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700385
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700386 /**
387 * Returns the singleton instance of the PhoneApp.
388 */
Sailesh Nepal1eaf22b2014-02-22 17:00:49 -0800389 public static PhoneGlobals getInstance() {
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700390 if (sMe == null) {
391 throw new IllegalStateException("No PhoneGlobals here!");
392 }
393 return sMe;
394 }
395
396 /**
Stuart Scottdcf40a92014-12-09 10:45:01 -0800397 * Returns the default phone.
398 *
Andrew Lee385019f2014-11-24 14:19:50 -0800399 * WARNING: This method should be used carefully, now that there may be multiple phones.
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700400 */
Andrew Lee83383e42014-10-31 12:42:28 -0700401 public static Phone getPhone() {
Stuart Scottdcf40a92014-12-09 10:45:01 -0800402 return PhoneFactory.getDefaultPhone();
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700403 }
404
Andrew Lee2fcb6c32014-12-04 14:52:35 -0800405 public static Phone getPhone(int subId) {
406 return PhoneFactory.getPhone(SubscriptionManager.getPhoneId(subId));
Andrew Lee385019f2014-11-24 14:19:50 -0800407 }
408
Santos Cordonde10b752013-09-19 04:11:33 -0700409 /* package */ CallManager getCallManager() {
410 return mCM;
411 }
412
Chris Manton4e9fa912015-06-19 11:26:57 -0700413 public PersistableBundle getCarrierConfig() {
Shishir Agrawald3480e02016-01-25 13:05:49 -0800414 return getCarrierConfigForSubId(SubscriptionManager.getDefaultSubscriptionId());
Jonathan Basseri89b0ab42015-05-01 10:52:40 -0700415 }
416
Chris Manton4e9fa912015-06-19 11:26:57 -0700417 public PersistableBundle getCarrierConfigForSubId(int subId) {
Malcolm Chen45b51c72018-03-01 13:58:03 -0800418 return configLoader.getConfigForSubId(subId, getOpPackageName());
Junda Liu605148f2015-04-28 15:23:40 -0700419 }
420
Jack Yu1a2fc352017-07-14 17:14:37 -0700421 private void registerSettingsObserver() {
422 mSettingsObserver.unobserve();
423 String dataRoamingSetting = Settings.Global.DATA_ROAMING;
424 String mobileDataSetting = Settings.Global.MOBILE_DATA;
425 if (TelephonyManager.getDefault().getSimCount() > 1) {
426 int subId = mDefaultDataSubId;
427 if (subId != SubscriptionManager.INVALID_SUBSCRIPTION_ID) {
428 dataRoamingSetting += subId;
429 mobileDataSetting += subId;
430 }
431 }
432
433 // Listen for user data roaming setting changed event
434 mSettingsObserver.observe(Settings.Global.getUriFor(dataRoamingSetting),
435 EVENT_DATA_ROAMING_SETTINGS_CHANGED);
436
437 // Listen for mobile data setting changed event
438 mSettingsObserver.observe(Settings.Global.getUriFor(mobileDataSetting),
439 EVENT_MOBILE_DATA_SETTINGS_CHANGED);
440 }
441
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700442 /**
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700443 * Sets the activity responsible for un-PUK-blocking the device
444 * so that we may close it when we receive a positive result.
445 * mPUKEntryActivity is also used to indicate to the device that
446 * we are trying to un-PUK-lock the phone. In other words, iff
447 * it is NOT null, then we are trying to unlock and waiting for
448 * the SIM to move to READY state.
449 *
450 * @param activity is the activity to close when PUK has
451 * finished unlocking. Can be set to null to indicate the unlock
452 * or SIM READYing process is over.
453 */
454 void setPukEntryActivity(Activity activity) {
455 mPUKEntryActivity = activity;
456 }
457
458 Activity getPUKEntryActivity() {
459 return mPUKEntryActivity;
460 }
461
462 /**
463 * Sets the dialog responsible for notifying the user of un-PUK-
464 * blocking - SIM READYing progress, so that we may dismiss it
465 * when we receive a positive result.
466 *
467 * @param dialog indicates the progress dialog informing the user
468 * of the state of the device. Dismissed upon completion of
469 * READYing process
470 */
471 void setPukEntryProgressDialog(ProgressDialog dialog) {
472 mPUKEntryProgressDialog = dialog;
473 }
474
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700475 /**
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700476 * If we are not currently keeping the screen on, then poke the power
477 * manager to wake up the screen for the user activity timeout duration.
478 */
479 /* package */ void wakeUpScreen() {
480 synchronized (this) {
481 if (mWakeState == WakeState.SLEEP) {
482 if (DBG) Log.d(LOG_TAG, "pulse screen lock");
Dianne Hackborn148769b2015-07-13 17:55:47 -0700483 mPowerManager.wakeUp(SystemClock.uptimeMillis(), "android.phone:WAKE");
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700484 }
485 }
486 }
487
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700488 KeyguardManager getKeyguardManager() {
489 return mKeyguardManager;
490 }
491
492 private void onMMIComplete(AsyncResult r) {
493 if (VDBG) Log.d(LOG_TAG, "onMMIComplete()...");
494 MmiCode mmiCode = (MmiCode) r.result;
Stuart Scottdcf40a92014-12-09 10:45:01 -0800495 PhoneUtils.displayMMIComplete(mmiCode.getPhone(), getInstance(), mmiCode, null, null);
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700496 }
497
fionaxu80126972017-02-01 17:01:26 -0800498 private void initForNewRadioTechnology() {
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700499 if (DBG) Log.d(LOG_TAG, "initForNewRadioTechnology...");
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700500 notifier.updateCallNotifierRegistrationsAfterRadioTechnologyChange();
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700501 }
502
Chris Mantona09f3632016-02-09 14:48:42 -0800503 private void handleAirplaneModeChange(Context context, int newMode) {
504 int cellState = Settings.Global.getInt(context.getContentResolver(),
505 Settings.Global.CELL_ON, PhoneConstants.CELL_ON_FLAG);
506 boolean isAirplaneNewlyOn = (newMode == 1);
507 switch (cellState) {
508 case PhoneConstants.CELL_OFF_FLAG:
509 // Airplane mode does not affect the cell radio if user
510 // has turned it off.
511 break;
512 case PhoneConstants.CELL_ON_FLAG:
513 maybeTurnCellOff(context, isAirplaneNewlyOn);
514 break;
515 case PhoneConstants.CELL_OFF_DUE_TO_AIRPLANE_MODE_FLAG:
516 maybeTurnCellOn(context, isAirplaneNewlyOn);
517 break;
518 }
519 }
520
521 /*
522 * Returns true if the radio must be turned off when entering airplane mode.
523 */
524 private boolean isCellOffInAirplaneMode(Context context) {
525 String airplaneModeRadios = Settings.Global.getString(context.getContentResolver(),
526 Settings.Global.AIRPLANE_MODE_RADIOS);
527 return airplaneModeRadios == null
528 || airplaneModeRadios.contains(Settings.Global.RADIO_CELL);
529 }
530
531 private void setRadioPowerOff(Context context) {
532 Log.i(LOG_TAG, "Turning radio off - airplane");
533 Settings.Global.putInt(context.getContentResolver(), Settings.Global.CELL_ON,
Eric Erfanian945409f2018-02-21 19:26:15 +0000534 PhoneConstants.CELL_OFF_DUE_TO_AIRPLANE_MODE_FLAG);
Sooraj Sasindran798bafa2017-04-03 22:49:00 -0700535 SystemProperties.set("persist.radio.airplane_mode_on", "1");
Chris Mantona09f3632016-02-09 14:48:42 -0800536 Settings.Global.putInt(getContentResolver(), Settings.Global.ENABLE_CELLULAR_ON_BOOT, 0);
537 PhoneUtils.setRadioPower(false);
538 }
539
540 private void setRadioPowerOn(Context context) {
541 Log.i(LOG_TAG, "Turning radio on - airplane");
542 Settings.Global.putInt(context.getContentResolver(), Settings.Global.CELL_ON,
543 PhoneConstants.CELL_ON_FLAG);
544 Settings.Global.putInt(getContentResolver(), Settings.Global.ENABLE_CELLULAR_ON_BOOT,
545 1);
Sooraj Sasindran798bafa2017-04-03 22:49:00 -0700546 SystemProperties.set("persist.radio.airplane_mode_on", "0");
Chris Mantona09f3632016-02-09 14:48:42 -0800547 PhoneUtils.setRadioPower(true);
548 }
549
550 private void maybeTurnCellOff(Context context, boolean isAirplaneNewlyOn) {
551 if (isAirplaneNewlyOn) {
Santos Cordone18902f2016-03-22 17:16:04 -0700552 // If we are trying to turn off the radio, make sure there are no active
553 // emergency calls. If there are, switch airplane mode back to off.
Tyler Gunn900d8fd2018-09-21 09:22:12 -0700554 TelecomManager tm = (TelecomManager) context.getSystemService(TELECOM_SERVICE);
555
556 if (tm != null && tm.isInEmergencyCall()) {
Santos Cordone18902f2016-03-22 17:16:04 -0700557 // Switch airplane mode back to off.
558 ConnectivityManager.from(this).setAirplaneMode(false);
559 Toast.makeText(this, R.string.radio_off_during_emergency_call, Toast.LENGTH_LONG)
560 .show();
561 Log.i(LOG_TAG, "Ignoring airplane mode: emergency call. Turning airplane off");
Chris Mantona09f3632016-02-09 14:48:42 -0800562 } else if (isCellOffInAirplaneMode(context)) {
563 setRadioPowerOff(context);
Santos Cordone18902f2016-03-22 17:16:04 -0700564 } else {
Chris Mantona09f3632016-02-09 14:48:42 -0800565 Log.i(LOG_TAG, "Ignoring airplane mode: settings prevent cell radio power off");
Santos Cordone18902f2016-03-22 17:16:04 -0700566 }
Chris Mantona09f3632016-02-09 14:48:42 -0800567 }
568 }
569
570 private void maybeTurnCellOn(Context context, boolean isAirplaneNewlyOn) {
571 if (!isAirplaneNewlyOn) {
572 setRadioPowerOn(context);
Santos Cordone18902f2016-03-22 17:16:04 -0700573 }
574 }
575
Santos Cordon593ab382013-08-06 21:58:23 -0700576 /**
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700577 * Receiver for misc intent broadcasts the Phone app cares about.
578 */
579 private class PhoneAppBroadcastReceiver extends BroadcastReceiver {
580 @Override
581 public void onReceive(Context context, Intent intent) {
582 String action = intent.getAction();
583 if (action.equals(Intent.ACTION_AIRPLANE_MODE_CHANGED)) {
Santos Cordone18902f2016-03-22 17:16:04 -0700584 int airplaneMode = Settings.Global.getInt(getContentResolver(),
585 Settings.Global.AIRPLANE_MODE_ON, AIRPLANE_OFF);
586 // Treat any non-OFF values as ON.
587 if (airplaneMode != AIRPLANE_OFF) {
588 airplaneMode = AIRPLANE_ON;
589 }
Chris Mantona09f3632016-02-09 14:48:42 -0800590 handleAirplaneModeChange(context, airplaneMode);
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700591 } else if ((action.equals(TelephonyIntents.ACTION_SIM_STATE_CHANGED)) &&
592 (mPUKEntryActivity != null)) {
593 // if an attempt to un-PUK-lock the device was made, while we're
594 // receiving this state change notification, notify the handler.
595 // NOTE: This is ONLY triggered if an attempt to un-PUK-lock has
596 // been attempted.
597 mHandler.sendMessage(mHandler.obtainMessage(EVENT_SIM_STATE_CHANGED,
598 intent.getStringExtra(IccCardConstants.INTENT_KEY_ICC_STATE)));
599 } else if (action.equals(TelephonyIntents.ACTION_RADIO_TECHNOLOGY_CHANGED)) {
600 String newPhone = intent.getStringExtra(PhoneConstants.PHONE_NAME_KEY);
fionaxu80126972017-02-01 17:01:26 -0800601 Log.d(LOG_TAG, "Radio technology switched. Now " + newPhone + " is active.");
602 initForNewRadioTechnology();
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700603 } else if (action.equals(TelephonyIntents.ACTION_SERVICE_STATE_CHANGED)) {
604 handleServiceStateChanged(intent);
605 } else if (action.equals(TelephonyIntents.ACTION_EMERGENCY_CALLBACK_MODE_CHANGED)) {
Sandeep Kuntade73a6a2014-10-15 18:45:56 +0530606 int phoneId = intent.getIntExtra(PhoneConstants.PHONE_KEY, 0);
Srikanth Chintala079912a2016-03-03 16:35:01 +0530607 phoneInEcm = PhoneFactory.getPhone(phoneId);
Sandeep Kuntade73a6a2014-10-15 18:45:56 +0530608 Log.d(LOG_TAG, "Emergency Callback Mode. phoneId:" + phoneId);
609 if (phoneInEcm != null) {
610 if (TelephonyCapabilities.supportsEcm(phoneInEcm)) {
611 Log.d(LOG_TAG, "Emergency Callback Mode arrived in PhoneApp.");
612 // Start Emergency Callback Mode service
613 if (intent.getBooleanExtra("phoneinECMState", false)) {
614 context.startService(new Intent(context,
615 EmergencyCallbackModeService.class));
616 } else {
617 phoneInEcm = null;
618 }
619 } else {
620 // It doesn't make sense to get ACTION_EMERGENCY_CALLBACK_MODE_CHANGED
621 // on a device that doesn't support ECM in the first place.
622 Log.e(LOG_TAG, "Got ACTION_EMERGENCY_CALLBACK_MODE_CHANGED, but "
623 + "ECM isn't supported for phone: " + phoneInEcm.getPhoneName());
624 phoneInEcm = null;
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700625 }
626 } else {
Sandeep Kuntade73a6a2014-10-15 18:45:56 +0530627 Log.w(LOG_TAG, "phoneInEcm is null.");
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700628 }
Jack Yu1a2fc352017-07-14 17:14:37 -0700629 } else if (action.equals(CarrierConfigManager.ACTION_CARRIER_CONFIG_CHANGED)) {
630 // Roaming status could be overridden by carrier config, so we need to update it.
631 if (VDBG) Log.v(LOG_TAG, "carrier config changed.");
632 updateDataRoamingStatus();
633 } else if (action.equals(TelephonyIntents.ACTION_DEFAULT_DATA_SUBSCRIPTION_CHANGED)) {
634 // We also need to pay attention when default data subscription changes.
635 if (VDBG) Log.v(LOG_TAG, "default data sub changed.");
636 mDefaultDataSubId = SubscriptionManager.getDefaultDataSubscriptionId();
637 registerSettingsObserver();
638 Phone phone = getPhone(mDefaultDataSubId);
639 if (phone != null) {
640 updateDataRoamingStatus();
641 }
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700642 }
643 }
644 }
645
Brad Ebinger28626122017-08-10 14:13:35 -0700646 private class SipReceiver extends BroadcastReceiver {
647
648 @Override
649 public void onReceive(Context context, Intent intent) {
650 String action = intent.getAction();
651
652 SipAccountRegistry sipAccountRegistry = SipAccountRegistry.getInstance();
653 if (action.equals(Intent.ACTION_BOOT_COMPLETED)) {
654 SipUtil.startSipService();
655 } else if (action.equals(SipManager.ACTION_SIP_SERVICE_UP)
656 || action.equals(SipManager.ACTION_SIP_CALL_OPTION_CHANGED)) {
657 sipAccountRegistry.setup(context);
658 } else if (action.equals(SipManager.ACTION_SIP_REMOVE_PHONE)) {
659 if (DBG) {
660 Log.d(LOG_TAG, "SIP_REMOVE_PHONE "
661 + intent.getStringExtra(SipManager.EXTRA_LOCAL_URI));
662 }
663 sipAccountRegistry.removeSipProfile(intent.getStringExtra(
664 SipManager.EXTRA_LOCAL_URI));
665 } else {
666 if (DBG) Log.d(LOG_TAG, "onReceive, action not processed: " + action);
667 }
668 }
669 }
670
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700671 private void handleServiceStateChanged(Intent intent) {
672 /**
673 * This used to handle updating EriTextWidgetProvider this routine
674 * and and listening for ACTION_SERVICE_STATE_CHANGED intents could
675 * be removed. But leaving just in case it might be needed in the near
676 * future.
677 */
678
Jack Yu1a2fc352017-07-14 17:14:37 -0700679 if (VDBG) Log.v(LOG_TAG, "handleServiceStateChanged");
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700680 // If service just returned, start sending out the queued messages
Santos Cordonc593d002015-06-03 15:41:15 -0700681 Bundle extras = intent.getExtras();
682 if (extras != null) {
683 ServiceState ss = ServiceState.newFromBundle(extras);
684 if (ss != null) {
685 int state = ss.getState();
Jayachandran C2ef9a482017-05-12 22:07:47 -0700686 int subId = intent.getIntExtra(PhoneConstants.SUBSCRIPTION_KEY,
687 SubscriptionManager.INVALID_SUBSCRIPTION_ID);
688 notificationMgr.updateNetworkSelection(state, subId);
Jack Yu1a2fc352017-07-14 17:14:37 -0700689
690 if (VDBG) {
691 Log.v(LOG_TAG, "subId=" + subId + ",mDefaultDataSubId="
692 + mDefaultDataSubId + ",ss roaming=" + ss.getDataRoaming());
693 }
694 if (subId == mDefaultDataSubId) {
695 updateDataRoamingStatus();
696 }
Santos Cordonc593d002015-06-03 15:41:15 -0700697 }
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700698 }
699 }
700
Jack Yu1a2fc352017-07-14 17:14:37 -0700701 /**
702 * When roaming, if mobile data cannot be established due to data roaming not enabled, we need
703 * to notify the user so they can enable it through settings. Vise versa if the condition
704 * changes, we need to dismiss the notification.
705 */
706 private void updateDataRoamingStatus() {
707 if (VDBG) Log.v(LOG_TAG, "updateDataRoamingStatus");
708 Phone phone = getPhone(mDefaultDataSubId);
709 if (phone == null) {
710 Log.w(LOG_TAG, "Can't get phone with sub id = " + mDefaultDataSubId);
711 return;
712 }
713
714 DataConnectionReasons reasons = new DataConnectionReasons();
715 boolean dataAllowed = phone.isDataAllowed(reasons);
716 mDataRoamingNotifLog.log("dataAllowed=" + dataAllowed + ", reasons=" + reasons);
717 if (VDBG) Log.v(LOG_TAG, "dataAllowed=" + dataAllowed + ", reasons=" + reasons);
718 if (!mNoDataDueToRoaming
719 && !dataAllowed
720 && reasons.containsOnly(DataDisallowedReasonType.ROAMING_DISABLED)) {
721 // If the only reason of no data is data roaming disabled, then we notify the user
722 // so the user can turn on data roaming.
723 mNoDataDueToRoaming = true;
724 Log.d(LOG_TAG, "Show roaming disconnected notification");
725 mDataRoamingNotifLog.log("Show");
Pengquan Meng8783d932017-10-16 14:57:40 -0700726 Message msg = mHandler.obtainMessage(EVENT_DATA_ROAMING_DISCONNECTED);
727 msg.arg1 = mDefaultDataSubId;
728 msg.sendToTarget();
Jack Yu1a2fc352017-07-14 17:14:37 -0700729 } else if (mNoDataDueToRoaming && (dataAllowed
730 || !reasons.containsOnly(DataDisallowedReasonType.ROAMING_DISABLED))) {
731 // Otherwise dismiss the notification we showed earlier.
732 mNoDataDueToRoaming = false;
733 Log.d(LOG_TAG, "Dismiss roaming disconnected notification");
734 mDataRoamingNotifLog.log("Hide. data allowed=" + dataAllowed + ", reasons=" + reasons);
735 mHandler.sendEmptyMessage(EVENT_DATA_ROAMING_OK);
736 }
737 }
738
Sandeep Kuntade73a6a2014-10-15 18:45:56 +0530739 public Phone getPhoneInEcm() {
740 return phoneInEcm;
741 }
742
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700743 /**
Tyler Gunn9c1071f2014-12-09 10:07:54 -0800744 * Triggers a refresh of the message waiting (voicemail) indicator.
745 *
746 * @param subId the subscription id we should refresh the notification for.
747 */
748 public void refreshMwiIndicator(int subId) {
749 notificationMgr.refreshMwi(subId);
750 }
751
752 /**
Pengquan Menge3d01e22018-09-20 15:25:35 -0700753 * Called when the network selection on the subscription {@code subId} is changed by the user.
754 *
755 * @param subId the subscription id.
756 */
757 public void onNetworkSelectionChanged(int subId) {
758 Phone phone = getPhone(subId);
759 if (phone != null) {
760 notificationMgr.updateNetworkSelection(phone.getServiceState().getState(), subId);
761 } else {
762 Log.w(LOG_TAG, "onNetworkSelectionChanged on null phone, subId: " + subId);
763 }
764 }
765
766 /**
Jack Yu1a2fc352017-07-14 17:14:37 -0700767 * Dump the state of the object, add calls to other objects as desired.
768 *
769 * @param fd File descriptor
770 * @param printWriter Print writer
771 * @param args Arguments
772 */
773 public void dump(FileDescriptor fd, PrintWriter printWriter, String[] args) {
774 IndentingPrintWriter pw = new IndentingPrintWriter(printWriter, " ");
775 pw.println("------- PhoneGlobals -------");
776 pw.increaseIndent();
777 pw.println("mNoDataDueToRoaming=" + mNoDataDueToRoaming);
778 pw.println("mDefaultDataSubId=" + mDefaultDataSubId);
779 pw.println("mDataRoamingNotifLog:");
780 pw.increaseIndent();
781 mDataRoamingNotifLog.dump(fd, pw, args);
782 pw.decreaseIndent();
783 pw.decreaseIndent();
784 pw.println("------- End PhoneGlobals -------");
785 }
Santos Cordon7d4ddf62013-07-10 11:58:08 -0700786}