Methods Summary |
---|
public void | dispose()
synchronized(PhoneProxy.lockForRadioTechnologyChange) {
if (mSimRecords != null) {
mSimRecords.unregisterForRecordsLoaded(this);
}
super.dispose();
}
|
public void | dump(java.io.FileDescriptor fd, java.io.PrintWriter pw, java.lang.String[] args)
pw.println("CDMALTEPhone extends:");
super.dump(fd, pw, args);
|
public void | getAvailableNetworks(android.os.Message response)
mCi.getAvailableNetworks(response);
|
public PhoneConstants.DataState | getDataConnectionState(java.lang.String apnType)
PhoneConstants.DataState ret = PhoneConstants.DataState.DISCONNECTED;
if (mSST == null) {
// Radio Technology Change is ongoing, dispose() and
// removeReferences() have already been called
ret = PhoneConstants.DataState.DISCONNECTED;
} else if (mDcTracker.isApnTypeEnabled(apnType) == false) {
ret = PhoneConstants.DataState.DISCONNECTED;
} else {
switch (mDcTracker.getState(apnType)) {
case RETRYING:
case FAILED:
case IDLE:
ret = PhoneConstants.DataState.DISCONNECTED;
break;
case CONNECTED:
case DISCONNECTING:
if (mCT.mState != PhoneConstants.State.IDLE &&
!mSST.isConcurrentVoiceAndDataAllowed()) {
ret = PhoneConstants.DataState.SUSPENDED;
} else {
ret = PhoneConstants.DataState.CONNECTED;
}
break;
case CONNECTING:
case SCANNING:
ret = PhoneConstants.DataState.CONNECTING;
break;
}
}
log("getDataConnectionState apnType=" + apnType + " ret=" + ret);
return ret;
|
public java.lang.String | getDeviceSvn()
return mImeiSv;
|
public java.lang.String | getGroupIdLevel1()
return (mSimRecords != null) ? mSimRecords.getGid1() : "";
|
public java.lang.String | getImei()
return mImei;
|
public com.android.internal.telephony.uicc.IsimRecords | getIsimRecords()
return mIsimUiccRecords;
|
public java.lang.String | getMsisdn()
return (mSimRecords != null) ? mSimRecords.getMsisdnNumber() : null;
|
public java.lang.String | getOperatorNumeric()
String operatorNumeric = null;
IccRecords curIccRecords = null;
if (mCdmaSubscriptionSource == CDMA_SUBSCRIPTION_NV) {
operatorNumeric = SystemProperties.get("ro.cdma.home.operator.numeric");
} else if (mCdmaSubscriptionSource == CDMA_SUBSCRIPTION_RUIM_SIM) {
curIccRecords = mSimRecords;
if (curIccRecords != null) {
operatorNumeric = curIccRecords.getOperatorNumeric();
} else {
curIccRecords = mIccRecords.get();
if (curIccRecords != null && (curIccRecords instanceof RuimRecords)) {
RuimRecords csim = (RuimRecords) curIccRecords;
operatorNumeric = csim.getRUIMOperatorNumeric();
}
}
}
if (operatorNumeric == null) {
Rlog.e(LOG_TAG, "getOperatorNumeric: Cannot retrieve operatorNumeric:"
+ " mCdmaSubscriptionSource = " + mCdmaSubscriptionSource + " mIccRecords = "
+ ((curIccRecords != null) ? curIccRecords.getRecordsLoaded() : null));
}
Rlog.d(LOG_TAG, "getOperatorNumeric: mCdmaSubscriptionSource = " + mCdmaSubscriptionSource
+ " operatorNumeric = " + operatorNumeric);
return operatorNumeric;
|
public java.lang.String | getSubscriberId()
return (mSimRecords != null) ? mSimRecords.getIMSI() : "";
|
public java.lang.String | getSystemProperty(java.lang.String property, java.lang.String defValue)
if(getUnitTestMode()) {
return null;
}
return TelephonyManager.getTelephonyProperty(mPhoneId, property, defValue);
|
public void | handleMessage(android.os.Message msg)
AsyncResult ar;
Message onComplete;
// messages to be handled whether or not the phone is being destroyed
// should only include messages which are being re-directed and do not use
// resources of the phone being destroyed
switch (msg.what) {
// handle the select network completion callbacks.
case EVENT_SET_NETWORK_MANUAL_COMPLETE:
case EVENT_SET_NETWORK_AUTOMATIC_COMPLETE:
super.handleMessage(msg);
return;
}
if (!mIsTheCurrentActivePhone) {
Rlog.e(LOG_TAG, "Received message " + msg +
"[" + msg.what + "] while being destroyed. Ignoring.");
return;
}
switch(msg.what) {
case EVENT_SIM_RECORDS_LOADED:
mSimRecordsLoadedRegistrants.notifyRegistrants();
break;
default:
super.handleMessage(msg);
}
|
protected void | init(android.content.Context context, com.android.internal.telephony.PhoneNotifier notifier)
mCi.setPhoneType(PhoneConstants.PHONE_TYPE_CDMA);
mCT = new CdmaCallTracker(this);
mCdmaSSM = CdmaSubscriptionSourceManager.getInstance(context, mCi, this,
EVENT_CDMA_SUBSCRIPTION_SOURCE_CHANGED, null);
mRuimPhoneBookInterfaceManager = new RuimPhoneBookInterfaceManager(this);
mSubInfo = new PhoneSubInfo(this);
mEriManager = new EriManager(this, context, EriManager.ERI_FROM_XML);
mCi.registerForAvailable(this, EVENT_RADIO_AVAILABLE, null);
mCi.registerForOffOrNotAvailable(this, EVENT_RADIO_OFF_OR_NOT_AVAILABLE, null);
mCi.registerForOn(this, EVENT_RADIO_ON, null);
mCi.setOnSuppServiceNotification(this, EVENT_SSN, null);
mSST.registerForNetworkAttached(this, EVENT_REGISTERED_TO_NETWORK, null);
mCi.setEmergencyCallbackMode(this, EVENT_EMERGENCY_CALLBACK_MODE_ENTER, null);
mCi.registerForExitEmergencyCallbackMode(this, EVENT_EXIT_EMERGENCY_CALLBACK_RESPONSE,
null);
PowerManager pm
= (PowerManager) context.getSystemService(Context.POWER_SERVICE);
mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,LOG_TAG);
// This is needed to handle phone process crashes
String inEcm = SystemProperties.get(TelephonyProperties.PROPERTY_INECM_MODE, "false");
mIsPhoneInEcmState = inEcm.equals("true");
if (mIsPhoneInEcmState) {
// Send a message which will invoke handleExitEmergencyCallbackMode
mCi.exitEmergencyCallbackMode(obtainMessage(EVENT_EXIT_EMERGENCY_CALLBACK_RESPONSE));
}
// get the string that specifies the carrier OTA Sp number
mCarrierOtaSpNumSchema = TelephonyManager.from(mContext).getOtaSpNumberSchemaForPhone(
getPhoneId(), "");
setProperties();
|
protected void | initSstIcc()
mSST = new CdmaLteServiceStateTracker(this);
|
protected void | log(java.lang.String s)
Rlog.d(LOG_LTE_TAG, s);
|
protected void | loge(java.lang.String s)
Rlog.e(LOG_LTE_TAG, s);
|
protected void | loge(java.lang.String s, java.lang.Throwable e)
Rlog.e(LOG_LTE_TAG, s, e);
|
protected void | onUpdateIccAvailability()
if (mSimRecords != null) {
mSimRecords.unregisterForRecordsLoaded(this);
}
if (mUiccController == null ) {
return;
}
// Update IsimRecords
UiccCardApplication newUiccApplication =
mUiccController.getUiccCardApplication(mPhoneId, UiccController.APP_FAM_IMS);
IsimUiccRecords newIsimUiccRecords = null;
if (newUiccApplication != null) {
newIsimUiccRecords = (IsimUiccRecords) newUiccApplication.getIccRecords();
}
mIsimUiccRecords = newIsimUiccRecords;
// Update UsimRecords
newUiccApplication = mUiccController.getUiccCardApplication(mPhoneId,
UiccController.APP_FAM_3GPP);
SIMRecords newSimRecords = null;
if (newUiccApplication != null) {
newSimRecords = (SIMRecords) newUiccApplication.getIccRecords();
}
mSimRecords = newSimRecords;
if (mSimRecords != null) {
mSimRecords.registerForRecordsLoaded(this, EVENT_SIM_RECORDS_LOADED, null);
}
super.onUpdateIccAvailability();
|
public void | registerForAllDataDisconnected(android.os.Handler h, int what, java.lang.Object obj)
((DcTracker)mDcTracker)
.registerForAllDataDisconnected(h, what, obj);
|
public void | registerForSimRecordsLoaded(android.os.Handler h, int what, java.lang.Object obj)
mSimRecordsLoadedRegistrants.addUnique(h, what, obj);
|
public void | removeReferences()
super.removeReferences();
|
public void | setInternalDataEnabled(boolean enable, android.os.Message onCompleteMsg)
((DcTracker)mDcTracker)
.setInternalDataEnabled(enable, onCompleteMsg);
|
public boolean | setInternalDataEnabledFlag(boolean enable)
return ((DcTracker)mDcTracker)
.setInternalDataEnabledFlag(enable);
|
private void | setProperties()
TelephonyManager tm = TelephonyManager.from(mContext);
//Change the system property
tm.setPhoneType(getPhoneId(), PhoneConstants.PHONE_TYPE_CDMA);
// Sets operator alpha property by retrieving from build-time system property
String operatorAlpha = SystemProperties.get("ro.cdma.home.operator.alpha");
if (!TextUtils.isEmpty(operatorAlpha)) {
tm.setSimOperatorNameForPhone(getPhoneId(), operatorAlpha);
}
// Sets operator numeric property by retrieving from build-time system property
String operatorNumeric = SystemProperties.get(PROPERTY_CDMA_HOME_OPERATOR_NUMERIC);
log("update icc_operator_numeric=" + operatorNumeric);
if (!TextUtils.isEmpty(operatorNumeric)) {
tm.setSimOperatorNumericForPhone(getPhoneId(), operatorNumeric);
SubscriptionController.getInstance().setMccMnc(operatorNumeric, getSubId());
// Sets iso country property by retrieving from build-time system property
setIsoCountryProperty(operatorNumeric);
// Updates MCC MNC device configuration information
log("update mccmnc=" + operatorNumeric);
MccTable.updateMccMncConfiguration(mContext, operatorNumeric, false);
}
// Sets current entry in the telephony carrier table
updateCurrentCarrierInProvider();
|
public void | setSystemProperty(java.lang.String property, java.lang.String value)
if(getUnitTestMode()) {
return;
}
TelephonyManager.setTelephonyProperty(mPhoneId, property, value);
|
public void | unregisterForAllDataDisconnected(android.os.Handler h)
((DcTracker)mDcTracker)
.unregisterForAllDataDisconnected(h);
|
public void | unregisterForSimRecordsLoaded(android.os.Handler h)
mSimRecordsLoadedRegistrants.remove(h);
|
boolean | updateCurrentCarrierInProvider(java.lang.String operatorNumeric)Sets the "current" field in the telephony provider according to the
build-time operator numeric property
boolean retVal;
if (mUiccController.getUiccCardApplication(mPhoneId, UiccController.APP_FAM_3GPP) == null) {
if (DBG) log("updateCurrentCarrierInProvider APP_FAM_3GPP == null");
retVal = super.updateCurrentCarrierInProvider(operatorNumeric);
} else {
if (DBG) log("updateCurrentCarrierInProvider not updated");
retVal = true;
}
if (DBG) log("updateCurrentCarrierInProvider X retVal=" + retVal);
return retVal;
|
public boolean | updateCurrentCarrierInProvider()
long currentDds = SubscriptionManager.getDefaultDataSubId();
String operatorNumeric = getOperatorNumeric();
Rlog.d(LOG_TAG, "updateCurrentCarrierInProvider: mSubscription = " + getSubId()
+ " currentDds = " + currentDds + " operatorNumeric = " + operatorNumeric);
if (!TextUtils.isEmpty(operatorNumeric) && (getSubId() == currentDds)) {
try {
Uri uri = Uri.withAppendedPath(Telephony.Carriers.CONTENT_URI, "current");
ContentValues map = new ContentValues();
map.put(Telephony.Carriers.NUMERIC, operatorNumeric);
mContext.getContentResolver().insert(uri, map);
return true;
} catch (SQLException e) {
Rlog.e(LOG_TAG, "Can't store current operator", e);
}
}
return false;
|
public void | updateDataConnectionTracker()
((DcTracker)mDcTracker).update();
|