Loading src/java/com/android/internal/telephony/GsmCdmaPhone.java +15 −0 Original line number Diff line number Diff line Loading @@ -2248,6 +2248,21 @@ public class GsmCdmaPhone extends Phone { } } @Override public void queryCLIP(Message onComplete) { Phone imsPhone = mImsPhone; if (useSsOverIms(onComplete)) { imsPhone.queryCLIP(onComplete); return; } if (isPhoneTypeGsm()) { mCi.queryCLIP(onComplete); } else { loge("queryCLIP: not possible in CDMA"); } } @Override public void getCallWaiting(Message onComplete) { Phone imsPhone = mImsPhone; Loading src/java/com/android/internal/telephony/Phone.java +3 −0 Original line number Diff line number Diff line Loading @@ -3598,6 +3598,9 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { public void setCallWaiting(boolean enable, int serviceClass, Message onComplete) { } public void queryCLIP(Message onComplete) { } /* * Returns the subscription id. */ Loading src/java/com/android/internal/telephony/imsphone/ImsPhone.java +30 −1 Original line number Diff line number Diff line Loading @@ -139,6 +139,7 @@ public class ImsPhone extends ImsPhoneBase { public static final int EVENT_SERVICE_STATE_CHANGED = EVENT_LAST + 8; private static final int EVENT_VOICE_CALL_ENDED = EVENT_LAST + 9; private static final int EVENT_INITIATE_VOLTE_SILENT_REDIAL = EVENT_LAST + 10; private static final int EVENT_GET_CLIP_DONE = EVENT_LAST + 11; static final int RESTART_ECM_TIMER = 0; // restart Ecm timer static final int CANCEL_ECM_TIMER = 1; // cancel Ecm timer Loading Loading @@ -332,7 +333,7 @@ public class ImsPhone extends ImsPhoneBase { @VisibleForTesting public Message mOnComplete; // Default // Query CW, CLIR // Default // Query CW, CLIR, CLIP SS(Message onComplete) { mOnComplete = onComplete; } Loading Loading @@ -1129,6 +1130,21 @@ public class ImsPhone extends ImsPhoneBase { } } @Override public void queryCLIP(Message onComplete) { Message resp; SS ss = new SS(onComplete); resp = obtainMessage(EVENT_GET_CLIP_DONE, ss); try { Rlog.d(LOG_TAG, "ut.queryCLIP"); ImsUtInterface ut = mCT.getUtInterface(); ut.queryCLIP(resp); } catch (ImsException e) { sendErrorResponse(onComplete, e); } } @UnsupportedAppUsage @Override public void getCallForwardingOption(int commandInterfaceCFReason, Loading Loading @@ -1711,6 +1727,9 @@ public class ImsPhone extends ImsPhoneBase { case EVENT_SET_CLIR_DONE: mDefaultPhone.setOutgoingCallerIdDisplay(ss.mClirMode, ss.mOnComplete); break; case EVENT_GET_CLIP_DONE: mDefaultPhone.queryCLIP(ss.mOnComplete); break; default: break; } Loading Loading @@ -1776,6 +1795,16 @@ public class ImsPhone extends ImsPhoneBase { } break; case EVENT_GET_CLIP_DONE: Bundle ssInfoResp = null; if (ar.exception == null) { ssInfoResp = (Bundle) ar.result; } if (ss != null) { sendResponseOrRetryOnCsfbSs(ss, msg.what, ar.exception, ssInfoResp); } break; case EVENT_SET_CLIR_DONE: if (ar.exception == null) { if (ss != null) { Loading src/java/com/android/internal/telephony/imsphone/ImsPhoneMmiCode.java +18 −20 Original line number Diff line number Diff line Loading @@ -940,24 +940,23 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { if (isActivate() && !mPhone.getDefaultPhone().isClirActivationAndDeactivationPrevented()) { try { mPhone.mCT.getUtInterface().updateCLIR(CommandsInterface.CLIR_INVOCATION, mPhone.setOutgoingCallerIdDisplay(CommandsInterface.CLIR_INVOCATION, obtainMessage(EVENT_SET_COMPLETE, this)); } catch (ImsException e) { } catch (Exception e) { Rlog.d(LOG_TAG, "processCode: Could not get UT handle for updateCLIR."); } } else if (isDeactivate() && !mPhone.getDefaultPhone().isClirActivationAndDeactivationPrevented()) { try { mPhone.mCT.getUtInterface().updateCLIR(CommandsInterface.CLIR_SUPPRESSION, mPhone.setOutgoingCallerIdDisplay(CommandsInterface.CLIR_SUPPRESSION, obtainMessage(EVENT_SET_COMPLETE, this)); } catch (ImsException e) { } catch (Exception e) { Rlog.d(LOG_TAG, "processCode: Could not get UT handle for updateCLIR."); } } else if (isInterrogate()) { try { mPhone.mCT.getUtInterface() .queryCLIR(obtainMessage(EVENT_GET_CLIR_COMPLETE, this)); } catch (ImsException e) { mPhone.getOutgoingCallerIdDisplay(obtainMessage(EVENT_GET_CLIR_COMPLETE, this)); } catch (Exception e) { Rlog.d(LOG_TAG, "processCode: Could not get UT handle for queryCLIR."); } } else { Loading @@ -967,9 +966,8 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { // NOTE: Refer to the note above. if (isInterrogate()) { try { mPhone.mCT.getUtInterface() .queryCLIP(obtainMessage(EVENT_SUPP_SVC_QUERY_COMPLETE, this)); } catch (ImsException e) { mPhone.queryCLIP(obtainMessage(EVENT_SUPP_SVC_QUERY_COMPLETE, this)); } catch (Exception e) { Rlog.d(LOG_TAG, "processCode: Could not get UT handle for queryCLIP."); } } else if (isActivate() || isDeactivate()) { Loading Loading @@ -1592,8 +1590,9 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { } } else { Rlog.d(LOG_TAG, "onSuppSvcQueryComplete: Received Call Barring Response."); // Response for Call Barring queries. Rlog.d(LOG_TAG, "onSuppSvcQueryComplete: Received Call Barring/CSFB CLIP Response."); // Response for Call Barring and CSFB CLIP queries. int[] infos = (int[]) ar.result; if (infos == null || infos.length == 0) { sb.append(mContext.getText(com.android.internal.R.string.mmiError)); Loading Loading @@ -1671,14 +1670,14 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { sb.append(getErrorMessage(ar)); } } else { ImsSsInfo ssInfo = (ImsSsInfo) ar.result; int[] clirInfo = (int[]) ar.result; // ssInfo.getClirOutgoingState() = The 'n' parameter from TS 27.007 7.7 // ssInfo.getClirInterrogationStatus() = The 'm' parameter from TS 27.007 7.7 Rlog.d(LOG_TAG, "onQueryClirComplete: CLIR param n=" + ssInfo.getClirOutgoingState() + " m=" + ssInfo.getClirInterrogationStatus()); Rlog.d(LOG_TAG, "onQueryClirComplete: CLIR param n=" + clirInfo[0] + " m=" + clirInfo[1]); // 'm' parameter. switch (ssInfo.getClirInterrogationStatus()) { switch (clirInfo[1]) { case ImsSsInfo.CLIR_STATUS_NOT_PROVISIONED: sb.append(mContext.getText( com.android.internal.R.string.serviceNotProvisioned)); Loading @@ -1691,7 +1690,7 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { break; case ImsSsInfo.CLIR_STATUS_TEMPORARILY_RESTRICTED: // 'n' parameter. switch (ssInfo.getClirOutgoingState()) { switch (clirInfo[0]) { case ImsSsInfo.CLIR_OUTGOING_DEFAULT: sb.append(mContext.getText( com.android.internal.R.string.CLIRDefaultOnNextCallOn)); Loading @@ -1715,7 +1714,7 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { break; case ImsSsInfo.CLIR_STATUS_TEMPORARILY_ALLOWED: // 'n' parameter. switch (ssInfo.getClirOutgoingState()) { switch (clirInfo[0]) { case ImsSsInfo.CLIR_OUTGOING_DEFAULT: sb.append(mContext.getText( com.android.internal.R.string.CLIRDefaultOffNextCallOff)); Loading Loading @@ -1874,8 +1873,7 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { case ImsSsData.SS_INTERROGATION: if (ssData.isTypeClir()) { Rlog.d(LOG_TAG, "CLIR INTERROGATION"); ImsSsInfo clirInfo = ssData.getSuppServiceInfo().get(0); onQueryClirComplete(new AsyncResult(null, clirInfo, ex)); onQueryClirComplete(new AsyncResult(null, ssData.getSuppServiceInfoCompat(), ex)); } else if (ssData.isTypeCF()) { Rlog.d(LOG_TAG, "CALL FORWARD INTERROGATION"); // Have to translate to an array, since the modem still returns it in the Loading Loading
src/java/com/android/internal/telephony/GsmCdmaPhone.java +15 −0 Original line number Diff line number Diff line Loading @@ -2248,6 +2248,21 @@ public class GsmCdmaPhone extends Phone { } } @Override public void queryCLIP(Message onComplete) { Phone imsPhone = mImsPhone; if (useSsOverIms(onComplete)) { imsPhone.queryCLIP(onComplete); return; } if (isPhoneTypeGsm()) { mCi.queryCLIP(onComplete); } else { loge("queryCLIP: not possible in CDMA"); } } @Override public void getCallWaiting(Message onComplete) { Phone imsPhone = mImsPhone; Loading
src/java/com/android/internal/telephony/Phone.java +3 −0 Original line number Diff line number Diff line Loading @@ -3598,6 +3598,9 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { public void setCallWaiting(boolean enable, int serviceClass, Message onComplete) { } public void queryCLIP(Message onComplete) { } /* * Returns the subscription id. */ Loading
src/java/com/android/internal/telephony/imsphone/ImsPhone.java +30 −1 Original line number Diff line number Diff line Loading @@ -139,6 +139,7 @@ public class ImsPhone extends ImsPhoneBase { public static final int EVENT_SERVICE_STATE_CHANGED = EVENT_LAST + 8; private static final int EVENT_VOICE_CALL_ENDED = EVENT_LAST + 9; private static final int EVENT_INITIATE_VOLTE_SILENT_REDIAL = EVENT_LAST + 10; private static final int EVENT_GET_CLIP_DONE = EVENT_LAST + 11; static final int RESTART_ECM_TIMER = 0; // restart Ecm timer static final int CANCEL_ECM_TIMER = 1; // cancel Ecm timer Loading Loading @@ -332,7 +333,7 @@ public class ImsPhone extends ImsPhoneBase { @VisibleForTesting public Message mOnComplete; // Default // Query CW, CLIR // Default // Query CW, CLIR, CLIP SS(Message onComplete) { mOnComplete = onComplete; } Loading Loading @@ -1129,6 +1130,21 @@ public class ImsPhone extends ImsPhoneBase { } } @Override public void queryCLIP(Message onComplete) { Message resp; SS ss = new SS(onComplete); resp = obtainMessage(EVENT_GET_CLIP_DONE, ss); try { Rlog.d(LOG_TAG, "ut.queryCLIP"); ImsUtInterface ut = mCT.getUtInterface(); ut.queryCLIP(resp); } catch (ImsException e) { sendErrorResponse(onComplete, e); } } @UnsupportedAppUsage @Override public void getCallForwardingOption(int commandInterfaceCFReason, Loading Loading @@ -1711,6 +1727,9 @@ public class ImsPhone extends ImsPhoneBase { case EVENT_SET_CLIR_DONE: mDefaultPhone.setOutgoingCallerIdDisplay(ss.mClirMode, ss.mOnComplete); break; case EVENT_GET_CLIP_DONE: mDefaultPhone.queryCLIP(ss.mOnComplete); break; default: break; } Loading Loading @@ -1776,6 +1795,16 @@ public class ImsPhone extends ImsPhoneBase { } break; case EVENT_GET_CLIP_DONE: Bundle ssInfoResp = null; if (ar.exception == null) { ssInfoResp = (Bundle) ar.result; } if (ss != null) { sendResponseOrRetryOnCsfbSs(ss, msg.what, ar.exception, ssInfoResp); } break; case EVENT_SET_CLIR_DONE: if (ar.exception == null) { if (ss != null) { Loading
src/java/com/android/internal/telephony/imsphone/ImsPhoneMmiCode.java +18 −20 Original line number Diff line number Diff line Loading @@ -940,24 +940,23 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { if (isActivate() && !mPhone.getDefaultPhone().isClirActivationAndDeactivationPrevented()) { try { mPhone.mCT.getUtInterface().updateCLIR(CommandsInterface.CLIR_INVOCATION, mPhone.setOutgoingCallerIdDisplay(CommandsInterface.CLIR_INVOCATION, obtainMessage(EVENT_SET_COMPLETE, this)); } catch (ImsException e) { } catch (Exception e) { Rlog.d(LOG_TAG, "processCode: Could not get UT handle for updateCLIR."); } } else if (isDeactivate() && !mPhone.getDefaultPhone().isClirActivationAndDeactivationPrevented()) { try { mPhone.mCT.getUtInterface().updateCLIR(CommandsInterface.CLIR_SUPPRESSION, mPhone.setOutgoingCallerIdDisplay(CommandsInterface.CLIR_SUPPRESSION, obtainMessage(EVENT_SET_COMPLETE, this)); } catch (ImsException e) { } catch (Exception e) { Rlog.d(LOG_TAG, "processCode: Could not get UT handle for updateCLIR."); } } else if (isInterrogate()) { try { mPhone.mCT.getUtInterface() .queryCLIR(obtainMessage(EVENT_GET_CLIR_COMPLETE, this)); } catch (ImsException e) { mPhone.getOutgoingCallerIdDisplay(obtainMessage(EVENT_GET_CLIR_COMPLETE, this)); } catch (Exception e) { Rlog.d(LOG_TAG, "processCode: Could not get UT handle for queryCLIR."); } } else { Loading @@ -967,9 +966,8 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { // NOTE: Refer to the note above. if (isInterrogate()) { try { mPhone.mCT.getUtInterface() .queryCLIP(obtainMessage(EVENT_SUPP_SVC_QUERY_COMPLETE, this)); } catch (ImsException e) { mPhone.queryCLIP(obtainMessage(EVENT_SUPP_SVC_QUERY_COMPLETE, this)); } catch (Exception e) { Rlog.d(LOG_TAG, "processCode: Could not get UT handle for queryCLIP."); } } else if (isActivate() || isDeactivate()) { Loading Loading @@ -1592,8 +1590,9 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { } } else { Rlog.d(LOG_TAG, "onSuppSvcQueryComplete: Received Call Barring Response."); // Response for Call Barring queries. Rlog.d(LOG_TAG, "onSuppSvcQueryComplete: Received Call Barring/CSFB CLIP Response."); // Response for Call Barring and CSFB CLIP queries. int[] infos = (int[]) ar.result; if (infos == null || infos.length == 0) { sb.append(mContext.getText(com.android.internal.R.string.mmiError)); Loading Loading @@ -1671,14 +1670,14 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { sb.append(getErrorMessage(ar)); } } else { ImsSsInfo ssInfo = (ImsSsInfo) ar.result; int[] clirInfo = (int[]) ar.result; // ssInfo.getClirOutgoingState() = The 'n' parameter from TS 27.007 7.7 // ssInfo.getClirInterrogationStatus() = The 'm' parameter from TS 27.007 7.7 Rlog.d(LOG_TAG, "onQueryClirComplete: CLIR param n=" + ssInfo.getClirOutgoingState() + " m=" + ssInfo.getClirInterrogationStatus()); Rlog.d(LOG_TAG, "onQueryClirComplete: CLIR param n=" + clirInfo[0] + " m=" + clirInfo[1]); // 'm' parameter. switch (ssInfo.getClirInterrogationStatus()) { switch (clirInfo[1]) { case ImsSsInfo.CLIR_STATUS_NOT_PROVISIONED: sb.append(mContext.getText( com.android.internal.R.string.serviceNotProvisioned)); Loading @@ -1691,7 +1690,7 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { break; case ImsSsInfo.CLIR_STATUS_TEMPORARILY_RESTRICTED: // 'n' parameter. switch (ssInfo.getClirOutgoingState()) { switch (clirInfo[0]) { case ImsSsInfo.CLIR_OUTGOING_DEFAULT: sb.append(mContext.getText( com.android.internal.R.string.CLIRDefaultOnNextCallOn)); Loading @@ -1715,7 +1714,7 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { break; case ImsSsInfo.CLIR_STATUS_TEMPORARILY_ALLOWED: // 'n' parameter. switch (ssInfo.getClirOutgoingState()) { switch (clirInfo[0]) { case ImsSsInfo.CLIR_OUTGOING_DEFAULT: sb.append(mContext.getText( com.android.internal.R.string.CLIRDefaultOffNextCallOff)); Loading Loading @@ -1874,8 +1873,7 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode { case ImsSsData.SS_INTERROGATION: if (ssData.isTypeClir()) { Rlog.d(LOG_TAG, "CLIR INTERROGATION"); ImsSsInfo clirInfo = ssData.getSuppServiceInfo().get(0); onQueryClirComplete(new AsyncResult(null, clirInfo, ex)); onQueryClirComplete(new AsyncResult(null, ssData.getSuppServiceInfoCompat(), ex)); } else if (ssData.isTypeCF()) { Rlog.d(LOG_TAG, "CALL FORWARD INTERROGATION"); // Have to translate to an array, since the modem still returns it in the Loading