CDMALTEPhone.java revision 80bc1e5a6f0bd91b886351997b797e01732c1c67
11260f1c6c909f2940989b72afe1b91fd83845eaaSukanya Rajkhowa/* 2ace9a749c5a2a5e07527f728b7331423d16c36cdSukanya Rajkhowa * Copyright (C) 2011 The Android Open Source Project 3c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville * 4c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville * Licensed under the Apache License, Version 2.0 (the "License"); 5c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville * you may not use this file except in compliance with the License. 6c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville * You may obtain a copy of the License at 7c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville * 8c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville * http://www.apache.org/licenses/LICENSE-2.0 9c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville * 10c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville * Unless required by applicable law or agreed to in writing, software 11c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville * distributed under the License is distributed on an "AS IS" BASIS, 12c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville * See the License for the specific language governing permissions and 14c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville * limitations under the License. 15c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville */ 16c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville 17c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Savillepackage com.android.internal.telephony.cdma; 18c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville 19a8467dd0c524787104b1ccdddc5e8af10ba729edWink Savilleimport android.app.ActivityManagerNative; 20c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Savilleimport android.content.ContentValues; 21c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Savilleimport android.content.Context; 22a8467dd0c524787104b1ccdddc5e8af10ba729edWink Savilleimport android.content.Intent; 23c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Savilleimport android.content.SharedPreferences; 24c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Savilleimport android.database.SQLException; 25c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Savilleimport android.net.Uri; 26c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Savilleimport android.os.AsyncResult; 27a8467dd0c524787104b1ccdddc5e8af10ba729edWink Savilleimport android.os.Handler; 28c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Savilleimport android.os.Message; 29a8467dd0c524787104b1ccdddc5e8af10ba729edWink Savilleimport android.os.UserHandle; 30c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Savilleimport android.preference.PreferenceManager; 31a8467dd0c524787104b1ccdddc5e8af10ba729edWink Savilleimport android.os.PowerManager; 32a8467dd0c524787104b1ccdddc5e8af10ba729edWink Savilleimport android.os.SystemProperties; 33c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Savilleimport android.provider.Telephony; 34a8467dd0c524787104b1ccdddc5e8af10ba729edWink Savilleimport android.text.TextUtils; 35a8467dd0c524787104b1ccdddc5e8af10ba729edWink Savilleimport android.telephony.SubscriptionManager; 36ded9c0af7fa49504c047275ed34c2d3b22bf0c3aWink Savilleimport android.telephony.Rlog; 37c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville 38c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Savilleimport com.android.internal.telephony.CommandsInterface; 39a8467dd0c524787104b1ccdddc5e8af10ba729edWink Savilleimport android.telephony.TelephonyManager; 401260f1c6c909f2940989b72afe1b91fd83845eaaSukanya Rajkhowa 41a8467dd0c524787104b1ccdddc5e8af10ba729edWink Savilleimport com.android.internal.telephony.dataconnection.DcTracker; 42a8467dd0c524787104b1ccdddc5e8af10ba729edWink Savilleimport com.android.internal.telephony.MccTable; 43c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Savilleimport com.android.internal.telephony.OperatorInfo; 44c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Savilleimport com.android.internal.telephony.PhoneConstants; 45c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Savilleimport com.android.internal.telephony.PhoneNotifier; 46c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Savilleimport com.android.internal.telephony.PhoneProxy; 47a8467dd0c524787104b1ccdddc5e8af10ba729edWink Savilleimport com.android.internal.telephony.PhoneFactory; 48a8467dd0c524787104b1ccdddc5e8af10ba729edWink Savilleimport com.android.internal.telephony.PhoneSubInfo; 49c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Savilleimport com.android.internal.telephony.SMSDispatcher; 500d4bcdf379842af4b6304809156971e926f374f0Jake Hambyimport com.android.internal.telephony.SmsBroadcastUndelivered; 51a8467dd0c524787104b1ccdddc5e8af10ba729edWink Savilleimport com.android.internal.telephony.Subscription; 52c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Savilleimport com.android.internal.telephony.gsm.GsmSMSDispatcher; 53c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Savilleimport com.android.internal.telephony.gsm.SmsMessage; 5480bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhaoimport com.android.internal.telephony.uicc.IccRecords; 55d720945f2be5ea5fe0faf67e67d9ea0e184eba67Alex Yakavenkaimport com.android.internal.telephony.uicc.IsimRecords; 56d720945f2be5ea5fe0faf67e67d9ea0e184eba67Alex Yakavenkaimport com.android.internal.telephony.uicc.IsimUiccRecords; 5780bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhaoimport com.android.internal.telephony.uicc.RuimRecords; 58d720945f2be5ea5fe0faf67e67d9ea0e184eba67Alex Yakavenkaimport com.android.internal.telephony.uicc.SIMRecords; 59d720945f2be5ea5fe0faf67e67d9ea0e184eba67Alex Yakavenkaimport com.android.internal.telephony.uicc.UiccCardApplication; 60c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Savilleimport com.android.internal.telephony.uicc.UiccController; 61a8467dd0c524787104b1ccdddc5e8af10ba729edWink Savilleimport com.android.internal.telephony.ServiceStateTracker; 62a8467dd0c524787104b1ccdddc5e8af10ba729edWink Savilleimport com.android.internal.telephony.TelephonyIntents; 63a8467dd0c524787104b1ccdddc5e8af10ba729edWink Savilleimport com.android.internal.telephony.TelephonyProperties; 64c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville 65c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Savilleimport java.io.FileDescriptor; 66c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Savilleimport java.io.PrintWriter; 67c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville 68a8467dd0c524787104b1ccdddc5e8af10ba729edWink Savilleimport static com.android.internal.telephony.TelephonyProperties.PROPERTY_ICC_OPERATOR_ALPHA; 69a8467dd0c524787104b1ccdddc5e8af10ba729edWink Savilleimport static com.android.internal.telephony.TelephonyProperties.PROPERTY_ICC_OPERATOR_ISO_COUNTRY; 70a8467dd0c524787104b1ccdddc5e8af10ba729edWink Savilleimport static com.android.internal.telephony.TelephonyProperties.PROPERTY_ICC_OPERATOR_NUMERIC; 71a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 72a8467dd0c524787104b1ccdddc5e8af10ba729edWink Savilleimport static com.android.internal.telephony.PhoneConstants.EVENT_SUBSCRIPTION_ACTIVATED; 73a8467dd0c524787104b1ccdddc5e8af10ba729edWink Savilleimport static com.android.internal.telephony.PhoneConstants.EVENT_SUBSCRIPTION_DEACTIVATED; 74a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 75c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Savillepublic class CDMALTEPhone extends CDMAPhone { 76cbaa45bbf2cab852b6c9c3a887e9f803d4e857eaWink Saville static final String LOG_LTE_TAG = "CDMALTEPhone"; 77c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville private static final boolean DBG = true; 78c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville 79e287feac673ff68565b766e0e463d105fa9cef9dAlex Yakavenka /** CdmaLtePhone in addition to RuimRecords available from 80e287feac673ff68565b766e0e463d105fa9cef9dAlex Yakavenka * PhoneBase needs access to SIMRecords and IsimUiccRecords 81e287feac673ff68565b766e0e463d105fa9cef9dAlex Yakavenka */ 82e287feac673ff68565b766e0e463d105fa9cef9dAlex Yakavenka private SIMRecords mSimRecords; 83e287feac673ff68565b766e0e463d105fa9cef9dAlex Yakavenka private IsimUiccRecords mIsimUiccRecords; 84e287feac673ff68565b766e0e463d105fa9cef9dAlex Yakavenka 85c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville // Constructors 86a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville public CDMALTEPhone(Context context, CommandsInterface ci, PhoneNotifier notifier, 87a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville int phoneId) { 88a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville this(context, ci, notifier, false, phoneId); 89a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville } 90a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 91a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville public CDMALTEPhone(Context context, CommandsInterface ci, PhoneNotifier notifier, 92a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville boolean unitTestMode, int phoneId) { 93a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville super(context, ci, notifier, phoneId); 94a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 95a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville Rlog.d(LOG_TAG, "CDMALTEPhone: constructor: sub = " + mPhoneId); 96a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 97a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville mDcTracker = new DcTracker(this); 98a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 99a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville } 100a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 101a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville // Constructors 102c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville public CDMALTEPhone(Context context, CommandsInterface ci, PhoneNotifier notifier) { 103c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville super(context, ci, notifier, false); 104c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville } 105c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville 106c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville @Override 107a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville public void handleMessage (Message msg) { 108a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville switch (msg.what) { 109a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville case EVENT_SUBSCRIPTION_ACTIVATED: 110a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville log("EVENT_SUBSCRIPTION_ACTIVATED"); 111a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville onSubscriptionActivated(); 112a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville break; 113a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 114a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville case EVENT_SUBSCRIPTION_DEACTIVATED: 115a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville log("EVENT_SUBSCRIPTION_DEACTIVATED"); 116a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville onSubscriptionDeactivated(); 117a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville break; 118a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 119a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville default: 120a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville super.handleMessage(msg); 121a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville } 122a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville } 123a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 124a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville @Override 125c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville protected void initSstIcc() { 126c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville mSST = new CdmaLteServiceStateTracker(this); 127c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville } 128c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville 129c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville @Override 130c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville public void dispose() { 131c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville synchronized(PhoneProxy.lockForRadioTechnologyChange) { 132c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville super.dispose(); 133c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville } 134c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville } 135c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville 136c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville @Override 137c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville public void removeReferences() { 138c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville super.removeReferences(); 139c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville } 140c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville 141c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville @Override 142c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville public PhoneConstants.DataState getDataConnectionState(String apnType) { 143c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville PhoneConstants.DataState ret = PhoneConstants.DataState.DISCONNECTED; 144c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville 145c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville if (mSST == null) { 146c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville // Radio Technology Change is ongoing, dispose() and 147c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville // removeReferences() have already been called 148c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville 149c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville ret = PhoneConstants.DataState.DISCONNECTED; 150454b1dfd508844b42eb775e4ab2359be74d3672bWink Saville } else if (mDcTracker.isApnTypeEnabled(apnType) == false) { 151c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville ret = PhoneConstants.DataState.DISCONNECTED; 152c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville } else { 153454b1dfd508844b42eb775e4ab2359be74d3672bWink Saville switch (mDcTracker.getState(apnType)) { 154c6bbea82bf74ebb492508199b6f3e172b7ce860aWink Saville case RETRYING: 155c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville case FAILED: 156c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville case IDLE: 157c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville ret = PhoneConstants.DataState.DISCONNECTED; 158c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville break; 159c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville 160c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville case CONNECTED: 161c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville case DISCONNECTING: 16222d85a8e3a575a6d01d2c788587971657dfe20c6Wink Saville if (mCT.mState != PhoneConstants.State.IDLE && 163c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville !mSST.isConcurrentVoiceAndDataAllowed()) { 164c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville ret = PhoneConstants.DataState.SUSPENDED; 165c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville } else { 166c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville ret = PhoneConstants.DataState.CONNECTED; 167c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville } 168c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville break; 169c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville 170c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville case CONNECTING: 171c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville case SCANNING: 172c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville ret = PhoneConstants.DataState.CONNECTING; 173c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville break; 174c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville } 175c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville } 176c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville 177c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville log("getDataConnectionState apnType=" + apnType + " ret=" + ret); 178c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville return ret; 179c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville } 180c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville 181ce06370fc58f59abda3cb072326e9425da3d755dWink Saville /** 182ce06370fc58f59abda3cb072326e9425da3d755dWink Saville * Sets the "current" field in the telephony provider according to the 183ce06370fc58f59abda3cb072326e9425da3d755dWink Saville * build-time operator numeric property 184ce06370fc58f59abda3cb072326e9425da3d755dWink Saville * 185ce06370fc58f59abda3cb072326e9425da3d755dWink Saville * @return true for success; false otherwise. 186ce06370fc58f59abda3cb072326e9425da3d755dWink Saville */ 187ce06370fc58f59abda3cb072326e9425da3d755dWink Saville @Override 188ce06370fc58f59abda3cb072326e9425da3d755dWink Saville boolean updateCurrentCarrierInProvider(String operatorNumeric) { 189ce06370fc58f59abda3cb072326e9425da3d755dWink Saville boolean retVal; 190a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville if (mUiccController.getUiccCardApplication(mPhoneId, UiccController.APP_FAM_3GPP) == null) { 191ce06370fc58f59abda3cb072326e9425da3d755dWink Saville if (DBG) log("updateCurrentCarrierInProvider APP_FAM_3GPP == null"); 192ce06370fc58f59abda3cb072326e9425da3d755dWink Saville retVal = super.updateCurrentCarrierInProvider(operatorNumeric); 193ce06370fc58f59abda3cb072326e9425da3d755dWink Saville } else { 194ce06370fc58f59abda3cb072326e9425da3d755dWink Saville if (DBG) log("updateCurrentCarrierInProvider not updated"); 195ce06370fc58f59abda3cb072326e9425da3d755dWink Saville retVal = true; 196ce06370fc58f59abda3cb072326e9425da3d755dWink Saville } 197ce06370fc58f59abda3cb072326e9425da3d755dWink Saville if (DBG) log("updateCurrentCarrierInProvider X retVal=" + retVal); 198ce06370fc58f59abda3cb072326e9425da3d755dWink Saville return retVal; 199ce06370fc58f59abda3cb072326e9425da3d755dWink Saville } 200ce06370fc58f59abda3cb072326e9425da3d755dWink Saville 201c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville @Override 202c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville public boolean updateCurrentCarrierInProvider() { 203a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville long currentDds = SubscriptionManager.getDefaultDataSubId(); 204a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville String operatorNumeric = getOperatorNumeric(); 205a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 206a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville Rlog.d(LOG_TAG, "updateCurrentCarrierInProvider: mSubscription = " + getSubId() 207a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville + " currentDds = " + currentDds + " operatorNumeric = " + operatorNumeric); 208a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 209a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville if (!TextUtils.isEmpty(operatorNumeric) && (getSubId() == currentDds)) { 210c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville try { 211c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville Uri uri = Uri.withAppendedPath(Telephony.Carriers.CONTENT_URI, "current"); 212c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville ContentValues map = new ContentValues(); 213c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville map.put(Telephony.Carriers.NUMERIC, operatorNumeric); 214c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville mContext.getContentResolver().insert(uri, map); 215c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville return true; 216c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville } catch (SQLException e) { 217a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville Rlog.e(LOG_TAG, "Can't store current operator", e); 218c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville } 219c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville } 220c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville return false; 221c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville } 222c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville 223c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville // return IMSI from USIM as subscriber ID. 224c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville @Override 225c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville public String getSubscriberId() { 226e287feac673ff68565b766e0e463d105fa9cef9dAlex Yakavenka return (mSimRecords != null) ? mSimRecords.getIMSI() : ""; 227c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville } 228c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville 2290e4abef0d7e978d4c3dea5199f451a1c69158d03Sungmin Choi // return GID1 from USIM 2300e4abef0d7e978d4c3dea5199f451a1c69158d03Sungmin Choi @Override 2310e4abef0d7e978d4c3dea5199f451a1c69158d03Sungmin Choi public String getGroupIdLevel1() { 2320e4abef0d7e978d4c3dea5199f451a1c69158d03Sungmin Choi return (mSimRecords != null) ? mSimRecords.getGid1() : ""; 2330e4abef0d7e978d4c3dea5199f451a1c69158d03Sungmin Choi } 2340e4abef0d7e978d4c3dea5199f451a1c69158d03Sungmin Choi 235c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville @Override 236c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville public String getImei() { 237c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville return mImei; 238c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville } 239c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville 240c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville @Override 241c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville public String getDeviceSvn() { 242c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville return mImeiSv; 243c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville } 244c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville 245c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville @Override 246c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville public IsimRecords getIsimRecords() { 247e287feac673ff68565b766e0e463d105fa9cef9dAlex Yakavenka return mIsimUiccRecords; 248c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville } 249c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville 250c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville @Override 251c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville public String getMsisdn() { 252e287feac673ff68565b766e0e463d105fa9cef9dAlex Yakavenka return (mSimRecords != null) ? mSimRecords.getMsisdnNumber() : null; 253c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville } 254c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville 255c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville @Override 256c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville public void getAvailableNetworks(Message response) { 25722d85a8e3a575a6d01d2c788587971657dfe20c6Wink Saville mCi.getAvailableNetworks(response); 258c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville } 259c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville 260c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville @Override 261e287feac673ff68565b766e0e463d105fa9cef9dAlex Yakavenka protected void onUpdateIccAvailability() { 262e287feac673ff68565b766e0e463d105fa9cef9dAlex Yakavenka if (mUiccController == null ) { 263bb36adde615d3d85fa0fc23935197c6bc6a799edAlex Yakavenka return; 264bb36adde615d3d85fa0fc23935197c6bc6a799edAlex Yakavenka } 265bb36adde615d3d85fa0fc23935197c6bc6a799edAlex Yakavenka 26680bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao // Update IsimRecords 26780bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao UiccCardApplication newUiccApplication = 26880bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao mUiccController.getUiccCardApplication(UiccController.APP_FAM_IMS); 26980bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao IsimUiccRecords newIsimUiccRecords = null; 270a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 27180bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao if (newUiccApplication != null) { 27280bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao newIsimUiccRecords = (IsimUiccRecords) newUiccApplication.getIccRecords(); 273a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville } 27480bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao mIsimUiccRecords = newIsimUiccRecords; 27580bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao 27680bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao // Update UsimRecords 27780bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao newUiccApplication = mUiccController.getUiccCardApplication(UiccController.APP_FAM_3GPP); 27880bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao SIMRecords newSimRecords = null; 27980bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao if (newUiccApplication != null) { 28080bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao newSimRecords = (SIMRecords) newUiccApplication.getIccRecords(); 28180bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao } 28280bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao mSimRecords = newSimRecords; 283a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 284a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville super.onUpdateIccAvailability(); 285a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville } 286e287feac673ff68565b766e0e463d105fa9cef9dAlex Yakavenka 287a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville @Override 288a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville protected void init(Context context, PhoneNotifier notifier) { 289a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville mCi.setPhoneType(PhoneConstants.PHONE_TYPE_CDMA); 290a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville mCT = new CdmaCallTracker(this); 291a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville mCdmaSSM = CdmaSubscriptionSourceManager.getInstance(context, mCi, this, 292a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville EVENT_CDMA_SUBSCRIPTION_SOURCE_CHANGED, null); 293a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville mRuimPhoneBookInterfaceManager = new RuimPhoneBookInterfaceManager(this); 294a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville mSubInfo = new PhoneSubInfo(this); 295a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville mEriManager = new EriManager(this, context, EriManager.ERI_FROM_XML); 296a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 297a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville mCi.registerForAvailable(this, EVENT_RADIO_AVAILABLE, null); 298a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville mCi.registerForOffOrNotAvailable(this, EVENT_RADIO_OFF_OR_NOT_AVAILABLE, null); 299a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville mCi.registerForOn(this, EVENT_RADIO_ON, null); 300a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville mCi.setOnSuppServiceNotification(this, EVENT_SSN, null); 301a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville mSST.registerForNetworkAttached(this, EVENT_REGISTERED_TO_NETWORK, null); 302a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville mCi.setEmergencyCallbackMode(this, EVENT_EMERGENCY_CALLBACK_MODE_ENTER, null); 303a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville mCi.registerForExitEmergencyCallbackMode(this, EVENT_EXIT_EMERGENCY_CALLBACK_RESPONSE, 304a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville null); 305a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 306a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville PowerManager pm 307a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville = (PowerManager) context.getSystemService(Context.POWER_SERVICE); 308a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,LOG_TAG); 309a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 310a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville // This is needed to handle phone process crashes 311a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville String inEcm = SystemProperties.get(TelephonyProperties.PROPERTY_INECM_MODE, "false"); 312a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville mIsPhoneInEcmState = inEcm.equals("true"); 313a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville if (mIsPhoneInEcmState) { 314a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville // Send a message which will invoke handleExitEmergencyCallbackMode 315a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville mCi.exitEmergencyCallbackMode(obtainMessage(EVENT_EXIT_EMERGENCY_CALLBACK_RESPONSE)); 316bb36adde615d3d85fa0fc23935197c6bc6a799edAlex Yakavenka } 317e287feac673ff68565b766e0e463d105fa9cef9dAlex Yakavenka 318a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville // get the string that specifies the carrier OTA Sp number 319a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville mCarrierOtaSpNumSchema = SystemProperties.get( 320a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville TelephonyProperties.PROPERTY_OTASP_NUM_SCHEMA,""); 321a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 322a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville // Notify voicemails. 323a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville notifier.notifyMessageWaitingChanged(this); 324a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville setProperties(); 325a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville } 326a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 327a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville private void onSubscriptionActivated() { 328a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville// mSubscriptionData = SubscriptionManager.getCurrentSubscription(mSubscription); 329a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 330a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville log("SUBSCRIPTION ACTIVATED : slotId : " + mSubscriptionData.slotId 331a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville + " appid : " + mSubscriptionData.m3gpp2Index 332a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville + " subId : " + mSubscriptionData.subId 333a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville + " subStatus : " + mSubscriptionData.subStatus); 334a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 335a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville // Make sure properties are set for proper subscription. 336a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville setProperties(); 337a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 338a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville onUpdateIccAvailability(); 339a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville mSST.sendMessage(mSST.obtainMessage(ServiceStateTracker.EVENT_ICC_CHANGED)); 340a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville ((CdmaLteServiceStateTracker)mSST).updateCdmaSubscription(); 341a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville ((DcTracker)mDcTracker).updateRecords(); 342a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville } 343a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 344a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville private void onSubscriptionDeactivated() { 345a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville log("SUBSCRIPTION DEACTIVATED"); 346a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville // resetSubSpecifics 347a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville mSubscriptionData = null; 348a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville } 349a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 350a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville // Set the properties per subscription 351a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville private void setProperties() { 352a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville //Change the system property 353a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville setSystemProperty(TelephonyProperties.CURRENT_ACTIVE_PHONE, 354a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville new Integer(PhoneConstants.PHONE_TYPE_CDMA).toString()); 355a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville // Sets operator alpha property by retrieving from build-time system property 356a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville String operatorAlpha = SystemProperties.get("ro.cdma.home.operator.alpha"); 357b93bb3538c55f173f94a4ee7510d9d1521d8f731Shishir Agrawal if (!TextUtils.isEmpty(operatorAlpha)) { 358b93bb3538c55f173f94a4ee7510d9d1521d8f731Shishir Agrawal setSystemProperty(PROPERTY_ICC_OPERATOR_ALPHA, operatorAlpha); 359b93bb3538c55f173f94a4ee7510d9d1521d8f731Shishir Agrawal } 360a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 361a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville // Sets operator numeric property by retrieving from build-time system property 362a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville String operatorNumeric = SystemProperties.get(PROPERTY_CDMA_HOME_OPERATOR_NUMERIC); 363a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville log("update icc_operator_numeric=" + operatorNumeric); 364b93bb3538c55f173f94a4ee7510d9d1521d8f731Shishir Agrawal if (!TextUtils.isEmpty(operatorNumeric)) { 365b93bb3538c55f173f94a4ee7510d9d1521d8f731Shishir Agrawal setSystemProperty(PROPERTY_ICC_OPERATOR_NUMERIC, operatorNumeric); 366b93bb3538c55f173f94a4ee7510d9d1521d8f731Shishir Agrawal // Sets iso country property by retrieving from build-time system property 367b93bb3538c55f173f94a4ee7510d9d1521d8f731Shishir Agrawal setIsoCountryProperty(operatorNumeric); 368b93bb3538c55f173f94a4ee7510d9d1521d8f731Shishir Agrawal // Updates MCC MNC device configuration information 369b93bb3538c55f173f94a4ee7510d9d1521d8f731Shishir Agrawal log("update mccmnc=" + operatorNumeric); 370b93bb3538c55f173f94a4ee7510d9d1521d8f731Shishir Agrawal MccTable.updateMccMncConfiguration(mContext, operatorNumeric, false); 371b93bb3538c55f173f94a4ee7510d9d1521d8f731Shishir Agrawal } 372a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville // Sets current entry in the telephony carrier table 373a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville updateCurrentCarrierInProvider(); 374a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville } 375a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 376a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville @Override 377a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville public void setSystemProperty(String property, String value) { 378a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville if(getUnitTestMode()) { 379a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville return; 380e287feac673ff68565b766e0e463d105fa9cef9dAlex Yakavenka } 381a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville TelephonyManager.setTelephonyProperty(property, getSubId(), value); 382a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville } 383a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 384a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville public String getSystemProperty(String property, String defValue) { 385a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville if(getUnitTestMode()) { 386a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville return null; 387a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville } 388a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville return TelephonyManager.getTelephonyProperty(property, getSubId(), defValue); 389a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville } 390a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 391a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville public void updateDataConnectionTracker() { 392a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville ((DcTracker)mDcTracker).update(); 393a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville } 394a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 395a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville public void setInternalDataEnabled(boolean enable, Message onCompleteMsg) { 396a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville ((DcTracker)mDcTracker) 397a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville .setInternalDataEnabled(enable, onCompleteMsg); 398a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville } 399a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 400a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville public boolean setInternalDataEnabledFlag(boolean enable) { 401a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville return ((DcTracker)mDcTracker) 402a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville .setInternalDataEnabledFlag(enable); 403a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville } 404a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 405a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville /** 406a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville * @return operator numeric. 407a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville */ 408a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville public String getOperatorNumeric() { 409a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville String operatorNumeric = null; 41080bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao IccRecords curIccRecords = null; 411a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville if (mCdmaSubscriptionSource == CDMA_SUBSCRIPTION_NV) { 412a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville operatorNumeric = SystemProperties.get("ro.cdma.home.operator.numeric"); 41380bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao } else if (mCdmaSubscriptionSource == CDMA_SUBSCRIPTION_RUIM_SIM) { 41480bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao curIccRecords = mSimRecords; 41580bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao if (curIccRecords != null) { 41680bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao operatorNumeric = curIccRecords.getOperatorNumeric(); 41780bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao } else { 41880bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao curIccRecords = mIccRecords.get(); 41980bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao if (curIccRecords != null && (curIccRecords instanceof RuimRecords)) { 42080bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao RuimRecords csim = (RuimRecords) curIccRecords; 42180bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao operatorNumeric = csim.getRUIMOperatorNumeric(); 42280bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao } 42380bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao } 42480bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao } 42580bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao if (operatorNumeric == null) { 426a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville Rlog.e(LOG_TAG, "getOperatorNumeric: Cannot retrieve operatorNumeric:" 427a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville + " mCdmaSubscriptionSource = " + mCdmaSubscriptionSource + " mIccRecords = " 42880bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao + ((curIccRecords != null) ? curIccRecords.getRecordsLoaded() : null)); 429e287feac673ff68565b766e0e463d105fa9cef9dAlex Yakavenka } 430e287feac673ff68565b766e0e463d105fa9cef9dAlex Yakavenka 431a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville Rlog.d(LOG_TAG, "getOperatorNumeric: mCdmaSubscriptionSource = " + mCdmaSubscriptionSource 432a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville + " operatorNumeric = " + operatorNumeric); 433a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 434a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville return operatorNumeric; 435a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville } 436a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville public void registerForAllDataDisconnected(Handler h, int what, Object obj) { 437a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville ((DcTracker)mDcTracker) 438a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville .registerForAllDataDisconnected(h, what, obj); 439a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville } 440a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 441a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville public void unregisterForAllDataDisconnected(Handler h) { 442a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville ((DcTracker)mDcTracker) 443a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville .unregisterForAllDataDisconnected(h); 444bb36adde615d3d85fa0fc23935197c6bc6a799edAlex Yakavenka } 445bb36adde615d3d85fa0fc23935197c6bc6a799edAlex Yakavenka 446bb36adde615d3d85fa0fc23935197c6bc6a799edAlex Yakavenka @Override 447c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville protected void log(String s) { 448cbaa45bbf2cab852b6c9c3a887e9f803d4e857eaWink Saville Rlog.d(LOG_LTE_TAG, s); 449cbaa45bbf2cab852b6c9c3a887e9f803d4e857eaWink Saville } 450cbaa45bbf2cab852b6c9c3a887e9f803d4e857eaWink Saville 451cbaa45bbf2cab852b6c9c3a887e9f803d4e857eaWink Saville protected void loge(String s) { 452cbaa45bbf2cab852b6c9c3a887e9f803d4e857eaWink Saville Rlog.e(LOG_LTE_TAG, s); 453c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville } 454c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville 455cbaa45bbf2cab852b6c9c3a887e9f803d4e857eaWink Saville protected void loge(String s, Throwable e) { 456cbaa45bbf2cab852b6c9c3a887e9f803d4e857eaWink Saville Rlog.e(LOG_LTE_TAG, s, e); 457f61aaae6608243be4e0da97a56ff9fed488cb173Shishir Agrawal } 458cbaa45bbf2cab852b6c9c3a887e9f803d4e857eaWink Saville 459c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville @Override 460c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { 461c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville pw.println("CDMALTEPhone extends:"); 462c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville super.dump(fd, pw, args); 463c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville } 464c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville} 465