Loading src/java/com/android/internal/telephony/CallManager.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -1493,6 +1493,7 @@ public class CallManager { * <code>obj.result</code> will be an "MmiCode" object * <code>obj.result</code> will be an "MmiCode" object */ */ public void registerForMmiComplete(Handler h, int what, Object obj){ public void registerForMmiComplete(Handler h, int what, Object obj){ Rlog.d(LOG_TAG, "registerForMmiComplete"); mMmiCompleteRegistrants.addUnique(h, what, obj); mMmiCompleteRegistrants.addUnique(h, what, obj); } } Loading Loading @@ -2317,7 +2318,7 @@ public class CallManager { mMmiInitiateRegistrants.notifyRegistrants((AsyncResult) msg.obj); mMmiInitiateRegistrants.notifyRegistrants((AsyncResult) msg.obj); break; break; case EVENT_MMI_COMPLETE: case EVENT_MMI_COMPLETE: if (VDBG) Rlog.d(LOG_TAG, " handleMessage (EVENT_MMI_COMPLETE)"); Rlog.d(LOG_TAG, "CallManager: handleMessage (EVENT_MMI_COMPLETE)"); mMmiCompleteRegistrants.notifyRegistrants((AsyncResult) msg.obj); mMmiCompleteRegistrants.notifyRegistrants((AsyncResult) msg.obj); break; break; case EVENT_ECM_TIMER_RESET: case EVENT_ECM_TIMER_RESET: Loading src/java/com/android/internal/telephony/GsmCdmaPhone.java +1 −0 Original line number Original line Diff line number Diff line Loading @@ -1962,6 +1962,7 @@ public class GsmCdmaPhone extends Phone { } } private void onNetworkInitiatedUssd(MmiCode mmi) { private void onNetworkInitiatedUssd(MmiCode mmi) { Rlog.v(LOG_TAG, "onNetworkInitiatedUssd: mmi=" + mmi); mMmiCompleteRegistrants.notifyRegistrants( mMmiCompleteRegistrants.notifyRegistrants( new AsyncResult(null, mmi, null)); new AsyncResult(null, mmi, null)); } } Loading src/java/com/android/internal/telephony/gsm/GsmMmiCode.java +16 −9 Original line number Original line Diff line number Diff line Loading @@ -791,14 +791,14 @@ public final class GsmMmiCode extends Handler implements MmiCode { processCode() throws CallStateException { processCode() throws CallStateException { try { try { if (isShortCode()) { if (isShortCode()) { Rlog.d(LOG_TAG, "isShortCode"); Rlog.d(LOG_TAG, "processCode: isShortCode"); // These just get treated as USSD. // These just get treated as USSD. sendUssd(mDialingNumber); sendUssd(mDialingNumber); } else if (mDialingNumber != null) { } else if (mDialingNumber != null) { // We should have no dialing numbers here // We should have no dialing numbers here throw new RuntimeException ("Invalid or Unsupported MMI Code"); throw new RuntimeException ("Invalid or Unsupported MMI Code"); } else if (mSc != null && mSc.equals(SC_CLIP)) { } else if (mSc != null && mSc.equals(SC_CLIP)) { Rlog.d(LOG_TAG, "is CLIP"); Rlog.d(LOG_TAG, "processCode: is CLIP"); if (isInterrogate()) { if (isInterrogate()) { mPhone.mCi.queryCLIP( mPhone.mCi.queryCLIP( obtainMessage(EVENT_QUERY_COMPLETE, this)); obtainMessage(EVENT_QUERY_COMPLETE, this)); Loading @@ -806,7 +806,7 @@ public final class GsmMmiCode extends Handler implements MmiCode { throw new RuntimeException ("Invalid or Unsupported MMI Code"); throw new RuntimeException ("Invalid or Unsupported MMI Code"); } } } else if (mSc != null && mSc.equals(SC_CLIR)) { } else if (mSc != null && mSc.equals(SC_CLIR)) { Rlog.d(LOG_TAG, "is CLIR"); Rlog.d(LOG_TAG, "processCode: is CLIR"); if (isActivate()) { if (isActivate()) { mPhone.mCi.setCLIR(CommandsInterface.CLIR_INVOCATION, mPhone.mCi.setCLIR(CommandsInterface.CLIR_INVOCATION, obtainMessage(EVENT_SET_COMPLETE, this)); obtainMessage(EVENT_SET_COMPLETE, this)); Loading @@ -820,7 +820,7 @@ public final class GsmMmiCode extends Handler implements MmiCode { throw new RuntimeException ("Invalid or Unsupported MMI Code"); throw new RuntimeException ("Invalid or Unsupported MMI Code"); } } } else if (isServiceCodeCallForwarding(mSc)) { } else if (isServiceCodeCallForwarding(mSc)) { Rlog.d(LOG_TAG, "is CF"); Rlog.d(LOG_TAG, "processCode: is CF"); String dialingNumber = mSia; String dialingNumber = mSia; int serviceClass = siToServiceClass(mSib); int serviceClass = siToServiceClass(mSib); Loading Loading @@ -866,7 +866,7 @@ public final class GsmMmiCode extends Handler implements MmiCode { ((cfAction == CommandsInterface.CF_ACTION_ENABLE) || ((cfAction == CommandsInterface.CF_ACTION_ENABLE) || (cfAction == CommandsInterface.CF_ACTION_REGISTRATION)) ? 1 : 0; (cfAction == CommandsInterface.CF_ACTION_REGISTRATION)) ? 1 : 0; Rlog.d(LOG_TAG, "is CF setCallForward"); Rlog.d(LOG_TAG, "processCode: is CF setCallForward"); mPhone.mCi.setCallForward(cfAction, reason, serviceClass, mPhone.mCi.setCallForward(cfAction, reason, serviceClass, dialingNumber, time, obtainMessage( dialingNumber, time, obtainMessage( EVENT_SET_CFF_COMPLETE, EVENT_SET_CFF_COMPLETE, Loading Loading @@ -957,7 +957,8 @@ public final class GsmMmiCode extends Handler implements MmiCode { // Sim is puk-locked // Sim is puk-locked handlePasswordError(com.android.internal.R.string.needPuk); handlePasswordError(com.android.internal.R.string.needPuk); } else if (mUiccApplication != null) { } else if (mUiccApplication != null) { Rlog.d(LOG_TAG, "process mmi service code using UiccApp sc=" + mSc); Rlog.d(LOG_TAG, "processCode: process mmi service code using UiccApp sc=" + mSc); // We have an app and the pre-checks are OK // We have an app and the pre-checks are OK if (mSc.equals(SC_PIN)) { if (mSc.equals(SC_PIN)) { Loading @@ -984,11 +985,13 @@ public final class GsmMmiCode extends Handler implements MmiCode { } else if (mPoundString != null) { } else if (mPoundString != null) { sendUssd(mPoundString); sendUssd(mPoundString); } else { } else { Rlog.d(LOG_TAG, "processCode: Invalid or Unsupported MMI Code"); throw new RuntimeException ("Invalid or Unsupported MMI Code"); throw new RuntimeException ("Invalid or Unsupported MMI Code"); } } } catch (RuntimeException exc) { } catch (RuntimeException exc) { mState = State.FAILED; mState = State.FAILED; mMessage = mContext.getText(com.android.internal.R.string.mmiError); mMessage = mContext.getText(com.android.internal.R.string.mmiError); Rlog.d(LOG_TAG, "processCode: RuntimeException=" + exc); mPhone.onMMIDone(this); mPhone.onMMIDone(this); } } } } Loading Loading @@ -1024,7 +1027,7 @@ public final class GsmMmiCode extends Handler implements MmiCode { if (!isUssdRequest) { if (!isUssdRequest) { mState = State.COMPLETE; mState = State.COMPLETE; } } Rlog.d(LOG_TAG, "onUssdFinished: ussdMessage=" + ussdMessage); mPhone.onMMIDone(this); mPhone.onMMIDone(this); } } } } Loading @@ -1040,7 +1043,7 @@ public final class GsmMmiCode extends Handler implements MmiCode { if (mState == State.PENDING) { if (mState == State.PENDING) { mState = State.FAILED; mState = State.FAILED; mMessage = mContext.getText(com.android.internal.R.string.mmiError); mMessage = mContext.getText(com.android.internal.R.string.mmiError); Rlog.d(LOG_TAG, "onUssdFinishedError"); mPhone.onMMIDone(this); mPhone.onMMIDone(this); } } } } Loading @@ -1059,7 +1062,7 @@ public final class GsmMmiCode extends Handler implements MmiCode { if (mState == State.PENDING) { if (mState == State.PENDING) { mState = State.COMPLETE; mState = State.COMPLETE; mMessage = null; mMessage = null; Rlog.d(LOG_TAG, "onUssdRelease"); mPhone.onMMIDone(this); mPhone.onMMIDone(this); } } } } Loading Loading @@ -1301,6 +1304,7 @@ public final class GsmMmiCode extends Handler implements MmiCode { } } mMessage = sb; mMessage = sb; Rlog.d(LOG_TAG, "onSetComplete mmi=" + this); mPhone.onMMIDone(this); mPhone.onMMIDone(this); } } Loading Loading @@ -1382,6 +1386,7 @@ public final class GsmMmiCode extends Handler implements MmiCode { } } mMessage = sb; mMessage = sb; Rlog.d(LOG_TAG, "onGetClirComplete: mmi=" + this); mPhone.onMMIDone(this); mPhone.onMMIDone(this); } } Loading Loading @@ -1534,6 +1539,7 @@ public final class GsmMmiCode extends Handler implements MmiCode { } } mMessage = sb; mMessage = sb; Rlog.d(LOG_TAG, "onQueryCfComplete: mmi=" + this); mPhone.onMMIDone(this); mPhone.onMMIDone(this); } } Loading Loading @@ -1571,6 +1577,7 @@ public final class GsmMmiCode extends Handler implements MmiCode { } } mMessage = sb; mMessage = sb; Rlog.d(LOG_TAG, "onQueryComplete: mmi=" + this); mPhone.onMMIDone(this); mPhone.onMMIDone(this); } } Loading src/java/com/android/internal/telephony/imsphone/ImsPhone.java +2 −0 Original line number Original line Diff line number Diff line Loading @@ -1099,6 +1099,7 @@ public class ImsPhone extends ImsPhoneBase { * The exception is cancellation of an incoming USSD-REQUEST, which is * The exception is cancellation of an incoming USSD-REQUEST, which is * not on the list. * not on the list. */ */ Rlog.d(LOG_TAG, "onMMIDone: mmi=" + mmi); if (mPendingMMIs.remove(mmi) || mmi.isUssdRequest()) { if (mPendingMMIs.remove(mmi) || mmi.isUssdRequest()) { ResultReceiver receiverCallback = mmi.getUssdCallbackReceiver(); ResultReceiver receiverCallback = mmi.getUssdCallbackReceiver(); if (receiverCallback != null) { if (receiverCallback != null) { Loading @@ -1107,6 +1108,7 @@ public class ImsPhone extends ImsPhoneBase { sendUssdResponse(mmi.getDialString(), mmi.getMessage(), returnCode, sendUssdResponse(mmi.getDialString(), mmi.getMessage(), returnCode, receiverCallback ); receiverCallback ); } else { } else { Rlog.v(LOG_TAG, "onMMIDone: notifyRegistrants"); mMmiCompleteRegistrants.notifyRegistrants( mMmiCompleteRegistrants.notifyRegistrants( new AsyncResult(null, mmi, null)); new AsyncResult(null, mmi, null)); } } Loading src/java/com/android/internal/telephony/imsphone/ImsPhoneMmiCode.java +34 −25 Original line number Original line Diff line number Diff line Loading @@ -756,14 +756,14 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { processCode () throws CallStateException { processCode () throws CallStateException { try { try { if (isShortCode()) { if (isShortCode()) { Rlog.d(LOG_TAG, "isShortCode"); Rlog.d(LOG_TAG, "processCode: isShortCode"); // These just get treated as USSD. // These just get treated as USSD. Rlog.d(LOG_TAG, "Sending short code '" Rlog.d(LOG_TAG, "processCode: Sending short code '" + mDialingNumber + "' over CS pipe."); + mDialingNumber + "' over CS pipe."); throw new CallStateException(Phone.CS_FALLBACK); throw new CallStateException(Phone.CS_FALLBACK); } else if (isServiceCodeCallForwarding(mSc)) { } else if (isServiceCodeCallForwarding(mSc)) { Rlog.d(LOG_TAG, "is CF"); Rlog.d(LOG_TAG, "processCode: is CF"); String dialingNumber = mSia; String dialingNumber = mSia; int reason = scToCallForwardReason(mSc); int reason = scToCallForwardReason(mSc); Loading Loading @@ -806,7 +806,7 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { ((cfAction == CommandsInterface.CF_ACTION_ENABLE) || ((cfAction == CommandsInterface.CF_ACTION_ENABLE) || (cfAction == CommandsInterface.CF_ACTION_REGISTRATION)) ? 1 : 0; (cfAction == CommandsInterface.CF_ACTION_REGISTRATION)) ? 1 : 0; Rlog.d(LOG_TAG, "is CF setCallForward"); Rlog.d(LOG_TAG, "processCode: is CF setCallForward"); mPhone.setCallForwardingOption(cfAction, reason, mPhone.setCallForwardingOption(cfAction, reason, dialingNumber, serviceClass, time, obtainMessage( dialingNumber, serviceClass, time, obtainMessage( EVENT_SET_CFF_COMPLETE, EVENT_SET_CFF_COMPLETE, Loading Loading @@ -839,21 +839,21 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { mPhone.mCT.getUtInterface().updateCLIR(CommandsInterface.CLIR_INVOCATION, mPhone.mCT.getUtInterface().updateCLIR(CommandsInterface.CLIR_INVOCATION, obtainMessage(EVENT_SET_COMPLETE, this)); obtainMessage(EVENT_SET_COMPLETE, this)); } catch (ImsException e) { } catch (ImsException e) { Rlog.d(LOG_TAG, "Could not get UT handle for updateCLIR."); Rlog.d(LOG_TAG, "processCode: Could not get UT handle for updateCLIR."); } } } else if (isDeactivate()) { } else if (isDeactivate()) { try { try { mPhone.mCT.getUtInterface().updateCLIR(CommandsInterface.CLIR_SUPPRESSION, mPhone.mCT.getUtInterface().updateCLIR(CommandsInterface.CLIR_SUPPRESSION, obtainMessage(EVENT_SET_COMPLETE, this)); obtainMessage(EVENT_SET_COMPLETE, this)); } catch (ImsException e) { } catch (ImsException e) { Rlog.d(LOG_TAG, "Could not get UT handle for updateCLIR."); Rlog.d(LOG_TAG, "processCode: Could not get UT handle for updateCLIR."); } } } else if (isInterrogate()) { } else if (isInterrogate()) { try { try { mPhone.mCT.getUtInterface() mPhone.mCT.getUtInterface() .queryCLIR(obtainMessage(EVENT_GET_CLIR_COMPLETE, this)); .queryCLIR(obtainMessage(EVENT_GET_CLIR_COMPLETE, this)); } catch (ImsException e) { } catch (ImsException e) { Rlog.d(LOG_TAG, "Could not get UT handle for queryCLIR."); Rlog.d(LOG_TAG, "processCode: Could not get UT handle for queryCLIR."); } } } else { } else { throw new RuntimeException ("Invalid or Unsupported MMI Code"); throw new RuntimeException ("Invalid or Unsupported MMI Code"); Loading @@ -865,14 +865,14 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { mPhone.mCT.getUtInterface() mPhone.mCT.getUtInterface() .queryCLIP(obtainMessage(EVENT_SUPP_SVC_QUERY_COMPLETE, this)); .queryCLIP(obtainMessage(EVENT_SUPP_SVC_QUERY_COMPLETE, this)); } catch (ImsException e) { } catch (ImsException e) { Rlog.d(LOG_TAG, "Could not get UT handle for queryCLIP."); Rlog.d(LOG_TAG, "processCode: Could not get UT handle for queryCLIP."); } } } else if (isActivate() || isDeactivate()) { } else if (isActivate() || isDeactivate()) { try { try { mPhone.mCT.getUtInterface().updateCLIP(isActivate(), mPhone.mCT.getUtInterface().updateCLIP(isActivate(), obtainMessage(EVENT_SET_COMPLETE, this)); obtainMessage(EVENT_SET_COMPLETE, this)); } catch (ImsException e) { } catch (ImsException e) { Rlog.d(LOG_TAG, "Could not get UT handle for updateCLIP."); Rlog.d(LOG_TAG, "processCode: Could not get UT handle for updateCLIP."); } } } else { } else { throw new RuntimeException ("Invalid or Unsupported MMI Code"); throw new RuntimeException ("Invalid or Unsupported MMI Code"); Loading @@ -884,14 +884,14 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { mPhone.mCT.getUtInterface() mPhone.mCT.getUtInterface() .queryCOLP(obtainMessage(EVENT_SUPP_SVC_QUERY_COMPLETE, this)); .queryCOLP(obtainMessage(EVENT_SUPP_SVC_QUERY_COMPLETE, this)); } catch (ImsException e) { } catch (ImsException e) { Rlog.d(LOG_TAG, "Could not get UT handle for queryCOLP."); Rlog.d(LOG_TAG, "processCode: Could not get UT handle for queryCOLP."); } } } else if (isActivate() || isDeactivate()) { } else if (isActivate() || isDeactivate()) { try { try { mPhone.mCT.getUtInterface().updateCOLP(isActivate(), mPhone.mCT.getUtInterface().updateCOLP(isActivate(), obtainMessage(EVENT_SET_COMPLETE, this)); obtainMessage(EVENT_SET_COMPLETE, this)); } catch (ImsException e) { } catch (ImsException e) { Rlog.d(LOG_TAG, "Could not get UT handle for updateCOLP."); Rlog.d(LOG_TAG, "processCode: Could not get UT handle for updateCOLP."); } } } else { } else { throw new RuntimeException ("Invalid or Unsupported MMI Code"); throw new RuntimeException ("Invalid or Unsupported MMI Code"); Loading @@ -903,21 +903,21 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { mPhone.mCT.getUtInterface().updateCOLR(NUM_PRESENTATION_RESTRICTED, mPhone.mCT.getUtInterface().updateCOLR(NUM_PRESENTATION_RESTRICTED, obtainMessage(EVENT_SET_COMPLETE, this)); obtainMessage(EVENT_SET_COMPLETE, this)); } catch (ImsException e) { } catch (ImsException e) { Rlog.d(LOG_TAG, "Could not get UT handle for updateCOLR."); Rlog.d(LOG_TAG, "processCode: Could not get UT handle for updateCOLR."); } } } else if (isDeactivate()) { } else if (isDeactivate()) { try { try { mPhone.mCT.getUtInterface().updateCOLR(NUM_PRESENTATION_ALLOWED, mPhone.mCT.getUtInterface().updateCOLR(NUM_PRESENTATION_ALLOWED, obtainMessage(EVENT_SET_COMPLETE, this)); obtainMessage(EVENT_SET_COMPLETE, this)); } catch (ImsException e) { } catch (ImsException e) { Rlog.d(LOG_TAG, "Could not get UT handle for updateCOLR."); Rlog.d(LOG_TAG, "processCode: Could not get UT handle for updateCOLR."); } } } else if (isInterrogate()) { } else if (isInterrogate()) { try { try { mPhone.mCT.getUtInterface() mPhone.mCT.getUtInterface() .queryCOLR(obtainMessage(EVENT_SUPP_SVC_QUERY_COMPLETE, this)); .queryCOLR(obtainMessage(EVENT_SUPP_SVC_QUERY_COMPLETE, this)); } catch (ImsException e) { } catch (ImsException e) { Rlog.d(LOG_TAG, "Could not get UT handle for queryCOLR."); Rlog.d(LOG_TAG, "processCode: Could not get UT handle for queryCOLR."); } } } else { } else { throw new RuntimeException ("Invalid or Unsupported MMI Code"); throw new RuntimeException ("Invalid or Unsupported MMI Code"); Loading @@ -933,7 +933,7 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { } } // TODO: isRegister() case needs to be handled. // TODO: isRegister() case needs to be handled. } catch (ImsException e) { } catch (ImsException e) { Rlog.d(LOG_TAG, "Could not get UT handle for ICB."); Rlog.d(LOG_TAG, "processCode: Could not get UT handle for ICB."); } } } else if (mSc != null && mSc.equals(SC_BAICa)) { } else if (mSc != null && mSc.equals(SC_BAICa)) { int callAction =0; int callAction =0; Loading @@ -956,7 +956,7 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { null); null); } } } catch (ImsException e) { } catch (ImsException e) { Rlog.d(LOG_TAG, "Could not get UT handle for ICBa."); Rlog.d(LOG_TAG, "processCode: Could not get UT handle for ICBa."); } } } else if (mSc != null && mSc.equals(SC_WAIT)) { } else if (mSc != null && mSc.equals(SC_WAIT)) { // sia = basic service group // sia = basic service group Loading @@ -971,15 +971,17 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { throw new RuntimeException ("Invalid or Unsupported MMI Code"); throw new RuntimeException ("Invalid or Unsupported MMI Code"); } } } else if (mPoundString != null) { } else if (mPoundString != null) { Rlog.d(LOG_TAG, "Sending pound string '" Rlog.d(LOG_TAG, "processCode: Sending pound string '" + mDialingNumber + "' over CS pipe."); + mDialingNumber + "' over CS pipe."); throw new CallStateException(Phone.CS_FALLBACK); throw new CallStateException(Phone.CS_FALLBACK); } else { } else { Rlog.d(LOG_TAG, "processCode: invalid or unsupported MMI"); throw new RuntimeException ("Invalid or Unsupported MMI Code"); throw new RuntimeException ("Invalid or Unsupported MMI Code"); } } } catch (RuntimeException exc) { } catch (RuntimeException exc) { mState = State.FAILED; mState = State.FAILED; mMessage = mContext.getText(com.android.internal.R.string.mmiError); mMessage = mContext.getText(com.android.internal.R.string.mmiError); Rlog.d(LOG_TAG, "processCode: RuntimeException = " + exc); mPhone.onMMIDone(this); mPhone.onMMIDone(this); } } } } Loading @@ -998,7 +1000,9 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { if (mState == State.PENDING) { if (mState == State.PENDING) { if (ussdMessage == null) { if (ussdMessage == null) { mMessage = mContext.getText(com.android.internal.R.string.mmiComplete); mMessage = mContext.getText(com.android.internal.R.string.mmiComplete); Rlog.v(LOG_TAG, "onUssdFinished: no message; using: " + mMessage); } else { } else { Rlog.v(LOG_TAG, "onUssdFinished: message: " + ussdMessage); mMessage = ussdMessage; mMessage = ussdMessage; } } mIsUssdRequest = isUssdRequest; mIsUssdRequest = isUssdRequest; Loading @@ -1006,7 +1010,6 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { if (!isUssdRequest) { if (!isUssdRequest) { mState = State.COMPLETE; mState = State.COMPLETE; } } mPhone.onMMIDone(this); mPhone.onMMIDone(this); } } } } Loading @@ -1022,7 +1025,7 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { if (mState == State.PENDING) { if (mState == State.PENDING) { mState = State.FAILED; mState = State.FAILED; mMessage = mContext.getText(com.android.internal.R.string.mmiError); mMessage = mContext.getText(com.android.internal.R.string.mmiError); Rlog.d(LOG_TAG, "onUssdFinishedError: mmi=" + this); mPhone.onMMIDone(this); mPhone.onMMIDone(this); } } } } Loading Loading @@ -1140,7 +1143,7 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { obtainMessage(EVENT_SET_COMPLETE,this), obtainMessage(EVENT_SET_COMPLETE,this), icbNum); icbNum); } catch (ImsException e) { } catch (ImsException e) { Rlog.d(LOG_TAG, "Could not get UT handle for updating ICB."); Rlog.d(LOG_TAG, "processIcbMmiCodeForUpdate:Could not get UT handle for updating ICB."); } } } } Loading Loading @@ -1230,6 +1233,7 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { } } mMessage = sb; mMessage = sb; Rlog.d(LOG_TAG, "onSetComplete: mmi=" + this); mPhone.onMMIDone(this); mPhone.onMMIDone(this); } } Loading Loading @@ -1384,6 +1388,7 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { } } mMessage = sb; mMessage = sb; Rlog.d(LOG_TAG, "onQueryCfComplete: mmi=" + this); mPhone.onMMIDone(this); mPhone.onMMIDone(this); } } Loading @@ -1409,12 +1414,13 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { mState = State.FAILED; mState = State.FAILED; ImsSsInfo ssInfo = null; ImsSsInfo ssInfo = null; if (ar.result instanceof Bundle) { if (ar.result instanceof Bundle) { Rlog.d(LOG_TAG, "Received CLIP/COLP/COLR Response."); Rlog.d(LOG_TAG, "onSuppSvcQueryComplete: Received CLIP/COLP/COLR Response."); // Response for CLIP, COLP and COLR queries. // Response for CLIP, COLP and COLR queries. Bundle ssInfoResp = (Bundle) ar.result; Bundle ssInfoResp = (Bundle) ar.result; ssInfo = (ImsSsInfo) ssInfoResp.getParcelable(UT_BUNDLE_KEY_SSINFO); ssInfo = (ImsSsInfo) ssInfoResp.getParcelable(UT_BUNDLE_KEY_SSINFO); if (ssInfo != null) { if (ssInfo != null) { Rlog.d(LOG_TAG, "ImsSsInfo mStatus = " + ssInfo.mStatus); Rlog.d(LOG_TAG, "onSuppSvcQueryComplete: ImsSsInfo mStatus = " + ssInfo.mStatus); if (ssInfo.mStatus == ImsSsInfo.DISABLED) { if (ssInfo.mStatus == ImsSsInfo.DISABLED) { sb.append(mContext.getText(com.android.internal.R.string.serviceDisabled)); sb.append(mContext.getText(com.android.internal.R.string.serviceDisabled)); mState = State.COMPLETE; mState = State.COMPLETE; Loading @@ -1429,7 +1435,7 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { } } } else { } else { Rlog.d(LOG_TAG, "Received Call Barring Response."); Rlog.d(LOG_TAG, "onSuppSvcQueryComplete: Received Call Barring Response."); // Response for Call Barring queries. // Response for Call Barring queries. int[] cbInfos = (int[]) ar.result; int[] cbInfos = (int[]) ar.result; if (cbInfos[0] == 1) { if (cbInfos[0] == 1) { Loading @@ -1443,11 +1449,12 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { } } mMessage = sb; mMessage = sb; Rlog.d(LOG_TAG, "onSuppSvcQueryComplete mmi=" + this); mPhone.onMMIDone(this); mPhone.onMMIDone(this); } } private void onIcbQueryComplete(AsyncResult ar) { private void onIcbQueryComplete(AsyncResult ar) { Rlog.d(LOG_TAG, "onIcbQueryComplete "); Rlog.d(LOG_TAG, "onIcbQueryComplete mmi=" + this); StringBuilder sb = new StringBuilder(getScString()); StringBuilder sb = new StringBuilder(getScString()); sb.append("\n"); sb.append("\n"); Loading Loading @@ -1508,7 +1515,7 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { int[] clirInfo = ssInfo.getIntArray(UT_BUNDLE_KEY_CLIR); int[] clirInfo = ssInfo.getIntArray(UT_BUNDLE_KEY_CLIR); // clirInfo[0] = The 'n' parameter from TS 27.007 7.7 // clirInfo[0] = The 'n' parameter from TS 27.007 7.7 // clirInfo[1] = The 'm' parameter from TS 27.007 7.7 // clirInfo[1] = The 'm' parameter from TS 27.007 7.7 Rlog.d(LOG_TAG, "CLIR param n=" + clirInfo[0] Rlog.d(LOG_TAG, "onQueryClirComplete: CLIR param n=" + clirInfo[0] + " m=" + clirInfo[1]); + " m=" + clirInfo[1]); // 'm' parameter. // 'm' parameter. Loading Loading @@ -1579,6 +1586,7 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { } } mMessage = sb; mMessage = sb; Rlog.d(LOG_TAG, "onQueryClirComplete mmi=" + this); mPhone.onMMIDone(this); mPhone.onMMIDone(this); } } Loading Loading @@ -1623,6 +1631,7 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { } } mMessage = sb; mMessage = sb; Rlog.d(LOG_TAG, "onQueryComplete mmi=" + this); mPhone.onMMIDone(this); mPhone.onMMIDone(this); } } Loading Loading
src/java/com/android/internal/telephony/CallManager.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -1493,6 +1493,7 @@ public class CallManager { * <code>obj.result</code> will be an "MmiCode" object * <code>obj.result</code> will be an "MmiCode" object */ */ public void registerForMmiComplete(Handler h, int what, Object obj){ public void registerForMmiComplete(Handler h, int what, Object obj){ Rlog.d(LOG_TAG, "registerForMmiComplete"); mMmiCompleteRegistrants.addUnique(h, what, obj); mMmiCompleteRegistrants.addUnique(h, what, obj); } } Loading Loading @@ -2317,7 +2318,7 @@ public class CallManager { mMmiInitiateRegistrants.notifyRegistrants((AsyncResult) msg.obj); mMmiInitiateRegistrants.notifyRegistrants((AsyncResult) msg.obj); break; break; case EVENT_MMI_COMPLETE: case EVENT_MMI_COMPLETE: if (VDBG) Rlog.d(LOG_TAG, " handleMessage (EVENT_MMI_COMPLETE)"); Rlog.d(LOG_TAG, "CallManager: handleMessage (EVENT_MMI_COMPLETE)"); mMmiCompleteRegistrants.notifyRegistrants((AsyncResult) msg.obj); mMmiCompleteRegistrants.notifyRegistrants((AsyncResult) msg.obj); break; break; case EVENT_ECM_TIMER_RESET: case EVENT_ECM_TIMER_RESET: Loading
src/java/com/android/internal/telephony/GsmCdmaPhone.java +1 −0 Original line number Original line Diff line number Diff line Loading @@ -1962,6 +1962,7 @@ public class GsmCdmaPhone extends Phone { } } private void onNetworkInitiatedUssd(MmiCode mmi) { private void onNetworkInitiatedUssd(MmiCode mmi) { Rlog.v(LOG_TAG, "onNetworkInitiatedUssd: mmi=" + mmi); mMmiCompleteRegistrants.notifyRegistrants( mMmiCompleteRegistrants.notifyRegistrants( new AsyncResult(null, mmi, null)); new AsyncResult(null, mmi, null)); } } Loading
src/java/com/android/internal/telephony/gsm/GsmMmiCode.java +16 −9 Original line number Original line Diff line number Diff line Loading @@ -791,14 +791,14 @@ public final class GsmMmiCode extends Handler implements MmiCode { processCode() throws CallStateException { processCode() throws CallStateException { try { try { if (isShortCode()) { if (isShortCode()) { Rlog.d(LOG_TAG, "isShortCode"); Rlog.d(LOG_TAG, "processCode: isShortCode"); // These just get treated as USSD. // These just get treated as USSD. sendUssd(mDialingNumber); sendUssd(mDialingNumber); } else if (mDialingNumber != null) { } else if (mDialingNumber != null) { // We should have no dialing numbers here // We should have no dialing numbers here throw new RuntimeException ("Invalid or Unsupported MMI Code"); throw new RuntimeException ("Invalid or Unsupported MMI Code"); } else if (mSc != null && mSc.equals(SC_CLIP)) { } else if (mSc != null && mSc.equals(SC_CLIP)) { Rlog.d(LOG_TAG, "is CLIP"); Rlog.d(LOG_TAG, "processCode: is CLIP"); if (isInterrogate()) { if (isInterrogate()) { mPhone.mCi.queryCLIP( mPhone.mCi.queryCLIP( obtainMessage(EVENT_QUERY_COMPLETE, this)); obtainMessage(EVENT_QUERY_COMPLETE, this)); Loading @@ -806,7 +806,7 @@ public final class GsmMmiCode extends Handler implements MmiCode { throw new RuntimeException ("Invalid or Unsupported MMI Code"); throw new RuntimeException ("Invalid or Unsupported MMI Code"); } } } else if (mSc != null && mSc.equals(SC_CLIR)) { } else if (mSc != null && mSc.equals(SC_CLIR)) { Rlog.d(LOG_TAG, "is CLIR"); Rlog.d(LOG_TAG, "processCode: is CLIR"); if (isActivate()) { if (isActivate()) { mPhone.mCi.setCLIR(CommandsInterface.CLIR_INVOCATION, mPhone.mCi.setCLIR(CommandsInterface.CLIR_INVOCATION, obtainMessage(EVENT_SET_COMPLETE, this)); obtainMessage(EVENT_SET_COMPLETE, this)); Loading @@ -820,7 +820,7 @@ public final class GsmMmiCode extends Handler implements MmiCode { throw new RuntimeException ("Invalid or Unsupported MMI Code"); throw new RuntimeException ("Invalid or Unsupported MMI Code"); } } } else if (isServiceCodeCallForwarding(mSc)) { } else if (isServiceCodeCallForwarding(mSc)) { Rlog.d(LOG_TAG, "is CF"); Rlog.d(LOG_TAG, "processCode: is CF"); String dialingNumber = mSia; String dialingNumber = mSia; int serviceClass = siToServiceClass(mSib); int serviceClass = siToServiceClass(mSib); Loading Loading @@ -866,7 +866,7 @@ public final class GsmMmiCode extends Handler implements MmiCode { ((cfAction == CommandsInterface.CF_ACTION_ENABLE) || ((cfAction == CommandsInterface.CF_ACTION_ENABLE) || (cfAction == CommandsInterface.CF_ACTION_REGISTRATION)) ? 1 : 0; (cfAction == CommandsInterface.CF_ACTION_REGISTRATION)) ? 1 : 0; Rlog.d(LOG_TAG, "is CF setCallForward"); Rlog.d(LOG_TAG, "processCode: is CF setCallForward"); mPhone.mCi.setCallForward(cfAction, reason, serviceClass, mPhone.mCi.setCallForward(cfAction, reason, serviceClass, dialingNumber, time, obtainMessage( dialingNumber, time, obtainMessage( EVENT_SET_CFF_COMPLETE, EVENT_SET_CFF_COMPLETE, Loading Loading @@ -957,7 +957,8 @@ public final class GsmMmiCode extends Handler implements MmiCode { // Sim is puk-locked // Sim is puk-locked handlePasswordError(com.android.internal.R.string.needPuk); handlePasswordError(com.android.internal.R.string.needPuk); } else if (mUiccApplication != null) { } else if (mUiccApplication != null) { Rlog.d(LOG_TAG, "process mmi service code using UiccApp sc=" + mSc); Rlog.d(LOG_TAG, "processCode: process mmi service code using UiccApp sc=" + mSc); // We have an app and the pre-checks are OK // We have an app and the pre-checks are OK if (mSc.equals(SC_PIN)) { if (mSc.equals(SC_PIN)) { Loading @@ -984,11 +985,13 @@ public final class GsmMmiCode extends Handler implements MmiCode { } else if (mPoundString != null) { } else if (mPoundString != null) { sendUssd(mPoundString); sendUssd(mPoundString); } else { } else { Rlog.d(LOG_TAG, "processCode: Invalid or Unsupported MMI Code"); throw new RuntimeException ("Invalid or Unsupported MMI Code"); throw new RuntimeException ("Invalid or Unsupported MMI Code"); } } } catch (RuntimeException exc) { } catch (RuntimeException exc) { mState = State.FAILED; mState = State.FAILED; mMessage = mContext.getText(com.android.internal.R.string.mmiError); mMessage = mContext.getText(com.android.internal.R.string.mmiError); Rlog.d(LOG_TAG, "processCode: RuntimeException=" + exc); mPhone.onMMIDone(this); mPhone.onMMIDone(this); } } } } Loading Loading @@ -1024,7 +1027,7 @@ public final class GsmMmiCode extends Handler implements MmiCode { if (!isUssdRequest) { if (!isUssdRequest) { mState = State.COMPLETE; mState = State.COMPLETE; } } Rlog.d(LOG_TAG, "onUssdFinished: ussdMessage=" + ussdMessage); mPhone.onMMIDone(this); mPhone.onMMIDone(this); } } } } Loading @@ -1040,7 +1043,7 @@ public final class GsmMmiCode extends Handler implements MmiCode { if (mState == State.PENDING) { if (mState == State.PENDING) { mState = State.FAILED; mState = State.FAILED; mMessage = mContext.getText(com.android.internal.R.string.mmiError); mMessage = mContext.getText(com.android.internal.R.string.mmiError); Rlog.d(LOG_TAG, "onUssdFinishedError"); mPhone.onMMIDone(this); mPhone.onMMIDone(this); } } } } Loading @@ -1059,7 +1062,7 @@ public final class GsmMmiCode extends Handler implements MmiCode { if (mState == State.PENDING) { if (mState == State.PENDING) { mState = State.COMPLETE; mState = State.COMPLETE; mMessage = null; mMessage = null; Rlog.d(LOG_TAG, "onUssdRelease"); mPhone.onMMIDone(this); mPhone.onMMIDone(this); } } } } Loading Loading @@ -1301,6 +1304,7 @@ public final class GsmMmiCode extends Handler implements MmiCode { } } mMessage = sb; mMessage = sb; Rlog.d(LOG_TAG, "onSetComplete mmi=" + this); mPhone.onMMIDone(this); mPhone.onMMIDone(this); } } Loading Loading @@ -1382,6 +1386,7 @@ public final class GsmMmiCode extends Handler implements MmiCode { } } mMessage = sb; mMessage = sb; Rlog.d(LOG_TAG, "onGetClirComplete: mmi=" + this); mPhone.onMMIDone(this); mPhone.onMMIDone(this); } } Loading Loading @@ -1534,6 +1539,7 @@ public final class GsmMmiCode extends Handler implements MmiCode { } } mMessage = sb; mMessage = sb; Rlog.d(LOG_TAG, "onQueryCfComplete: mmi=" + this); mPhone.onMMIDone(this); mPhone.onMMIDone(this); } } Loading Loading @@ -1571,6 +1577,7 @@ public final class GsmMmiCode extends Handler implements MmiCode { } } mMessage = sb; mMessage = sb; Rlog.d(LOG_TAG, "onQueryComplete: mmi=" + this); mPhone.onMMIDone(this); mPhone.onMMIDone(this); } } Loading
src/java/com/android/internal/telephony/imsphone/ImsPhone.java +2 −0 Original line number Original line Diff line number Diff line Loading @@ -1099,6 +1099,7 @@ public class ImsPhone extends ImsPhoneBase { * The exception is cancellation of an incoming USSD-REQUEST, which is * The exception is cancellation of an incoming USSD-REQUEST, which is * not on the list. * not on the list. */ */ Rlog.d(LOG_TAG, "onMMIDone: mmi=" + mmi); if (mPendingMMIs.remove(mmi) || mmi.isUssdRequest()) { if (mPendingMMIs.remove(mmi) || mmi.isUssdRequest()) { ResultReceiver receiverCallback = mmi.getUssdCallbackReceiver(); ResultReceiver receiverCallback = mmi.getUssdCallbackReceiver(); if (receiverCallback != null) { if (receiverCallback != null) { Loading @@ -1107,6 +1108,7 @@ public class ImsPhone extends ImsPhoneBase { sendUssdResponse(mmi.getDialString(), mmi.getMessage(), returnCode, sendUssdResponse(mmi.getDialString(), mmi.getMessage(), returnCode, receiverCallback ); receiverCallback ); } else { } else { Rlog.v(LOG_TAG, "onMMIDone: notifyRegistrants"); mMmiCompleteRegistrants.notifyRegistrants( mMmiCompleteRegistrants.notifyRegistrants( new AsyncResult(null, mmi, null)); new AsyncResult(null, mmi, null)); } } Loading
src/java/com/android/internal/telephony/imsphone/ImsPhoneMmiCode.java +34 −25 Original line number Original line Diff line number Diff line Loading @@ -756,14 +756,14 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { processCode () throws CallStateException { processCode () throws CallStateException { try { try { if (isShortCode()) { if (isShortCode()) { Rlog.d(LOG_TAG, "isShortCode"); Rlog.d(LOG_TAG, "processCode: isShortCode"); // These just get treated as USSD. // These just get treated as USSD. Rlog.d(LOG_TAG, "Sending short code '" Rlog.d(LOG_TAG, "processCode: Sending short code '" + mDialingNumber + "' over CS pipe."); + mDialingNumber + "' over CS pipe."); throw new CallStateException(Phone.CS_FALLBACK); throw new CallStateException(Phone.CS_FALLBACK); } else if (isServiceCodeCallForwarding(mSc)) { } else if (isServiceCodeCallForwarding(mSc)) { Rlog.d(LOG_TAG, "is CF"); Rlog.d(LOG_TAG, "processCode: is CF"); String dialingNumber = mSia; String dialingNumber = mSia; int reason = scToCallForwardReason(mSc); int reason = scToCallForwardReason(mSc); Loading Loading @@ -806,7 +806,7 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { ((cfAction == CommandsInterface.CF_ACTION_ENABLE) || ((cfAction == CommandsInterface.CF_ACTION_ENABLE) || (cfAction == CommandsInterface.CF_ACTION_REGISTRATION)) ? 1 : 0; (cfAction == CommandsInterface.CF_ACTION_REGISTRATION)) ? 1 : 0; Rlog.d(LOG_TAG, "is CF setCallForward"); Rlog.d(LOG_TAG, "processCode: is CF setCallForward"); mPhone.setCallForwardingOption(cfAction, reason, mPhone.setCallForwardingOption(cfAction, reason, dialingNumber, serviceClass, time, obtainMessage( dialingNumber, serviceClass, time, obtainMessage( EVENT_SET_CFF_COMPLETE, EVENT_SET_CFF_COMPLETE, Loading Loading @@ -839,21 +839,21 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { mPhone.mCT.getUtInterface().updateCLIR(CommandsInterface.CLIR_INVOCATION, mPhone.mCT.getUtInterface().updateCLIR(CommandsInterface.CLIR_INVOCATION, obtainMessage(EVENT_SET_COMPLETE, this)); obtainMessage(EVENT_SET_COMPLETE, this)); } catch (ImsException e) { } catch (ImsException e) { Rlog.d(LOG_TAG, "Could not get UT handle for updateCLIR."); Rlog.d(LOG_TAG, "processCode: Could not get UT handle for updateCLIR."); } } } else if (isDeactivate()) { } else if (isDeactivate()) { try { try { mPhone.mCT.getUtInterface().updateCLIR(CommandsInterface.CLIR_SUPPRESSION, mPhone.mCT.getUtInterface().updateCLIR(CommandsInterface.CLIR_SUPPRESSION, obtainMessage(EVENT_SET_COMPLETE, this)); obtainMessage(EVENT_SET_COMPLETE, this)); } catch (ImsException e) { } catch (ImsException e) { Rlog.d(LOG_TAG, "Could not get UT handle for updateCLIR."); Rlog.d(LOG_TAG, "processCode: Could not get UT handle for updateCLIR."); } } } else if (isInterrogate()) { } else if (isInterrogate()) { try { try { mPhone.mCT.getUtInterface() mPhone.mCT.getUtInterface() .queryCLIR(obtainMessage(EVENT_GET_CLIR_COMPLETE, this)); .queryCLIR(obtainMessage(EVENT_GET_CLIR_COMPLETE, this)); } catch (ImsException e) { } catch (ImsException e) { Rlog.d(LOG_TAG, "Could not get UT handle for queryCLIR."); Rlog.d(LOG_TAG, "processCode: Could not get UT handle for queryCLIR."); } } } else { } else { throw new RuntimeException ("Invalid or Unsupported MMI Code"); throw new RuntimeException ("Invalid or Unsupported MMI Code"); Loading @@ -865,14 +865,14 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { mPhone.mCT.getUtInterface() mPhone.mCT.getUtInterface() .queryCLIP(obtainMessage(EVENT_SUPP_SVC_QUERY_COMPLETE, this)); .queryCLIP(obtainMessage(EVENT_SUPP_SVC_QUERY_COMPLETE, this)); } catch (ImsException e) { } catch (ImsException e) { Rlog.d(LOG_TAG, "Could not get UT handle for queryCLIP."); Rlog.d(LOG_TAG, "processCode: Could not get UT handle for queryCLIP."); } } } else if (isActivate() || isDeactivate()) { } else if (isActivate() || isDeactivate()) { try { try { mPhone.mCT.getUtInterface().updateCLIP(isActivate(), mPhone.mCT.getUtInterface().updateCLIP(isActivate(), obtainMessage(EVENT_SET_COMPLETE, this)); obtainMessage(EVENT_SET_COMPLETE, this)); } catch (ImsException e) { } catch (ImsException e) { Rlog.d(LOG_TAG, "Could not get UT handle for updateCLIP."); Rlog.d(LOG_TAG, "processCode: Could not get UT handle for updateCLIP."); } } } else { } else { throw new RuntimeException ("Invalid or Unsupported MMI Code"); throw new RuntimeException ("Invalid or Unsupported MMI Code"); Loading @@ -884,14 +884,14 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { mPhone.mCT.getUtInterface() mPhone.mCT.getUtInterface() .queryCOLP(obtainMessage(EVENT_SUPP_SVC_QUERY_COMPLETE, this)); .queryCOLP(obtainMessage(EVENT_SUPP_SVC_QUERY_COMPLETE, this)); } catch (ImsException e) { } catch (ImsException e) { Rlog.d(LOG_TAG, "Could not get UT handle for queryCOLP."); Rlog.d(LOG_TAG, "processCode: Could not get UT handle for queryCOLP."); } } } else if (isActivate() || isDeactivate()) { } else if (isActivate() || isDeactivate()) { try { try { mPhone.mCT.getUtInterface().updateCOLP(isActivate(), mPhone.mCT.getUtInterface().updateCOLP(isActivate(), obtainMessage(EVENT_SET_COMPLETE, this)); obtainMessage(EVENT_SET_COMPLETE, this)); } catch (ImsException e) { } catch (ImsException e) { Rlog.d(LOG_TAG, "Could not get UT handle for updateCOLP."); Rlog.d(LOG_TAG, "processCode: Could not get UT handle for updateCOLP."); } } } else { } else { throw new RuntimeException ("Invalid or Unsupported MMI Code"); throw new RuntimeException ("Invalid or Unsupported MMI Code"); Loading @@ -903,21 +903,21 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { mPhone.mCT.getUtInterface().updateCOLR(NUM_PRESENTATION_RESTRICTED, mPhone.mCT.getUtInterface().updateCOLR(NUM_PRESENTATION_RESTRICTED, obtainMessage(EVENT_SET_COMPLETE, this)); obtainMessage(EVENT_SET_COMPLETE, this)); } catch (ImsException e) { } catch (ImsException e) { Rlog.d(LOG_TAG, "Could not get UT handle for updateCOLR."); Rlog.d(LOG_TAG, "processCode: Could not get UT handle for updateCOLR."); } } } else if (isDeactivate()) { } else if (isDeactivate()) { try { try { mPhone.mCT.getUtInterface().updateCOLR(NUM_PRESENTATION_ALLOWED, mPhone.mCT.getUtInterface().updateCOLR(NUM_PRESENTATION_ALLOWED, obtainMessage(EVENT_SET_COMPLETE, this)); obtainMessage(EVENT_SET_COMPLETE, this)); } catch (ImsException e) { } catch (ImsException e) { Rlog.d(LOG_TAG, "Could not get UT handle for updateCOLR."); Rlog.d(LOG_TAG, "processCode: Could not get UT handle for updateCOLR."); } } } else if (isInterrogate()) { } else if (isInterrogate()) { try { try { mPhone.mCT.getUtInterface() mPhone.mCT.getUtInterface() .queryCOLR(obtainMessage(EVENT_SUPP_SVC_QUERY_COMPLETE, this)); .queryCOLR(obtainMessage(EVENT_SUPP_SVC_QUERY_COMPLETE, this)); } catch (ImsException e) { } catch (ImsException e) { Rlog.d(LOG_TAG, "Could not get UT handle for queryCOLR."); Rlog.d(LOG_TAG, "processCode: Could not get UT handle for queryCOLR."); } } } else { } else { throw new RuntimeException ("Invalid or Unsupported MMI Code"); throw new RuntimeException ("Invalid or Unsupported MMI Code"); Loading @@ -933,7 +933,7 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { } } // TODO: isRegister() case needs to be handled. // TODO: isRegister() case needs to be handled. } catch (ImsException e) { } catch (ImsException e) { Rlog.d(LOG_TAG, "Could not get UT handle for ICB."); Rlog.d(LOG_TAG, "processCode: Could not get UT handle for ICB."); } } } else if (mSc != null && mSc.equals(SC_BAICa)) { } else if (mSc != null && mSc.equals(SC_BAICa)) { int callAction =0; int callAction =0; Loading @@ -956,7 +956,7 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { null); null); } } } catch (ImsException e) { } catch (ImsException e) { Rlog.d(LOG_TAG, "Could not get UT handle for ICBa."); Rlog.d(LOG_TAG, "processCode: Could not get UT handle for ICBa."); } } } else if (mSc != null && mSc.equals(SC_WAIT)) { } else if (mSc != null && mSc.equals(SC_WAIT)) { // sia = basic service group // sia = basic service group Loading @@ -971,15 +971,17 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { throw new RuntimeException ("Invalid or Unsupported MMI Code"); throw new RuntimeException ("Invalid or Unsupported MMI Code"); } } } else if (mPoundString != null) { } else if (mPoundString != null) { Rlog.d(LOG_TAG, "Sending pound string '" Rlog.d(LOG_TAG, "processCode: Sending pound string '" + mDialingNumber + "' over CS pipe."); + mDialingNumber + "' over CS pipe."); throw new CallStateException(Phone.CS_FALLBACK); throw new CallStateException(Phone.CS_FALLBACK); } else { } else { Rlog.d(LOG_TAG, "processCode: invalid or unsupported MMI"); throw new RuntimeException ("Invalid or Unsupported MMI Code"); throw new RuntimeException ("Invalid or Unsupported MMI Code"); } } } catch (RuntimeException exc) { } catch (RuntimeException exc) { mState = State.FAILED; mState = State.FAILED; mMessage = mContext.getText(com.android.internal.R.string.mmiError); mMessage = mContext.getText(com.android.internal.R.string.mmiError); Rlog.d(LOG_TAG, "processCode: RuntimeException = " + exc); mPhone.onMMIDone(this); mPhone.onMMIDone(this); } } } } Loading @@ -998,7 +1000,9 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { if (mState == State.PENDING) { if (mState == State.PENDING) { if (ussdMessage == null) { if (ussdMessage == null) { mMessage = mContext.getText(com.android.internal.R.string.mmiComplete); mMessage = mContext.getText(com.android.internal.R.string.mmiComplete); Rlog.v(LOG_TAG, "onUssdFinished: no message; using: " + mMessage); } else { } else { Rlog.v(LOG_TAG, "onUssdFinished: message: " + ussdMessage); mMessage = ussdMessage; mMessage = ussdMessage; } } mIsUssdRequest = isUssdRequest; mIsUssdRequest = isUssdRequest; Loading @@ -1006,7 +1010,6 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { if (!isUssdRequest) { if (!isUssdRequest) { mState = State.COMPLETE; mState = State.COMPLETE; } } mPhone.onMMIDone(this); mPhone.onMMIDone(this); } } } } Loading @@ -1022,7 +1025,7 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { if (mState == State.PENDING) { if (mState == State.PENDING) { mState = State.FAILED; mState = State.FAILED; mMessage = mContext.getText(com.android.internal.R.string.mmiError); mMessage = mContext.getText(com.android.internal.R.string.mmiError); Rlog.d(LOG_TAG, "onUssdFinishedError: mmi=" + this); mPhone.onMMIDone(this); mPhone.onMMIDone(this); } } } } Loading Loading @@ -1140,7 +1143,7 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { obtainMessage(EVENT_SET_COMPLETE,this), obtainMessage(EVENT_SET_COMPLETE,this), icbNum); icbNum); } catch (ImsException e) { } catch (ImsException e) { Rlog.d(LOG_TAG, "Could not get UT handle for updating ICB."); Rlog.d(LOG_TAG, "processIcbMmiCodeForUpdate:Could not get UT handle for updating ICB."); } } } } Loading Loading @@ -1230,6 +1233,7 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { } } mMessage = sb; mMessage = sb; Rlog.d(LOG_TAG, "onSetComplete: mmi=" + this); mPhone.onMMIDone(this); mPhone.onMMIDone(this); } } Loading Loading @@ -1384,6 +1388,7 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { } } mMessage = sb; mMessage = sb; Rlog.d(LOG_TAG, "onQueryCfComplete: mmi=" + this); mPhone.onMMIDone(this); mPhone.onMMIDone(this); } } Loading @@ -1409,12 +1414,13 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { mState = State.FAILED; mState = State.FAILED; ImsSsInfo ssInfo = null; ImsSsInfo ssInfo = null; if (ar.result instanceof Bundle) { if (ar.result instanceof Bundle) { Rlog.d(LOG_TAG, "Received CLIP/COLP/COLR Response."); Rlog.d(LOG_TAG, "onSuppSvcQueryComplete: Received CLIP/COLP/COLR Response."); // Response for CLIP, COLP and COLR queries. // Response for CLIP, COLP and COLR queries. Bundle ssInfoResp = (Bundle) ar.result; Bundle ssInfoResp = (Bundle) ar.result; ssInfo = (ImsSsInfo) ssInfoResp.getParcelable(UT_BUNDLE_KEY_SSINFO); ssInfo = (ImsSsInfo) ssInfoResp.getParcelable(UT_BUNDLE_KEY_SSINFO); if (ssInfo != null) { if (ssInfo != null) { Rlog.d(LOG_TAG, "ImsSsInfo mStatus = " + ssInfo.mStatus); Rlog.d(LOG_TAG, "onSuppSvcQueryComplete: ImsSsInfo mStatus = " + ssInfo.mStatus); if (ssInfo.mStatus == ImsSsInfo.DISABLED) { if (ssInfo.mStatus == ImsSsInfo.DISABLED) { sb.append(mContext.getText(com.android.internal.R.string.serviceDisabled)); sb.append(mContext.getText(com.android.internal.R.string.serviceDisabled)); mState = State.COMPLETE; mState = State.COMPLETE; Loading @@ -1429,7 +1435,7 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { } } } else { } else { Rlog.d(LOG_TAG, "Received Call Barring Response."); Rlog.d(LOG_TAG, "onSuppSvcQueryComplete: Received Call Barring Response."); // Response for Call Barring queries. // Response for Call Barring queries. int[] cbInfos = (int[]) ar.result; int[] cbInfos = (int[]) ar.result; if (cbInfos[0] == 1) { if (cbInfos[0] == 1) { Loading @@ -1443,11 +1449,12 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { } } mMessage = sb; mMessage = sb; Rlog.d(LOG_TAG, "onSuppSvcQueryComplete mmi=" + this); mPhone.onMMIDone(this); mPhone.onMMIDone(this); } } private void onIcbQueryComplete(AsyncResult ar) { private void onIcbQueryComplete(AsyncResult ar) { Rlog.d(LOG_TAG, "onIcbQueryComplete "); Rlog.d(LOG_TAG, "onIcbQueryComplete mmi=" + this); StringBuilder sb = new StringBuilder(getScString()); StringBuilder sb = new StringBuilder(getScString()); sb.append("\n"); sb.append("\n"); Loading Loading @@ -1508,7 +1515,7 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { int[] clirInfo = ssInfo.getIntArray(UT_BUNDLE_KEY_CLIR); int[] clirInfo = ssInfo.getIntArray(UT_BUNDLE_KEY_CLIR); // clirInfo[0] = The 'n' parameter from TS 27.007 7.7 // clirInfo[0] = The 'n' parameter from TS 27.007 7.7 // clirInfo[1] = The 'm' parameter from TS 27.007 7.7 // clirInfo[1] = The 'm' parameter from TS 27.007 7.7 Rlog.d(LOG_TAG, "CLIR param n=" + clirInfo[0] Rlog.d(LOG_TAG, "onQueryClirComplete: CLIR param n=" + clirInfo[0] + " m=" + clirInfo[1]); + " m=" + clirInfo[1]); // 'm' parameter. // 'm' parameter. Loading Loading @@ -1579,6 +1586,7 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { } } mMessage = sb; mMessage = sb; Rlog.d(LOG_TAG, "onQueryClirComplete mmi=" + this); mPhone.onMMIDone(this); mPhone.onMMIDone(this); } } Loading Loading @@ -1623,6 +1631,7 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { } } mMessage = sb; mMessage = sb; Rlog.d(LOG_TAG, "onQueryComplete mmi=" + this); mPhone.onMMIDone(this); mPhone.onMMIDone(this); } } Loading