CDMALTEPhone.java revision 197f509eb95e275863e3ca36ef1fb53df63345f5
1ab57aa5d465ef3a6dc0895b2408276617a2f6fa0Tom Taylor/* 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; 39ab57aa5d465ef3a6dc0895b2408276617a2f6fa0Tom Taylor 40a8467dd0c524787104b1ccdddc5e8af10ba729edWink Savilleimport android.telephony.TelephonyManager; 411260f1c6c909f2940989b72afe1b91fd83845eaaSukanya Rajkhowa 42a8467dd0c524787104b1ccdddc5e8af10ba729edWink Savilleimport com.android.internal.telephony.dataconnection.DcTracker; 43a8467dd0c524787104b1ccdddc5e8af10ba729edWink Savilleimport com.android.internal.telephony.MccTable; 44c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Savilleimport com.android.internal.telephony.OperatorInfo; 45c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Savilleimport com.android.internal.telephony.PhoneConstants; 46c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Savilleimport com.android.internal.telephony.PhoneNotifier; 47c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Savilleimport com.android.internal.telephony.PhoneProxy; 48a8467dd0c524787104b1ccdddc5e8af10ba729edWink Savilleimport com.android.internal.telephony.PhoneFactory; 49a8467dd0c524787104b1ccdddc5e8af10ba729edWink Savilleimport com.android.internal.telephony.PhoneSubInfo; 50c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Savilleimport com.android.internal.telephony.SMSDispatcher; 510d4bcdf379842af4b6304809156971e926f374f0Jake Hambyimport com.android.internal.telephony.SmsBroadcastUndelivered; 52ab57aa5d465ef3a6dc0895b2408276617a2f6fa0Tom Taylorimport com.android.internal.telephony.SubscriptionController; 53c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Savilleimport com.android.internal.telephony.gsm.GsmSMSDispatcher; 54c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Savilleimport com.android.internal.telephony.gsm.SmsMessage; 5580bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhaoimport com.android.internal.telephony.uicc.IccRecords; 56d720945f2be5ea5fe0faf67e67d9ea0e184eba67Alex Yakavenkaimport com.android.internal.telephony.uicc.IsimRecords; 57d720945f2be5ea5fe0faf67e67d9ea0e184eba67Alex Yakavenkaimport com.android.internal.telephony.uicc.IsimUiccRecords; 5880bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhaoimport com.android.internal.telephony.uicc.RuimRecords; 59d720945f2be5ea5fe0faf67e67d9ea0e184eba67Alex Yakavenkaimport com.android.internal.telephony.uicc.SIMRecords; 60d720945f2be5ea5fe0faf67e67d9ea0e184eba67Alex Yakavenkaimport com.android.internal.telephony.uicc.UiccCardApplication; 61c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Savilleimport com.android.internal.telephony.uicc.UiccController; 62a8467dd0c524787104b1ccdddc5e8af10ba729edWink Savilleimport com.android.internal.telephony.ServiceStateTracker; 63a8467dd0c524787104b1ccdddc5e8af10ba729edWink Savilleimport com.android.internal.telephony.TelephonyIntents; 64a8467dd0c524787104b1ccdddc5e8af10ba729edWink Savilleimport com.android.internal.telephony.TelephonyProperties; 65c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville 66c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Savilleimport java.io.FileDescriptor; 67c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Savilleimport java.io.PrintWriter; 68c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville 69a8467dd0c524787104b1ccdddc5e8af10ba729edWink Savilleimport static com.android.internal.telephony.TelephonyProperties.PROPERTY_ICC_OPERATOR_ALPHA; 70a8467dd0c524787104b1ccdddc5e8af10ba729edWink Savilleimport static com.android.internal.telephony.TelephonyProperties.PROPERTY_ICC_OPERATOR_ISO_COUNTRY; 71a8467dd0c524787104b1ccdddc5e8af10ba729edWink Savilleimport static com.android.internal.telephony.TelephonyProperties.PROPERTY_ICC_OPERATOR_NUMERIC; 72a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 73c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Savillepublic class CDMALTEPhone extends CDMAPhone { 74cbaa45bbf2cab852b6c9c3a887e9f803d4e857eaWink Saville static final String LOG_LTE_TAG = "CDMALTEPhone"; 75c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville private static final boolean DBG = true; 76c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville 77e287feac673ff68565b766e0e463d105fa9cef9dAlex Yakavenka /** CdmaLtePhone in addition to RuimRecords available from 78e287feac673ff68565b766e0e463d105fa9cef9dAlex Yakavenka * PhoneBase needs access to SIMRecords and IsimUiccRecords 79e287feac673ff68565b766e0e463d105fa9cef9dAlex Yakavenka */ 80e287feac673ff68565b766e0e463d105fa9cef9dAlex Yakavenka private SIMRecords mSimRecords; 81e287feac673ff68565b766e0e463d105fa9cef9dAlex Yakavenka private IsimUiccRecords mIsimUiccRecords; 82e287feac673ff68565b766e0e463d105fa9cef9dAlex Yakavenka 83c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville // Constructors 84a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville public CDMALTEPhone(Context context, CommandsInterface ci, PhoneNotifier notifier, 85a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville int phoneId) { 86a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville this(context, ci, notifier, false, phoneId); 87a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville } 88a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 89a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville public CDMALTEPhone(Context context, CommandsInterface ci, PhoneNotifier notifier, 90a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville boolean unitTestMode, int phoneId) { 91a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville super(context, ci, notifier, phoneId); 92a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 93a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville Rlog.d(LOG_TAG, "CDMALTEPhone: constructor: sub = " + mPhoneId); 94a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 95a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville mDcTracker = new DcTracker(this); 96a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 97a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville } 98a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 99c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville @Override 100c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville protected void initSstIcc() { 101c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville mSST = new CdmaLteServiceStateTracker(this); 102c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville } 103c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville 104c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville @Override 105c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville public void dispose() { 106c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville synchronized(PhoneProxy.lockForRadioTechnologyChange) { 10780915ad5159e7a4e72fa436787044b0c075ff6cfShishir Agrawal if (mSimRecords != null) { 10880915ad5159e7a4e72fa436787044b0c075ff6cfShishir Agrawal mSimRecords.unregisterForRecordsLoaded(this); 10980915ad5159e7a4e72fa436787044b0c075ff6cfShishir Agrawal } 110c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville super.dispose(); 111c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville } 112c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville } 113c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville 114c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville @Override 115c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville public void removeReferences() { 116c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville super.removeReferences(); 117c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville } 118c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville 119c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville @Override 12080915ad5159e7a4e72fa436787044b0c075ff6cfShishir Agrawal public void handleMessage(Message msg) { 12180915ad5159e7a4e72fa436787044b0c075ff6cfShishir Agrawal AsyncResult ar; 12280915ad5159e7a4e72fa436787044b0c075ff6cfShishir Agrawal Message onComplete; 12380915ad5159e7a4e72fa436787044b0c075ff6cfShishir Agrawal 124197f509eb95e275863e3ca36ef1fb53df63345f5Sanket Padawe // messages to be handled whether or not the phone is being destroyed 125197f509eb95e275863e3ca36ef1fb53df63345f5Sanket Padawe // should only include messages which are being re-directed and do not use 126197f509eb95e275863e3ca36ef1fb53df63345f5Sanket Padawe // resources of the phone being destroyed 127197f509eb95e275863e3ca36ef1fb53df63345f5Sanket Padawe switch (msg.what) { 128197f509eb95e275863e3ca36ef1fb53df63345f5Sanket Padawe // handle the select network completion callbacks. 129197f509eb95e275863e3ca36ef1fb53df63345f5Sanket Padawe case EVENT_SET_NETWORK_MANUAL_COMPLETE: 130197f509eb95e275863e3ca36ef1fb53df63345f5Sanket Padawe case EVENT_SET_NETWORK_AUTOMATIC_COMPLETE: 131197f509eb95e275863e3ca36ef1fb53df63345f5Sanket Padawe super.handleMessage(msg); 132197f509eb95e275863e3ca36ef1fb53df63345f5Sanket Padawe return; 133197f509eb95e275863e3ca36ef1fb53df63345f5Sanket Padawe } 134197f509eb95e275863e3ca36ef1fb53df63345f5Sanket Padawe 13580915ad5159e7a4e72fa436787044b0c075ff6cfShishir Agrawal if (!mIsTheCurrentActivePhone) { 13680915ad5159e7a4e72fa436787044b0c075ff6cfShishir Agrawal Rlog.e(LOG_TAG, "Received message " + msg + 13780915ad5159e7a4e72fa436787044b0c075ff6cfShishir Agrawal "[" + msg.what + "] while being destroyed. Ignoring."); 13880915ad5159e7a4e72fa436787044b0c075ff6cfShishir Agrawal return; 13980915ad5159e7a4e72fa436787044b0c075ff6cfShishir Agrawal } 14080915ad5159e7a4e72fa436787044b0c075ff6cfShishir Agrawal switch(msg.what) { 14180915ad5159e7a4e72fa436787044b0c075ff6cfShishir Agrawal case EVENT_SIM_RECORDS_LOADED: 14280915ad5159e7a4e72fa436787044b0c075ff6cfShishir Agrawal mSimRecordsLoadedRegistrants.notifyRegistrants(); 14380915ad5159e7a4e72fa436787044b0c075ff6cfShishir Agrawal break; 14480915ad5159e7a4e72fa436787044b0c075ff6cfShishir Agrawal 14580915ad5159e7a4e72fa436787044b0c075ff6cfShishir Agrawal default: 14680915ad5159e7a4e72fa436787044b0c075ff6cfShishir Agrawal super.handleMessage(msg); 14780915ad5159e7a4e72fa436787044b0c075ff6cfShishir Agrawal } 14880915ad5159e7a4e72fa436787044b0c075ff6cfShishir Agrawal } 14980915ad5159e7a4e72fa436787044b0c075ff6cfShishir Agrawal @Override 150c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville public PhoneConstants.DataState getDataConnectionState(String apnType) { 151c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville PhoneConstants.DataState ret = PhoneConstants.DataState.DISCONNECTED; 152c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville 153c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville if (mSST == null) { 154c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville // Radio Technology Change is ongoing, dispose() and 155c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville // removeReferences() have already been called 156c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville 157c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville ret = PhoneConstants.DataState.DISCONNECTED; 158454b1dfd508844b42eb775e4ab2359be74d3672bWink Saville } else if (mDcTracker.isApnTypeEnabled(apnType) == false) { 159c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville ret = PhoneConstants.DataState.DISCONNECTED; 160c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville } else { 161454b1dfd508844b42eb775e4ab2359be74d3672bWink Saville switch (mDcTracker.getState(apnType)) { 162c6bbea82bf74ebb492508199b6f3e172b7ce860aWink Saville case RETRYING: 163c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville case FAILED: 164c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville case IDLE: 165c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville ret = PhoneConstants.DataState.DISCONNECTED; 166c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville break; 167c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville 168c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville case CONNECTED: 169c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville case DISCONNECTING: 17022d85a8e3a575a6d01d2c788587971657dfe20c6Wink Saville if (mCT.mState != PhoneConstants.State.IDLE && 171c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville !mSST.isConcurrentVoiceAndDataAllowed()) { 172c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville ret = PhoneConstants.DataState.SUSPENDED; 173c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville } else { 174c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville ret = PhoneConstants.DataState.CONNECTED; 175c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville } 176c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville break; 177c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville 178c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville case CONNECTING: 179c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville case SCANNING: 180c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville ret = PhoneConstants.DataState.CONNECTING; 181c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville break; 182c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville } 183c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville } 184c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville 185c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville log("getDataConnectionState apnType=" + apnType + " ret=" + ret); 186c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville return ret; 187c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville } 188c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville 189ce06370fc58f59abda3cb072326e9425da3d755dWink Saville /** 190ce06370fc58f59abda3cb072326e9425da3d755dWink Saville * Sets the "current" field in the telephony provider according to the 191ce06370fc58f59abda3cb072326e9425da3d755dWink Saville * build-time operator numeric property 192ce06370fc58f59abda3cb072326e9425da3d755dWink Saville * 193ce06370fc58f59abda3cb072326e9425da3d755dWink Saville * @return true for success; false otherwise. 194ce06370fc58f59abda3cb072326e9425da3d755dWink Saville */ 195ce06370fc58f59abda3cb072326e9425da3d755dWink Saville @Override 196ce06370fc58f59abda3cb072326e9425da3d755dWink Saville boolean updateCurrentCarrierInProvider(String operatorNumeric) { 197ce06370fc58f59abda3cb072326e9425da3d755dWink Saville boolean retVal; 198a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville if (mUiccController.getUiccCardApplication(mPhoneId, UiccController.APP_FAM_3GPP) == null) { 199ce06370fc58f59abda3cb072326e9425da3d755dWink Saville if (DBG) log("updateCurrentCarrierInProvider APP_FAM_3GPP == null"); 200ce06370fc58f59abda3cb072326e9425da3d755dWink Saville retVal = super.updateCurrentCarrierInProvider(operatorNumeric); 201ce06370fc58f59abda3cb072326e9425da3d755dWink Saville } else { 202ce06370fc58f59abda3cb072326e9425da3d755dWink Saville if (DBG) log("updateCurrentCarrierInProvider not updated"); 203ce06370fc58f59abda3cb072326e9425da3d755dWink Saville retVal = true; 204ce06370fc58f59abda3cb072326e9425da3d755dWink Saville } 205ce06370fc58f59abda3cb072326e9425da3d755dWink Saville if (DBG) log("updateCurrentCarrierInProvider X retVal=" + retVal); 206ce06370fc58f59abda3cb072326e9425da3d755dWink Saville return retVal; 207ce06370fc58f59abda3cb072326e9425da3d755dWink Saville } 208ce06370fc58f59abda3cb072326e9425da3d755dWink Saville 209c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville @Override 210c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville public boolean updateCurrentCarrierInProvider() { 211a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville long currentDds = SubscriptionManager.getDefaultDataSubId(); 212a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville String operatorNumeric = getOperatorNumeric(); 213a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 214a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville Rlog.d(LOG_TAG, "updateCurrentCarrierInProvider: mSubscription = " + getSubId() 215a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville + " currentDds = " + currentDds + " operatorNumeric = " + operatorNumeric); 216a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 217a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville if (!TextUtils.isEmpty(operatorNumeric) && (getSubId() == currentDds)) { 218c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville try { 219c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville Uri uri = Uri.withAppendedPath(Telephony.Carriers.CONTENT_URI, "current"); 220c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville ContentValues map = new ContentValues(); 221c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville map.put(Telephony.Carriers.NUMERIC, operatorNumeric); 222c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville mContext.getContentResolver().insert(uri, map); 223c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville return true; 224c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville } catch (SQLException e) { 225a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville Rlog.e(LOG_TAG, "Can't store current operator", e); 226c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville } 227c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville } 228c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville return false; 229c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville } 230c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville 231c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville // return IMSI from USIM as subscriber ID. 232c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville @Override 233c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville public String getSubscriberId() { 234e287feac673ff68565b766e0e463d105fa9cef9dAlex Yakavenka return (mSimRecords != null) ? mSimRecords.getIMSI() : ""; 235c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville } 236c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville 2370e4abef0d7e978d4c3dea5199f451a1c69158d03Sungmin Choi // return GID1 from USIM 2380e4abef0d7e978d4c3dea5199f451a1c69158d03Sungmin Choi @Override 2390e4abef0d7e978d4c3dea5199f451a1c69158d03Sungmin Choi public String getGroupIdLevel1() { 2400e4abef0d7e978d4c3dea5199f451a1c69158d03Sungmin Choi return (mSimRecords != null) ? mSimRecords.getGid1() : ""; 2410e4abef0d7e978d4c3dea5199f451a1c69158d03Sungmin Choi } 2420e4abef0d7e978d4c3dea5199f451a1c69158d03Sungmin Choi 243c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville @Override 244c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville public String getImei() { 245c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville return mImei; 246c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville } 247c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville 248c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville @Override 249c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville public String getDeviceSvn() { 250c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville return mImeiSv; 251c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville } 252c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville 253c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville @Override 254c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville public IsimRecords getIsimRecords() { 255e287feac673ff68565b766e0e463d105fa9cef9dAlex Yakavenka return mIsimUiccRecords; 256c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville } 257c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville 258c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville @Override 259c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville public String getMsisdn() { 260e287feac673ff68565b766e0e463d105fa9cef9dAlex Yakavenka return (mSimRecords != null) ? mSimRecords.getMsisdnNumber() : null; 261c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville } 262c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville 263c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville @Override 264c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville public void getAvailableNetworks(Message response) { 26522d85a8e3a575a6d01d2c788587971657dfe20c6Wink Saville mCi.getAvailableNetworks(response); 266c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville } 267c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville 268c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville @Override 269e287feac673ff68565b766e0e463d105fa9cef9dAlex Yakavenka protected void onUpdateIccAvailability() { 27080915ad5159e7a4e72fa436787044b0c075ff6cfShishir Agrawal if (mSimRecords != null) { 27180915ad5159e7a4e72fa436787044b0c075ff6cfShishir Agrawal mSimRecords.unregisterForRecordsLoaded(this); 27280915ad5159e7a4e72fa436787044b0c075ff6cfShishir Agrawal } 27380915ad5159e7a4e72fa436787044b0c075ff6cfShishir Agrawal 274e287feac673ff68565b766e0e463d105fa9cef9dAlex Yakavenka if (mUiccController == null ) { 275bb36adde615d3d85fa0fc23935197c6bc6a799edAlex Yakavenka return; 276bb36adde615d3d85fa0fc23935197c6bc6a799edAlex Yakavenka } 277bb36adde615d3d85fa0fc23935197c6bc6a799edAlex Yakavenka 27880bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao // Update IsimRecords 27980bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao UiccCardApplication newUiccApplication = 2802e41209f95670cb26aba5897b9bc0dcd9679e908Shishir Agrawal mUiccController.getUiccCardApplication(mPhoneId, UiccController.APP_FAM_IMS); 28180bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao IsimUiccRecords newIsimUiccRecords = null; 282a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 28380bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao if (newUiccApplication != null) { 28480bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao newIsimUiccRecords = (IsimUiccRecords) newUiccApplication.getIccRecords(); 285a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville } 28680bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao mIsimUiccRecords = newIsimUiccRecords; 28780bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao 28880bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao // Update UsimRecords 2892e41209f95670cb26aba5897b9bc0dcd9679e908Shishir Agrawal newUiccApplication = mUiccController.getUiccCardApplication(mPhoneId, 2902e41209f95670cb26aba5897b9bc0dcd9679e908Shishir Agrawal UiccController.APP_FAM_3GPP); 29180bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao SIMRecords newSimRecords = null; 29280bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao if (newUiccApplication != null) { 29380bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao newSimRecords = (SIMRecords) newUiccApplication.getIccRecords(); 29480bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao } 29580bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao mSimRecords = newSimRecords; 29680915ad5159e7a4e72fa436787044b0c075ff6cfShishir Agrawal if (mSimRecords != null) { 29780915ad5159e7a4e72fa436787044b0c075ff6cfShishir Agrawal mSimRecords.registerForRecordsLoaded(this, EVENT_SIM_RECORDS_LOADED, null); 29880915ad5159e7a4e72fa436787044b0c075ff6cfShishir Agrawal } 299a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 300a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville super.onUpdateIccAvailability(); 301a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville } 302e287feac673ff68565b766e0e463d105fa9cef9dAlex Yakavenka 303a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville @Override 304a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville protected void init(Context context, PhoneNotifier notifier) { 305a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville mCi.setPhoneType(PhoneConstants.PHONE_TYPE_CDMA); 306a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville mCT = new CdmaCallTracker(this); 307a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville mCdmaSSM = CdmaSubscriptionSourceManager.getInstance(context, mCi, this, 308a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville EVENT_CDMA_SUBSCRIPTION_SOURCE_CHANGED, null); 309a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville mRuimPhoneBookInterfaceManager = new RuimPhoneBookInterfaceManager(this); 310a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville mSubInfo = new PhoneSubInfo(this); 311a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville mEriManager = new EriManager(this, context, EriManager.ERI_FROM_XML); 312a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 313a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville mCi.registerForAvailable(this, EVENT_RADIO_AVAILABLE, null); 314a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville mCi.registerForOffOrNotAvailable(this, EVENT_RADIO_OFF_OR_NOT_AVAILABLE, null); 315a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville mCi.registerForOn(this, EVENT_RADIO_ON, null); 316a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville mCi.setOnSuppServiceNotification(this, EVENT_SSN, null); 317a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville mSST.registerForNetworkAttached(this, EVENT_REGISTERED_TO_NETWORK, null); 318a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville mCi.setEmergencyCallbackMode(this, EVENT_EMERGENCY_CALLBACK_MODE_ENTER, null); 319a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville mCi.registerForExitEmergencyCallbackMode(this, EVENT_EXIT_EMERGENCY_CALLBACK_RESPONSE, 320a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville null); 321a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 322a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville PowerManager pm 323a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville = (PowerManager) context.getSystemService(Context.POWER_SERVICE); 324a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,LOG_TAG); 325a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 326a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville // This is needed to handle phone process crashes 327a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville String inEcm = SystemProperties.get(TelephonyProperties.PROPERTY_INECM_MODE, "false"); 328a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville mIsPhoneInEcmState = inEcm.equals("true"); 329a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville if (mIsPhoneInEcmState) { 330a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville // Send a message which will invoke handleExitEmergencyCallbackMode 331a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville mCi.exitEmergencyCallbackMode(obtainMessage(EVENT_EXIT_EMERGENCY_CALLBACK_RESPONSE)); 332bb36adde615d3d85fa0fc23935197c6bc6a799edAlex Yakavenka } 333e287feac673ff68565b766e0e463d105fa9cef9dAlex Yakavenka 334a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville // get the string that specifies the carrier OTA Sp number 335a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville mCarrierOtaSpNumSchema = SystemProperties.get( 336a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville TelephonyProperties.PROPERTY_OTASP_NUM_SCHEMA,""); 337a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 338a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville setProperties(); 339a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville } 340a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 341a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville // Set the properties per subscription 342a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville private void setProperties() { 343a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville //Change the system property 344a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville setSystemProperty(TelephonyProperties.CURRENT_ACTIVE_PHONE, 345a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville new Integer(PhoneConstants.PHONE_TYPE_CDMA).toString()); 346a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville // Sets operator alpha property by retrieving from build-time system property 347a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville String operatorAlpha = SystemProperties.get("ro.cdma.home.operator.alpha"); 348b93bb3538c55f173f94a4ee7510d9d1521d8f731Shishir Agrawal if (!TextUtils.isEmpty(operatorAlpha)) { 349b93bb3538c55f173f94a4ee7510d9d1521d8f731Shishir Agrawal setSystemProperty(PROPERTY_ICC_OPERATOR_ALPHA, operatorAlpha); 350b93bb3538c55f173f94a4ee7510d9d1521d8f731Shishir Agrawal } 351a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 352a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville // Sets operator numeric property by retrieving from build-time system property 353a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville String operatorNumeric = SystemProperties.get(PROPERTY_CDMA_HOME_OPERATOR_NUMERIC); 354a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville log("update icc_operator_numeric=" + operatorNumeric); 355b93bb3538c55f173f94a4ee7510d9d1521d8f731Shishir Agrawal if (!TextUtils.isEmpty(operatorNumeric)) { 356b93bb3538c55f173f94a4ee7510d9d1521d8f731Shishir Agrawal setSystemProperty(PROPERTY_ICC_OPERATOR_NUMERIC, operatorNumeric); 357ab57aa5d465ef3a6dc0895b2408276617a2f6fa0Tom Taylor 358ab57aa5d465ef3a6dc0895b2408276617a2f6fa0Tom Taylor SubscriptionController.getInstance().setMccMnc(operatorNumeric, getSubId()); 359b93bb3538c55f173f94a4ee7510d9d1521d8f731Shishir Agrawal // Sets iso country property by retrieving from build-time system property 360b93bb3538c55f173f94a4ee7510d9d1521d8f731Shishir Agrawal setIsoCountryProperty(operatorNumeric); 361b93bb3538c55f173f94a4ee7510d9d1521d8f731Shishir Agrawal // Updates MCC MNC device configuration information 362b93bb3538c55f173f94a4ee7510d9d1521d8f731Shishir Agrawal log("update mccmnc=" + operatorNumeric); 363b93bb3538c55f173f94a4ee7510d9d1521d8f731Shishir Agrawal MccTable.updateMccMncConfiguration(mContext, operatorNumeric, false); 364b93bb3538c55f173f94a4ee7510d9d1521d8f731Shishir Agrawal } 365a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville // Sets current entry in the telephony carrier table 366a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville updateCurrentCarrierInProvider(); 367a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville } 368a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 369a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville @Override 370a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville public void setSystemProperty(String property, String value) { 371a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville if(getUnitTestMode()) { 372a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville return; 373e287feac673ff68565b766e0e463d105fa9cef9dAlex Yakavenka } 3746bc4098827f3070a44b5e51508b455d7c7be9c07Wink Saville TelephonyManager.setTelephonyProperty(mPhoneId, property, value); 375a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville } 376a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 377a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville public String getSystemProperty(String property, String defValue) { 378a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville if(getUnitTestMode()) { 379a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville return null; 380a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville } 3816bc4098827f3070a44b5e51508b455d7c7be9c07Wink Saville return TelephonyManager.getTelephonyProperty(mPhoneId, property, defValue); 382a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville } 383a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 384a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville public void updateDataConnectionTracker() { 385a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville ((DcTracker)mDcTracker).update(); 386a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville } 387a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 388a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville public void setInternalDataEnabled(boolean enable, Message onCompleteMsg) { 389a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville ((DcTracker)mDcTracker) 390a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville .setInternalDataEnabled(enable, onCompleteMsg); 391a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville } 392a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 393a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville public boolean setInternalDataEnabledFlag(boolean enable) { 394a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville return ((DcTracker)mDcTracker) 395a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville .setInternalDataEnabledFlag(enable); 396a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville } 397a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 398a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville /** 399a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville * @return operator numeric. 400a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville */ 401a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville public String getOperatorNumeric() { 402a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville String operatorNumeric = null; 40380bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao IccRecords curIccRecords = null; 404a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville if (mCdmaSubscriptionSource == CDMA_SUBSCRIPTION_NV) { 405a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville operatorNumeric = SystemProperties.get("ro.cdma.home.operator.numeric"); 40680bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao } else if (mCdmaSubscriptionSource == CDMA_SUBSCRIPTION_RUIM_SIM) { 40780bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao curIccRecords = mSimRecords; 40880bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao if (curIccRecords != null) { 40980bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao operatorNumeric = curIccRecords.getOperatorNumeric(); 41080bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao } else { 41180bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao curIccRecords = mIccRecords.get(); 41280bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao if (curIccRecords != null && (curIccRecords instanceof RuimRecords)) { 41380bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao RuimRecords csim = (RuimRecords) curIccRecords; 41480bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao operatorNumeric = csim.getRUIMOperatorNumeric(); 41580bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao } 41680bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao } 41780bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao } 41880bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao if (operatorNumeric == null) { 419a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville Rlog.e(LOG_TAG, "getOperatorNumeric: Cannot retrieve operatorNumeric:" 420a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville + " mCdmaSubscriptionSource = " + mCdmaSubscriptionSource + " mIccRecords = " 42180bc1e5a6f0bd91b886351997b797e01732c1c67Jing Zhao + ((curIccRecords != null) ? curIccRecords.getRecordsLoaded() : null)); 422e287feac673ff68565b766e0e463d105fa9cef9dAlex Yakavenka } 423e287feac673ff68565b766e0e463d105fa9cef9dAlex Yakavenka 424a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville Rlog.d(LOG_TAG, "getOperatorNumeric: mCdmaSubscriptionSource = " + mCdmaSubscriptionSource 425a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville + " operatorNumeric = " + operatorNumeric); 426a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 427a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville return operatorNumeric; 428a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville } 429a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville public void registerForAllDataDisconnected(Handler h, int what, Object obj) { 430a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville ((DcTracker)mDcTracker) 431a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville .registerForAllDataDisconnected(h, what, obj); 432a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville } 433a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville 434a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville public void unregisterForAllDataDisconnected(Handler h) { 435a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville ((DcTracker)mDcTracker) 436a8467dd0c524787104b1ccdddc5e8af10ba729edWink Saville .unregisterForAllDataDisconnected(h); 437bb36adde615d3d85fa0fc23935197c6bc6a799edAlex Yakavenka } 438bb36adde615d3d85fa0fc23935197c6bc6a799edAlex Yakavenka 439bb36adde615d3d85fa0fc23935197c6bc6a799edAlex Yakavenka @Override 44080915ad5159e7a4e72fa436787044b0c075ff6cfShishir Agrawal public void registerForSimRecordsLoaded(Handler h, int what, Object obj) { 44180915ad5159e7a4e72fa436787044b0c075ff6cfShishir Agrawal mSimRecordsLoadedRegistrants.addUnique(h, what, obj); 44280915ad5159e7a4e72fa436787044b0c075ff6cfShishir Agrawal } 44380915ad5159e7a4e72fa436787044b0c075ff6cfShishir Agrawal 44480915ad5159e7a4e72fa436787044b0c075ff6cfShishir Agrawal @Override 44580915ad5159e7a4e72fa436787044b0c075ff6cfShishir Agrawal public void unregisterForSimRecordsLoaded(Handler h) { 44680915ad5159e7a4e72fa436787044b0c075ff6cfShishir Agrawal mSimRecordsLoadedRegistrants.remove(h); 44780915ad5159e7a4e72fa436787044b0c075ff6cfShishir Agrawal } 44880915ad5159e7a4e72fa436787044b0c075ff6cfShishir Agrawal 44980915ad5159e7a4e72fa436787044b0c075ff6cfShishir Agrawal 45080915ad5159e7a4e72fa436787044b0c075ff6cfShishir Agrawal @Override 451c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville protected void log(String s) { 452cbaa45bbf2cab852b6c9c3a887e9f803d4e857eaWink Saville Rlog.d(LOG_LTE_TAG, s); 453cbaa45bbf2cab852b6c9c3a887e9f803d4e857eaWink Saville } 454cbaa45bbf2cab852b6c9c3a887e9f803d4e857eaWink Saville 455cbaa45bbf2cab852b6c9c3a887e9f803d4e857eaWink Saville protected void loge(String s) { 456cbaa45bbf2cab852b6c9c3a887e9f803d4e857eaWink Saville Rlog.e(LOG_LTE_TAG, s); 457c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville } 458c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville 459cbaa45bbf2cab852b6c9c3a887e9f803d4e857eaWink Saville protected void loge(String s, Throwable e) { 460cbaa45bbf2cab852b6c9c3a887e9f803d4e857eaWink Saville Rlog.e(LOG_LTE_TAG, s, e); 461f61aaae6608243be4e0da97a56ff9fed488cb173Shishir Agrawal } 462cbaa45bbf2cab852b6c9c3a887e9f803d4e857eaWink Saville 463c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville @Override 464c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { 465c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville pw.println("CDMALTEPhone extends:"); 466c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville super.dump(fd, pw, args); 467c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville } 468c38bb60d867c5d61d90b7179a9ed2b2d1848124fWink Saville} 469