Methods Summary |
---|
public void | acceptCall(int videoState)
ImsPhone imsPhone = mImsPhone;
if ( imsPhone != null && imsPhone.getRingingCall().isRinging() ) {
imsPhone.acceptCall(videoState);
} else {
mCT.acceptCall();
}
|
public void | activateCellBroadcastSms(int activate, android.os.Message response)Activate or deactivate cell broadcast SMS.
Rlog.e(LOG_TAG, "[GSMPhone] activateCellBroadcastSms() is obsolete; use SmsManager");
response.sendToTarget();
|
public boolean | canConference()
boolean canImsConference = false;
if (mImsPhone != null) {
canImsConference = mImsPhone.canConference();
}
return mCT.canConference() || canImsConference;
|
public boolean | canDial()
return mCT.canDial();
|
public boolean | canTransfer()
return mCT.canTransfer();
|
public void | clearDisconnected()
mCT.clearDisconnected();
|
public void | conference()
if (mImsPhone != null && mImsPhone.canConference()) {
log("conference() - delegated to IMS phone");
mImsPhone.conference();
return;
}
mCT.conference();
|
public com.android.internal.telephony.Connection | dial(java.lang.String dialString, int videoState)
return dial(dialString, null, videoState);
|
public com.android.internal.telephony.Connection | dial(java.lang.String dialString, com.android.internal.telephony.UUSInfo uusInfo, int videoState)
ImsPhone imsPhone = mImsPhone;
boolean imsUseEnabled =
ImsManager.isVolteEnabledByPlatform(mContext) &&
ImsManager.isEnhanced4gLteModeSettingEnabledByUser(mContext) &&
ImsManager.isNonTtyOrTtyOnVolteEnabled(mContext);
if (!imsUseEnabled) {
Rlog.w(LOG_TAG, "IMS is disabled: forced to CS");
}
if (LOCAL_DEBUG) {
Rlog.d(LOG_TAG, "imsUseEnabled=" + imsUseEnabled + ", imsPhone=" + imsPhone
+ ", imsPhone.isVolteEnabled()="
+ ((imsPhone != null) ? imsPhone.isVolteEnabled() : "N/A")
+ ", imsPhone.getServiceState().getState()="
+ ((imsPhone != null) ? imsPhone.getServiceState().getState() : "N/A"));
}
if (imsUseEnabled && imsPhone != null && imsPhone.isVolteEnabled()
&& ((imsPhone.getServiceState().getState() == ServiceState.STATE_IN_SERVICE
&& !PhoneNumberUtils.isEmergencyNumber(dialString))
|| (PhoneNumberUtils.isEmergencyNumber(dialString)
&& mContext.getResources().getBoolean(
com.android.internal.R.bool.useImsAlwaysForEmergencyCall))) ) {
try {
if (LOCAL_DEBUG) Rlog.d(LOG_TAG, "Trying IMS PS call");
return imsPhone.dial(dialString, videoState);
} catch (CallStateException e) {
if (LOCAL_DEBUG) Rlog.d(LOG_TAG, "IMS PS call exception " + e +
"imsUseEnabled =" + imsUseEnabled + ", imsPhone =" + imsPhone);
if (!ImsPhone.CS_FALLBACK.equals(e.getMessage())) {
CallStateException ce = new CallStateException(e.getMessage());
ce.setStackTrace(e.getStackTrace());
throw ce;
}
}
}
if (LOCAL_DEBUG) Rlog.d(LOG_TAG, "Trying (non-IMS) CS call");
return dialInternal(dialString, null, VideoProfile.VideoState.AUDIO_ONLY);
|
protected com.android.internal.telephony.Connection | dialInternal(java.lang.String dialString, com.android.internal.telephony.UUSInfo uusInfo, int videoState)
// Need to make sure dialString gets parsed properly
String newDialString = PhoneNumberUtils.stripSeparators(dialString);
// handle in-call MMI first if applicable
if (handleInCallMmiCommands(newDialString)) {
return null;
}
// Only look at the Network portion for mmi
String networkPortion = PhoneNumberUtils.extractNetworkPortionAlt(newDialString);
GsmMmiCode mmi =
GsmMmiCode.newFromDialString(networkPortion, this, mUiccApplication.get());
if (LOCAL_DEBUG) Rlog.d(LOG_TAG,
"dialing w/ mmi '" + mmi + "'...");
if (mmi == null) {
return mCT.dial(newDialString, uusInfo);
} else if (mmi.isTemporaryModeCLIR()) {
return mCT.dial(mmi.mDialingNumber, mmi.getCLIRMode(), uusInfo);
} else {
mPendingMMIs.add(mmi);
mMmiRegistrants.notifyRegistrants(new AsyncResult(null, mmi, null));
mmi.processCode();
// FIXME should this return null or something else?
return null;
}
|
public void | disableLocationUpdates()
mSST.disableLocationUpdates();
|
public void | dispose()
synchronized(PhoneProxy.lockForRadioTechnologyChange) {
super.dispose();
//Unregister from all former registered events
mCi.unregisterForAvailable(this); //EVENT_RADIO_AVAILABLE
unregisterForSimRecordEvents();
mCi.unregisterForOffOrNotAvailable(this); //EVENT_RADIO_OFF_OR_NOT_AVAILABLE
mCi.unregisterForOn(this); //EVENT_RADIO_ON
mSST.unregisterForNetworkAttached(this); //EVENT_REGISTERED_TO_NETWORK
mCi.unSetOnUSSD(this);
mCi.unSetOnSuppServiceNotification(this);
mCi.unSetOnSs(this);
mPendingMMIs.clear();
//Force all referenced classes to unregister their former registered events
mCT.dispose();
mDcTracker.dispose();
mSST.dispose();
mSimPhoneBookIntManager.dispose();
mSubInfo.dispose();
}
|
public void | dump(java.io.FileDescriptor fd, java.io.PrintWriter pw, java.lang.String[] args)
pw.println("GSMPhone extends:");
super.dump(fd, pw, args);
pw.println(" mCT=" + mCT);
pw.println(" mSST=" + mSST);
pw.println(" mPendingMMIs=" + mPendingMMIs);
pw.println(" mSimPhoneBookIntManager=" + mSimPhoneBookIntManager);
pw.println(" mSubInfo=" + mSubInfo);
if (VDBG) pw.println(" mImei=" + mImei);
if (VDBG) pw.println(" mImeiSv=" + mImeiSv);
pw.println(" mVmNumber=" + mVmNumber);
|
public void | enableLocationUpdates()
mSST.enableLocationUpdates();
|
public void | exitEmergencyCallbackMode()
if (mImsPhone != null) {
mImsPhone.exitEmergencyCallbackMode();
}
|
public void | explicitCallTransfer()
mCT.explicitCallTransfer();
|
protected void | finalize()
if(LOCAL_DEBUG) Rlog.d(LOG_TAG, "GSMPhone finalized");
|
public void | getAvailableNetworks(android.os.Message response)
mCi.getAvailableNetworks(response);
|
public GsmCall | getBackgroundCall()
return mCT.mBackgroundCall;
|
public void | getCallForwardingOption(int commandInterfaceCFReason, android.os.Message onComplete)
ImsPhone imsPhone = mImsPhone;
if ((imsPhone != null)
&& (imsPhone.getServiceState().getState() == ServiceState.STATE_IN_SERVICE)) {
imsPhone.getCallForwardingOption(commandInterfaceCFReason, onComplete);
return;
}
if (isValidCommandInterfaceCFReason(commandInterfaceCFReason)) {
if (LOCAL_DEBUG) Rlog.d(LOG_TAG, "requesting call forwarding query.");
Message resp;
if (commandInterfaceCFReason == CF_REASON_UNCONDITIONAL) {
resp = obtainMessage(EVENT_GET_CALL_FORWARD_DONE, onComplete);
} else {
resp = onComplete;
}
mCi.queryCallForwardStatus(commandInterfaceCFReason,0,null,resp);
}
|
public com.android.internal.telephony.CallTracker | getCallTracker()
return mCT;
|
public void | getCallWaiting(android.os.Message onComplete)
ImsPhone imsPhone = mImsPhone;
if ((imsPhone != null)
&& (imsPhone.getServiceState().getState() == ServiceState.STATE_IN_SERVICE)) {
imsPhone.getCallWaiting(onComplete);
return;
}
//As per 3GPP TS 24.083, section 1.6 UE doesn't need to send service
//class parameter in call waiting interrogation to network
mCi.queryCallWaiting(CommandsInterface.SERVICE_CLASS_NONE, onComplete);
|
public void | getCellBroadcastSmsConfig(android.os.Message response)Query the current configuration of cdma cell broadcast SMS.
Rlog.e(LOG_TAG, "[GSMPhone] getCellBroadcastSmsConfig() is obsolete; use SmsManager");
response.sendToTarget();
|
public android.telephony.CellLocation | getCellLocation()
return mSST.getCellLocation();
|
public DataActivityState | getDataActivityState()
DataActivityState ret = DataActivityState.NONE;
if (mSST.getCurrentDataConnectionState() == ServiceState.STATE_IN_SERVICE) {
switch (mDcTracker.getActivity()) {
case DATAIN:
ret = DataActivityState.DATAIN;
break;
case DATAOUT:
ret = DataActivityState.DATAOUT;
break;
case DATAINANDOUT:
ret = DataActivityState.DATAINANDOUT;
break;
case DORMANT:
ret = DataActivityState.DORMANT;
break;
default:
ret = DataActivityState.NONE;
break;
}
}
return ret;
|
public void | getDataCallList(android.os.Message response)
mCi.getDataCallList(response);
|
public PhoneConstants.DataState | getDataConnectionState(java.lang.String apnType)
PhoneConstants.DataState ret = PhoneConstants.DataState.DISCONNECTED;
if (mSST == null) {
// Radio Technology Change is ongoning, dispose() and removeReferences() have
// already been called
ret = PhoneConstants.DataState.DISCONNECTED;
} else if (!apnType.equals(PhoneConstants.APN_TYPE_EMERGENCY) &&
mSST.getCurrentDataConnectionState() != ServiceState.STATE_IN_SERVICE) {
// If we're out of service, open TCP sockets may still work
// but no data will flow
// Emergency APN is available even in Out Of Service
// Pass the actual State of EPDN
ret = PhoneConstants.DataState.DISCONNECTED;
} else if (mDcTracker.isApnTypeEnabled(apnType) == false ||
mDcTracker.isApnTypeActive(apnType) == false) {
//TODO: isApnTypeActive() is just checking whether ApnContext holds
// Dataconnection or not. Checking each ApnState below should
// provide the same state. Calling isApnTypeActive() can be removed.
ret = PhoneConstants.DataState.DISCONNECTED;
} else { /* mSST.gprsState == ServiceState.STATE_IN_SERVICE */
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;
}
}
return ret;
|
public boolean | getDataEnabled()
return mDcTracker.getDataEnabled();
|
public boolean | getDataRoamingEnabled()
return mDcTracker.getDataOnRoamingEnabled();
|
public java.lang.String | getDeviceId()
return mImei;
|
public java.lang.String | getDeviceSvn()
return mImeiSv;
|
public java.lang.String | getEsn()
Rlog.e(LOG_TAG, "[GSMPhone] getEsn() is a CDMA method");
return "0";
|
public GsmCall | getForegroundCall()
return mCT.mForegroundCall;
|
public java.lang.String | getGroupIdLevel1()
IccRecords r = mIccRecords.get();
return (r != null) ? r.getGid1() : null;
|
public com.android.internal.telephony.IccPhoneBookInterfaceManager | getIccPhoneBookInterfaceManager()Retrieves the IccPhoneBookInterfaceManager of the GSMPhone
return mSimPhoneBookIntManager;
|
public java.lang.String | getImei()
return mImei;
|
public com.android.internal.telephony.uicc.IsimRecords | getIsimRecords()
return mIsimUiccRecords;
|
public java.lang.String | getLine1AlphaTag()
IccRecords r = mIccRecords.get();
return (r != null) ? r.getMsisdnAlphaTag() : null;
|
public java.lang.String | getLine1Number()
IccRecords r = mIccRecords.get();
return (r != null) ? r.getMsisdnNumber() : null;
|
public java.lang.String | getMeid()
Rlog.e(LOG_TAG, "[GSMPhone] getMeid() is a CDMA method");
return "0";
|
public java.lang.String | getMsisdn()
IccRecords r = mIccRecords.get();
return (r != null) ? r.getMsisdnNumber() : null;
|
public boolean | getMute()
return mCT.getMute();
|
public java.lang.String | getNai()
IccRecords r = mUiccController.getIccRecords(mPhoneId, UiccController.APP_FAM_3GPP2);
if (Log.isLoggable(LOG_TAG, Log.VERBOSE)) {
Rlog.v(LOG_TAG, "IccRecords is " + r);
}
return (r != null) ? r.getNAI() : null;
|
public void | getNeighboringCids(android.os.Message response)
mCi.getNeighboringCids(response);
|
public java.lang.String | getOperatorNumeric()
String operatorNumeric = null;
IccRecords r = mIccRecords.get();
if (r != null) {
operatorNumeric = r.getOperatorNumeric();
}
return operatorNumeric;
|
public void | getOutgoingCallerIdDisplay(android.os.Message onComplete)
mCi.getCLIR(onComplete);
|
public java.util.List | getPendingMmiCodes()
return mPendingMMIs;
|
public com.android.internal.telephony.PhoneSubInfo | getPhoneSubInfo()Retrieves the PhoneSubInfo of the GSMPhone
return mSubInfo;
|
public int | getPhoneType()
return PhoneConstants.PHONE_TYPE_GSM;
|
public com.android.internal.telephony.Call | getRingingCall()
ImsPhone imsPhone = mImsPhone;
if ( mCT.mRingingCall != null && mCT.mRingingCall.isRinging() ) {
return mCT.mRingingCall;
} else if ( imsPhone != null ) {
return imsPhone.getRingingCall();
}
return mCT.mRingingCall;
|
public android.telephony.ServiceState | getServiceState()
if (mSST == null || mSST.mSS.getState() != ServiceState.STATE_IN_SERVICE) {
if (mImsPhone != null) {
return ServiceState.mergeServiceStates(
(mSST == null) ? new ServiceState() : mSST.mSS,
mImsPhone.getServiceState());
}
}
if (mSST != null) {
return mSST.mSS;
} else {
// avoid potential NPE in EmergencyCallHelper during Phone switch
return new ServiceState();
}
|
public com.android.internal.telephony.ServiceStateTracker | getServiceStateTracker()
return mSST;
|
public PhoneConstants.State | getState()
if (mImsPhone != null) {
PhoneConstants.State imsState = mImsPhone.getState();
if (imsState != PhoneConstants.State.IDLE) {
return imsState;
}
}
return mCT.mState;
|
public java.lang.String | getSubscriberId()
IccRecords r = mIccRecords.get();
return (r != null) ? r.getIMSI() : null;
|
public java.lang.String | getSystemProperty(java.lang.String property, java.lang.String defValue)
if(getUnitTestMode()) {
return null;
}
return TelephonyManager.getTelephonyProperty(mPhoneId, property, defValue);
|
protected com.android.internal.telephony.uicc.UiccCardApplication | getUiccCardApplication()
return mUiccController.getUiccCardApplication(mPhoneId,
UiccController.APP_FAM_3GPP);
|
private java.lang.String | getVmSimImsi()
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(getContext());
return sp.getString(VM_SIM_IMSI + getPhoneId(), null);
|
public java.lang.String | getVoiceMailAlphaTag()
String ret;
IccRecords r = mIccRecords.get();
ret = (r != null) ? r.getVoiceMailAlphaTag() : "";
if (ret == null || ret.length() == 0) {
return mContext.getText(
com.android.internal.R.string.defaultVoiceMailAlphaTag).toString();
}
return ret;
|
public java.lang.String | getVoiceMailNumber()
// Read from the SIM. If its null, try reading from the shared preference area.
IccRecords r = mIccRecords.get();
String number = (r != null) ? r.getVoiceMailNumber() : "";
if (TextUtils.isEmpty(number)) {
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(getContext());
number = sp.getString(VM_NUMBER + getPhoneId(), null);
}
if (TextUtils.isEmpty(number)) {
String[] listArray = getContext().getResources()
.getStringArray(com.android.internal.R.array.config_default_vm_number);
if (listArray != null && listArray.length > 0) {
for (int i=0; i<listArray.length; i++) {
if (!TextUtils.isEmpty(listArray[i])) {
String[] defaultVMNumberArray = listArray[i].split(";");
if (defaultVMNumberArray != null && defaultVMNumberArray.length > 0) {
if (defaultVMNumberArray.length == 1) {
number = defaultVMNumberArray[0];
} else if (defaultVMNumberArray.length == 2 &&
!TextUtils.isEmpty(defaultVMNumberArray[1]) &&
defaultVMNumberArray[1].equalsIgnoreCase(getGroupIdLevel1())) {
number = defaultVMNumberArray[0];
break;
}
}
}
}
}
}
return number;
|
private boolean | handleCallDeflectionIncallSupplementaryService(java.lang.String dialString)
if (dialString.length() > 1) {
return false;
}
if (getRingingCall().getState() != GsmCall.State.IDLE) {
if (LOCAL_DEBUG) Rlog.d(LOG_TAG, "MmiCode 0: rejectCall");
try {
mCT.rejectCall();
} catch (CallStateException e) {
if (LOCAL_DEBUG) Rlog.d(LOG_TAG,
"reject failed", e);
notifySuppServiceFailed(Phone.SuppService.REJECT);
}
} else if (getBackgroundCall().getState() != GsmCall.State.IDLE) {
if (LOCAL_DEBUG) Rlog.d(LOG_TAG,
"MmiCode 0: hangupWaitingOrBackground");
mCT.hangupWaitingOrBackground();
}
return true;
|
private boolean | handleCallHoldIncallSupplementaryService(java.lang.String dialString)
int len = dialString.length();
if (len > 2) {
return false;
}
GsmCall call = getForegroundCall();
if (len > 1) {
try {
char ch = dialString.charAt(1);
int callIndex = ch - '0";
GsmConnection conn = mCT.getConnectionByIndex(call, callIndex);
// gsm index starts at 1, up to 5 connections in a call,
if (conn != null && callIndex >= 1 && callIndex <= GsmCallTracker.MAX_CONNECTIONS) {
if (LOCAL_DEBUG) Rlog.d(LOG_TAG, "MmiCode 2: separate call "+
callIndex);
mCT.separate(conn);
} else {
if (LOCAL_DEBUG) Rlog.d(LOG_TAG, "separate: invalid call index "+
callIndex);
notifySuppServiceFailed(Phone.SuppService.SEPARATE);
}
} catch (CallStateException e) {
if (LOCAL_DEBUG) Rlog.d(LOG_TAG,
"separate failed", e);
notifySuppServiceFailed(Phone.SuppService.SEPARATE);
}
} else {
try {
if (getRingingCall().getState() != GsmCall.State.IDLE) {
if (LOCAL_DEBUG) Rlog.d(LOG_TAG,
"MmiCode 2: accept ringing call");
mCT.acceptCall();
} else {
if (LOCAL_DEBUG) Rlog.d(LOG_TAG,
"MmiCode 2: switchWaitingOrHoldingAndActive");
mCT.switchWaitingOrHoldingAndActive();
}
} catch (CallStateException e) {
if (LOCAL_DEBUG) Rlog.d(LOG_TAG,
"switch failed", e);
notifySuppServiceFailed(Phone.SuppService.SWITCH);
}
}
return true;
|
private boolean | handleCallWaitingIncallSupplementaryService(java.lang.String dialString)
int len = dialString.length();
if (len > 2) {
return false;
}
GsmCall call = getForegroundCall();
try {
if (len > 1) {
char ch = dialString.charAt(1);
int callIndex = ch - '0";
if (callIndex >= 1 && callIndex <= GsmCallTracker.MAX_CONNECTIONS) {
if (LOCAL_DEBUG) Rlog.d(LOG_TAG,
"MmiCode 1: hangupConnectionByIndex " +
callIndex);
mCT.hangupConnectionByIndex(call, callIndex);
}
} else {
if (call.getState() != GsmCall.State.IDLE) {
if (LOCAL_DEBUG) Rlog.d(LOG_TAG,
"MmiCode 1: hangup foreground");
//mCT.hangupForegroundResumeBackground();
mCT.hangup(call);
} else {
if (LOCAL_DEBUG) Rlog.d(LOG_TAG,
"MmiCode 1: switchWaitingOrHoldingAndActive");
mCT.switchWaitingOrHoldingAndActive();
}
}
} catch (CallStateException e) {
if (LOCAL_DEBUG) Rlog.d(LOG_TAG,
"hangup failed", e);
notifySuppServiceFailed(Phone.SuppService.HANGUP);
}
return true;
|
private boolean | handleCcbsIncallSupplementaryService(java.lang.String dialString)
if (dialString.length() > 1) {
return false;
}
Rlog.i(LOG_TAG, "MmiCode 5: CCBS not supported!");
// Treat it as an "unknown" service.
notifySuppServiceFailed(Phone.SuppService.UNKNOWN);
return true;
|
private void | handleCfuQueryResult(com.android.internal.telephony.CallForwardInfo[] infos)
IccRecords r = mIccRecords.get();
if (r != null) {
if (infos == null || infos.length == 0) {
// Assume the default is not active
// Set unconditional CFF in SIM to false
r.setVoiceCallForwardingFlag(1, false, null);
} else {
for (int i = 0, s = infos.length; i < s; i++) {
if ((infos[i].serviceClass & SERVICE_CLASS_VOICE) != 0) {
r.setVoiceCallForwardingFlag(1, (infos[i].status == 1),
infos[i].number);
// should only have the one
break;
}
}
}
}
|
private boolean | handleEctIncallSupplementaryService(java.lang.String dialString)
int len = dialString.length();
if (len != 1) {
return false;
}
if (LOCAL_DEBUG) Rlog.d(LOG_TAG, "MmiCode 4: explicit call transfer");
explicitCallTransfer();
return true;
|
public boolean | handleInCallMmiCommands(java.lang.String dialString)
ImsPhone imsPhone = mImsPhone;
if (imsPhone != null
&& imsPhone.getServiceState().getState() == ServiceState.STATE_IN_SERVICE) {
return imsPhone.handleInCallMmiCommands(dialString);
}
if (!isInCall()) {
return false;
}
if (TextUtils.isEmpty(dialString)) {
return false;
}
boolean result = false;
char ch = dialString.charAt(0);
switch (ch) {
case '0":
result = handleCallDeflectionIncallSupplementaryService(
dialString);
break;
case '1":
result = handleCallWaitingIncallSupplementaryService(
dialString);
break;
case '2":
result = handleCallHoldIncallSupplementaryService(dialString);
break;
case '3":
result = handleMultipartyIncallSupplementaryService(dialString);
break;
case '4":
result = handleEctIncallSupplementaryService(dialString);
break;
case '5":
result = handleCcbsIncallSupplementaryService(dialString);
break;
default:
break;
}
return result;
|
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_RADIO_AVAILABLE: {
mCi.getBasebandVersion(
obtainMessage(EVENT_GET_BASEBAND_VERSION_DONE));
mCi.getIMEI(obtainMessage(EVENT_GET_IMEI_DONE));
mCi.getIMEISV(obtainMessage(EVENT_GET_IMEISV_DONE));
mCi.getRadioCapability(obtainMessage(EVENT_GET_RADIO_CAPABILITY));
}
break;
case EVENT_RADIO_ON:
// do-nothing
break;
case EVENT_REGISTERED_TO_NETWORK:
syncClirSetting();
break;
case EVENT_SIM_RECORDS_LOADED:
updateCurrentCarrierInProvider();
// Check if this is a different SIM than the previous one. If so unset the
// voice mail number.
String imsi = getVmSimImsi();
String imsiFromSIM = getSubscriberId();
if (imsi != null && imsiFromSIM != null && !imsiFromSIM.equals(imsi)) {
storeVoiceMailNumber(null);
setVmSimImsi(null);
}
mSimRecordsLoadedRegistrants.notifyRegistrants();
updateVoiceMail();
break;
case EVENT_GET_BASEBAND_VERSION_DONE:
ar = (AsyncResult)msg.obj;
if (ar.exception != null) {
break;
}
if (LOCAL_DEBUG) Rlog.d(LOG_TAG, "Baseband version: " + ar.result);
TelephonyManager.from(mContext).setBasebandVersionForPhone(getPhoneId(),
(String)ar.result);
break;
case EVENT_GET_IMEI_DONE:
ar = (AsyncResult)msg.obj;
if (ar.exception != null) {
break;
}
mImei = (String)ar.result;
break;
case EVENT_GET_IMEISV_DONE:
ar = (AsyncResult)msg.obj;
if (ar.exception != null) {
break;
}
mImeiSv = (String)ar.result;
break;
case EVENT_USSD:
ar = (AsyncResult)msg.obj;
String[] ussdResult = (String[]) ar.result;
if (ussdResult.length > 1) {
try {
onIncomingUSSD(Integer.parseInt(ussdResult[0]), ussdResult[1]);
} catch (NumberFormatException e) {
Rlog.w(LOG_TAG, "error parsing USSD");
}
}
break;
case EVENT_RADIO_OFF_OR_NOT_AVAILABLE: {
// Some MMI requests (eg USSD) are not completed
// within the course of a CommandsInterface request
// If the radio shuts off or resets while one of these
// is pending, we need to clean up.
for (int i = mPendingMMIs.size() - 1; i >= 0; i--) {
if (mPendingMMIs.get(i).isPendingUSSD()) {
mPendingMMIs.get(i).onUssdFinishedError();
}
}
ImsPhone imsPhone = mImsPhone;
if (imsPhone != null) {
imsPhone.getServiceState().setStateOff();
}
mRadioOffOrNotAvailableRegistrants.notifyRegistrants();
break;
}
case EVENT_SSN:
ar = (AsyncResult)msg.obj;
SuppServiceNotification not = (SuppServiceNotification) ar.result;
mSsnRegistrants.notifyRegistrants(ar);
break;
case EVENT_SET_CALL_FORWARD_DONE:
ar = (AsyncResult)msg.obj;
IccRecords r = mIccRecords.get();
Cfu cfu = (Cfu) ar.userObj;
if (ar.exception == null && r != null) {
r.setVoiceCallForwardingFlag(1, msg.arg1 == 1, cfu.mSetCfNumber);
}
if (cfu.mOnComplete != null) {
AsyncResult.forMessage(cfu.mOnComplete, ar.result, ar.exception);
cfu.mOnComplete.sendToTarget();
}
break;
case EVENT_SET_VM_NUMBER_DONE:
ar = (AsyncResult)msg.obj;
if (IccVmNotSupportedException.class.isInstance(ar.exception)) {
storeVoiceMailNumber(mVmNumber);
ar.exception = null;
}
onComplete = (Message) ar.userObj;
if (onComplete != null) {
AsyncResult.forMessage(onComplete, ar.result, ar.exception);
onComplete.sendToTarget();
}
break;
case EVENT_GET_CALL_FORWARD_DONE:
ar = (AsyncResult)msg.obj;
if (ar.exception == null) {
handleCfuQueryResult((CallForwardInfo[])ar.result);
}
onComplete = (Message) ar.userObj;
if (onComplete != null) {
AsyncResult.forMessage(onComplete, ar.result, ar.exception);
onComplete.sendToTarget();
}
break;
case EVENT_SET_NETWORK_AUTOMATIC:
// Automatic network selection from EF_CSP SIM record
ar = (AsyncResult) msg.obj;
if (mSST.mSS.getIsManualSelection()) {
setNetworkSelectionModeAutomatic((Message) ar.result);
Rlog.d(LOG_TAG, "SET_NETWORK_SELECTION_AUTOMATIC: set to automatic");
} else {
// prevent duplicate request which will push current PLMN to low priority
Rlog.d(LOG_TAG, "SET_NETWORK_SELECTION_AUTOMATIC: already automatic, ignore");
}
break;
case EVENT_ICC_RECORD_EVENTS:
ar = (AsyncResult)msg.obj;
processIccRecordEvents((Integer)ar.result);
break;
case EVENT_SET_CLIR_COMPLETE:
ar = (AsyncResult)msg.obj;
if (ar.exception == null) {
saveClirSetting(msg.arg1);
}
onComplete = (Message) ar.userObj;
if (onComplete != null) {
AsyncResult.forMessage(onComplete, ar.result, ar.exception);
onComplete.sendToTarget();
}
break;
case EVENT_SS:
ar = (AsyncResult)msg.obj;
Rlog.d(LOG_TAG, "Event EVENT_SS received");
// SS data is already being handled through MMI codes.
// So, this result if processed as MMI response would help
// in re-using the existing functionality.
GsmMmiCode mmi = new GsmMmiCode(this, mUiccApplication.get());
mmi.processSsData(ar);
break;
default:
super.handleMessage(msg);
}
|
private boolean | handleMultipartyIncallSupplementaryService(java.lang.String dialString)
if (dialString.length() > 1) {
return false;
}
if (LOCAL_DEBUG) Rlog.d(LOG_TAG, "MmiCode 3: merge calls");
conference();
return true;
|
public boolean | handlePinMmi(java.lang.String dialString)
GsmMmiCode mmi = GsmMmiCode.newFromDialString(dialString, this, mUiccApplication.get());
if (mmi != null && mmi.isPinPukCommand()) {
mPendingMMIs.add(mmi);
mMmiRegistrants.notifyRegistrants(new AsyncResult(null, mmi, null));
mmi.processCode();
return true;
}
return false;
|
protected boolean | isCfEnable(int action)
return (action == CF_ACTION_ENABLE) || (action == CF_ACTION_REGISTRATION);
|
public boolean | isCspPlmnEnabled()
IccRecords r = mIccRecords.get();
return (r != null) ? r.isCspPlmnEnabled() : false;
|
boolean | isInCall()
GsmCall.State foregroundCallState = getForegroundCall().getState();
GsmCall.State backgroundCallState = getBackgroundCall().getState();
GsmCall.State ringingCallState = getRingingCall().getState();
return (foregroundCallState.isAlive() ||
backgroundCallState.isAlive() ||
ringingCallState.isAlive());
|
boolean | isManualNetSelAllowed()
int nwMode = Phone.PREFERRED_NT_MODE;
int subId = getSubId();
nwMode = android.provider.Settings.Global.getInt(mContext.getContentResolver(),
android.provider.Settings.Global.PREFERRED_NETWORK_MODE + subId, nwMode);
Rlog.d(LOG_TAG, "isManualNetSelAllowed in mode = " + nwMode);
/*
* For multimode targets in global mode manual network
* selection is disallowed
*/
if (isManualSelProhibitedInGlobalMode()
&& ((nwMode == Phone.NT_MODE_LTE_CDMA_EVDO_GSM_WCDMA)
|| (nwMode == Phone.NT_MODE_GLOBAL)) ){
Rlog.d(LOG_TAG, "Manual selection not supported in mode = " + nwMode);
return false;
} else {
Rlog.d(LOG_TAG, "Manual selection is supported in mode = " + nwMode);
}
/*
* Single mode phone with - GSM network modes/global mode
* LTE only for 3GPP
* LTE centric + 3GPP Legacy
* Note: the actual enabling/disabling manual selection for these
* cases will be controlled by csp
*/
return true;
|
private boolean | isManualSelProhibitedInGlobalMode()
boolean isProhibited = false;
final String configString = getContext().getResources().getString(com.android.internal.
R.string.prohibit_manual_network_selection_in_gobal_mode);
if (!TextUtils.isEmpty(configString)) {
String[] configArray = configString.split(";");
if (configArray != null &&
((configArray.length == 1 && configArray[0].equalsIgnoreCase("true")) ||
(configArray.length == 2 && !TextUtils.isEmpty(configArray[1]) &&
configArray[0].equalsIgnoreCase("true") &&
configArray[1].equalsIgnoreCase(getGroupIdLevel1())))) {
isProhibited = true;
}
}
Rlog.d(LOG_TAG, "isManualNetSelAllowedInGlobal in current carrier is " + isProhibited);
return isProhibited;
|
private boolean | isValidCommandInterfaceCFAction(int commandInterfaceCFAction)
switch (commandInterfaceCFAction) {
case CF_ACTION_DISABLE:
case CF_ACTION_ENABLE:
case CF_ACTION_REGISTRATION:
case CF_ACTION_ERASURE:
return true;
default:
return false;
}
|
private boolean | isValidCommandInterfaceCFReason(int commandInterfaceCFReason)
switch (commandInterfaceCFReason) {
case CF_REASON_UNCONDITIONAL:
case CF_REASON_BUSY:
case CF_REASON_NO_REPLY:
case CF_REASON_NOT_REACHABLE:
case CF_REASON_ALL:
case CF_REASON_ALL_CONDITIONAL:
return true;
default:
return false;
}
|
protected void | log(java.lang.String s)
Rlog.d(LOG_TAG, "[GSMPhone] " + s);
|
public void | notifyCallForwardingIndicator()
mNotifier.notifyCallForwardingChanged(this);
|
void | notifyDisconnect(com.android.internal.telephony.Connection cn)
mDisconnectRegistrants.notifyResult(cn);
mNotifier.notifyDisconnectCause(cn.getDisconnectCause(), cn.getPreciseDisconnectCause());
|
public void | notifyEcbmTimerReset(java.lang.Boolean flag)
mEcmTimerResetRegistrants.notifyResult(flag);
|
void | notifyLocationChanged()
mNotifier.notifyCellLocation(this);
|
public void | notifyNewRingingConnection(com.android.internal.telephony.Connection c)
super.notifyNewRingingConnectionP(c);
|
void | notifyPhoneStateChanged()Notify any interested party of a Phone state change
{@link com.android.internal.telephony.PhoneConstants.State}
mNotifier.notifyPhoneState(this);
|
void | notifyPreciseCallStateChanged()Notify registrants of a change in the call state. This notifies changes in
{@link com.android.internal.telephony.Call.State}. Use this when changes
in the precise call state are needed, else use notifyPhoneStateChanged.
/* we'd love it if this was package-scoped*/
super.notifyPreciseCallStateChangedP();
|
void | notifyServiceStateChanged(android.telephony.ServiceState ss)
super.notifyServiceStateChangedP(ss);
|
void | notifySuppServiceFailed(SuppService code)
mSuppServiceFailedRegistrants.notifyResult(code);
|
void | notifyUnknownConnection(com.android.internal.telephony.Connection cn)
mUnknownConnectionRegistrants.notifyResult(cn);
|
private void | onIncomingUSSD(int ussdMode, java.lang.String ussdMessage)ussdMode is one of CommandsInterface.USSD_MODE_*
boolean isUssdError;
boolean isUssdRequest;
boolean isUssdRelease;
isUssdRequest
= (ussdMode == CommandsInterface.USSD_MODE_REQUEST);
isUssdError
= (ussdMode != CommandsInterface.USSD_MODE_NOTIFY
&& ussdMode != CommandsInterface.USSD_MODE_REQUEST);
isUssdRelease = (ussdMode == CommandsInterface.USSD_MODE_NW_RELEASE);
// See comments in GsmMmiCode.java
// USSD requests aren't finished until one
// of these two events happen
GsmMmiCode found = null;
for (int i = 0, s = mPendingMMIs.size() ; i < s; i++) {
if(mPendingMMIs.get(i).isPendingUSSD()) {
found = mPendingMMIs.get(i);
break;
}
}
if (found != null) {
// Complete pending USSD
if (isUssdRelease) {
found.onUssdRelease();
} else if (isUssdError) {
found.onUssdFinishedError();
} else {
found.onUssdFinished(ussdMessage, isUssdRequest);
}
} else { // pending USSD not found
// The network may initiate its own USSD request
// ignore everything that isnt a Notify or a Request
// also, discard if there is no message to present
if (!isUssdError && ussdMessage != null) {
GsmMmiCode mmi;
mmi = GsmMmiCode.newNetworkInitiatedUssd(ussdMessage,
isUssdRequest,
GSMPhone.this,
mUiccApplication.get());
onNetworkInitiatedUssd(mmi);
}
}
|
void | onMMIDone(GsmMmiCode mmi)Removes the given MMI from the pending list and notifies
registrants that it is complete.
/* Only notify complete if it's on the pending list.
* Otherwise, it's already been handled (eg, previously canceled).
* The exception is cancellation of an incoming USSD-REQUEST, which is
* not on the list.
*/
if (mPendingMMIs.remove(mmi) || mmi.isUssdRequest() || mmi.isSsInfo()) {
mMmiCompleteRegistrants.notifyRegistrants(
new AsyncResult(null, mmi, null));
}
|
private void | onNetworkInitiatedUssd(GsmMmiCode mmi)
mMmiCompleteRegistrants.notifyRegistrants(
new AsyncResult(null, mmi, null));
|
protected void | onUpdateIccAvailability()
if (mUiccController == null ) {
return;
}
UiccCardApplication newUiccApplication =
mUiccController.getUiccCardApplication(mPhoneId, UiccController.APP_FAM_IMS);
IsimUiccRecords newIsimUiccRecords = null;
if (newUiccApplication != null) {
newIsimUiccRecords = (IsimUiccRecords)newUiccApplication.getIccRecords();
if (LOCAL_DEBUG) log("New ISIM application found");
}
mIsimUiccRecords = newIsimUiccRecords;
newUiccApplication = getUiccCardApplication();
UiccCardApplication app = mUiccApplication.get();
if (app != newUiccApplication) {
if (app != null) {
if (LOCAL_DEBUG) log("Removing stale icc objects.");
if (mIccRecords.get() != null) {
unregisterForSimRecordEvents();
mSimPhoneBookIntManager.updateIccRecords(null);
}
mIccRecords.set(null);
mUiccApplication.set(null);
}
if (newUiccApplication != null) {
if (LOCAL_DEBUG) log("New Uicc application found");
mUiccApplication.set(newUiccApplication);
mIccRecords.set(newUiccApplication.getIccRecords());
registerForSimRecordEvents();
mSimPhoneBookIntManager.updateIccRecords(mIccRecords.get());
}
}
|
private void | processIccRecordEvents(int eventCode)
switch (eventCode) {
case IccRecords.EVENT_CFI:
notifyCallForwardingIndicator();
break;
}
|
public void | registerForAllDataDisconnected(android.os.Handler h, int what, java.lang.Object obj)
((DcTracker)mDcTracker)
.registerForAllDataDisconnected(h, what, obj);
|
public void | registerForEcmTimerReset(android.os.Handler h, int what, java.lang.Object obj)Registration point for Ecm timer reset
mEcmTimerResetRegistrants.addUnique(h, what, obj);
|
private void | registerForSimRecordEvents()
IccRecords r = mIccRecords.get();
if (r == null) {
return;
}
r.registerForNetworkSelectionModeAutomatic(
this, EVENT_SET_NETWORK_AUTOMATIC, null);
r.registerForRecordsEvents(this, EVENT_ICC_RECORD_EVENTS, null);
r.registerForRecordsLoaded(this, EVENT_SIM_RECORDS_LOADED, null);
|
public void | registerForSimRecordsLoaded(android.os.Handler h, int what, java.lang.Object obj)
mSimRecordsLoadedRegistrants.addUnique(h, what, obj);
|
public void | registerForSuppServiceNotification(android.os.Handler h, int what, java.lang.Object obj)
mSsnRegistrants.addUnique(h, what, obj);
if (mSsnRegistrants.size() == 1) mCi.setSuppServiceNotifications(true, null);
|
public void | rejectCall()
mCT.rejectCall();
|
public void | removeReferences()
Rlog.d(LOG_TAG, "removeReferences");
mSimulatedRadioControl = null;
mSimPhoneBookIntManager = null;
mSubInfo = null;
mCT = null;
mSST = null;
super.removeReferences();
|
public void | saveClirSetting(int commandInterfaceCLIRMode)Saves CLIR setting so that we can re-apply it as necessary
(in case the RIL resets it across reboots).
// open the shared preferences editor, and write the value.
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(getContext());
SharedPreferences.Editor editor = sp.edit();
editor.putInt(CLIR_KEY + getPhoneId(), commandInterfaceCLIRMode);
// commit and log the result.
if (! editor.commit()) {
Rlog.e(LOG_TAG, "failed to commit CLIR preference");
}
|
public void | sendBurstDtmf(java.lang.String dtmfString)
Rlog.e(LOG_TAG, "[GSMPhone] sendBurstDtmf() is a CDMA method");
|
public void | sendDtmf(char c)
if (!PhoneNumberUtils.is12Key(c)) {
Rlog.e(LOG_TAG,
"sendDtmf called with invalid character '" + c + "'");
} else {
if (mCT.mState == PhoneConstants.State.OFFHOOK) {
mCi.sendDtmf(c, null);
}
}
|
public void | sendUssdResponse(java.lang.String ussdMessge)
GsmMmiCode mmi = GsmMmiCode.newFromUssdUserInput(ussdMessge, this, mUiccApplication.get());
mPendingMMIs.add(mmi);
mMmiRegistrants.notifyRegistrants(new AsyncResult(null, mmi, null));
mmi.sendUssd(ussdMessge);
|
public void | setCallForwardingOption(int commandInterfaceCFAction, int commandInterfaceCFReason, java.lang.String dialingNumber, int timerSeconds, android.os.Message onComplete)
ImsPhone imsPhone = mImsPhone;
if ((imsPhone != null)
&& (imsPhone.getServiceState().getState() == ServiceState.STATE_IN_SERVICE)) {
imsPhone.setCallForwardingOption(commandInterfaceCFAction,
commandInterfaceCFReason, dialingNumber, timerSeconds, onComplete);
return;
}
if ( (isValidCommandInterfaceCFAction(commandInterfaceCFAction)) &&
(isValidCommandInterfaceCFReason(commandInterfaceCFReason))) {
Message resp;
if (commandInterfaceCFReason == CF_REASON_UNCONDITIONAL) {
Cfu cfu = new Cfu(dialingNumber, onComplete);
resp = obtainMessage(EVENT_SET_CALL_FORWARD_DONE,
isCfEnable(commandInterfaceCFAction) ? 1 : 0, 0, cfu);
} else {
resp = onComplete;
}
mCi.setCallForward(commandInterfaceCFAction,
commandInterfaceCFReason,
CommandsInterface.SERVICE_CLASS_VOICE,
dialingNumber,
timerSeconds,
resp);
}
|
public void | setCallWaiting(boolean enable, android.os.Message onComplete)
ImsPhone imsPhone = mImsPhone;
if ((imsPhone != null)
&& (imsPhone.getServiceState().getState() == ServiceState.STATE_IN_SERVICE)) {
imsPhone.setCallWaiting(enable, onComplete);
return;
}
mCi.setCallWaiting(enable, CommandsInterface.SERVICE_CLASS_VOICE, onComplete);
|
public void | setCellBroadcastSmsConfig(int[] configValuesArray, android.os.Message response)Configure cdma cell broadcast SMS.
Rlog.e(LOG_TAG, "[GSMPhone] setCellBroadcastSmsConfig() is obsolete; use SmsManager");
response.sendToTarget();
|
public void | setDataEnabled(boolean enable)
mDcTracker.setDataEnabled(enable);
|
public void | setDataRoamingEnabled(boolean enable)
mDcTracker.setDataOnRoamingEnabled(enable);
|
public void | setInternalDataEnabled(boolean enable, android.os.Message onCompleteMsg)
((DcTracker)mDcTracker)
.setInternalDataEnabled(enable, onCompleteMsg);
|
public boolean | setInternalDataEnabledFlag(boolean enable)
return ((DcTracker)mDcTracker)
.setInternalDataEnabledFlag(enable);
|
public boolean | setLine1Number(java.lang.String alphaTag, java.lang.String number, android.os.Message onComplete)
IccRecords r = mIccRecords.get();
if (r != null) {
r.setMsisdnNumber(alphaTag, number, onComplete);
return true;
} else {
return false;
}
|
public void | setMute(boolean muted)
mCT.setMute(muted);
|
public void | setOnPostDialCharacter(android.os.Handler h, int what, java.lang.Object obj)
mPostDialHandler = new Registrant(h, what, obj);
|
public boolean | setOperatorBrandOverride(java.lang.String brand)
if (mUiccController == null) {
return false;
}
UiccCard card = mUiccController.getUiccCard(getPhoneId());
if (card == null) {
return false;
}
boolean status = card.setOperatorBrandOverride(brand);
// Refresh.
if (status) {
IccRecords iccRecords = mIccRecords.get();
if (iccRecords != null) {
TelephonyManager.from(mContext).setSimOperatorNameForPhone(
getPhoneId(), iccRecords.getServiceProviderName());
}
if (mSST != null) {
mSST.pollState();
}
}
return status;
|
public void | setOutgoingCallerIdDisplay(int commandInterfaceCLIRMode, android.os.Message onComplete)
mCi.setCLIR(commandInterfaceCLIRMode,
obtainMessage(EVENT_SET_CLIR_COMPLETE, commandInterfaceCLIRMode, 0, onComplete));
|
protected void | setProperties()
TelephonyManager.from(mContext).setPhoneType(getPhoneId(), PhoneConstants.PHONE_TYPE_GSM);
|
public void | setRadioPower(boolean power)
mSST.setRadioPower(power);
|
public void | setSystemProperty(java.lang.String property, java.lang.String value){@inheritDoc}
TelephonyManager.setTelephonyProperty(mPhoneId, property, value);
|
public void | setUiTTYMode(int uiTtyMode, android.os.Message onComplete)
if (mImsPhone != null) {
mImsPhone.setUiTTYMode(uiTtyMode, onComplete);
}
|
private void | setVmSimImsi(java.lang.String imsi)
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(getContext());
SharedPreferences.Editor editor = sp.edit();
editor.putString(VM_SIM_IMSI + getPhoneId(), imsi);
editor.apply();
|
public void | setVoiceMailNumber(java.lang.String alphaTag, java.lang.String voiceMailNumber, android.os.Message onComplete)
Message resp;
mVmNumber = voiceMailNumber;
resp = obtainMessage(EVENT_SET_VM_NUMBER_DONE, 0, 0, onComplete);
IccRecords r = mIccRecords.get();
if (r != null) {
r.setVoiceMailNumber(alphaTag, mVmNumber, resp);
}
|
public void | setVoiceMessageWaiting(int line, int countWaiting)Sets the SIM voice message waiting indicator records.
IccRecords r = mIccRecords.get();
if (r != null) {
r.setVoiceMessageWaiting(line, countWaiting);
} else {
log("SIM Records not found, MWI not updated");
}
|
public void | startDtmf(char c)
if (!PhoneNumberUtils.is12Key(c)) {
Rlog.e(LOG_TAG,
"startDtmf called with invalid character '" + c + "'");
} else {
mCi.startDtmf(c, null);
}
|
public void | stopDtmf()
mCi.stopDtmf(null);
|
private void | storeVoiceMailNumber(java.lang.String number)
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(getContext());
SharedPreferences.Editor editor = sp.edit();
editor.putString(VM_NUMBER + getPhoneId(), number);
editor.apply();
setVmSimImsi(getSubscriberId());
|
public void | switchHoldingAndActive()
mCT.switchWaitingOrHoldingAndActive();
|
protected void | syncClirSetting()Make sure the network knows our preferred setting.
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(getContext());
int clirSetting = sp.getInt(CLIR_KEY + getPhoneId(), -1);
if (clirSetting >= 0) {
mCi.setCLIR(clirSetting, null);
}
|
public void | unregisterForAllDataDisconnected(android.os.Handler h)
((DcTracker)mDcTracker).unregisterForAllDataDisconnected(h);
|
public void | unregisterForEcmTimerReset(android.os.Handler h)
mEcmTimerResetRegistrants.remove(h);
|
private void | unregisterForSimRecordEvents()
IccRecords r = mIccRecords.get();
if (r == null) {
return;
}
r.unregisterForNetworkSelectionModeAutomatic(this);
r.unregisterForRecordsEvents(this);
r.unregisterForRecordsLoaded(this);
|
public void | unregisterForSimRecordsLoaded(android.os.Handler h)
mSimRecordsLoadedRegistrants.remove(h);
|
public void | unregisterForSuppServiceNotification(android.os.Handler h)
mSsnRegistrants.remove(h);
if (mSsnRegistrants.size() == 0) mCi.setSuppServiceNotifications(false, null);
|
public boolean | updateCurrentCarrierInProvider()Sets the "current" field in the telephony provider according to the SIM's operator
long currentDds = SubscriptionManager.getDefaultDataSubId();
String operatorNumeric = getOperatorNumeric();
log("updateCurrentCarrierInProvider: mSubId = " + 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();
|
public void | updateServiceLocation()
mSST.enableSingleLocationUpdate();
|
private void | updateVoiceMail()
int countVoiceMessages = 0;
IccRecords r = mIccRecords.get();
if (r != null) {
// get voice mail count from SIM
countVoiceMessages = r.getVoiceMessageCount();
}
int countVoiceMessagesStored = getStoredVoiceMessageCount();
if (countVoiceMessages == -1 && countVoiceMessagesStored != 0) {
countVoiceMessages = countVoiceMessagesStored;
}
Rlog.d(LOG_TAG, "updateVoiceMail countVoiceMessages = " + countVoiceMessages
+" subId "+getSubId());
setVoiceMessageCount(countVoiceMessages);
|