Loading src/java/com/android/internal/telephony/gsm/GSMPhone.java +15 −0 Original line number Diff line number Diff line Loading @@ -1364,12 +1364,27 @@ public class GSMPhone extends PhoneBase { @Override public void getOutgoingCallerIdDisplay(Message onComplete) { ImsPhone imsPhone = mImsPhone; if ((imsPhone != null) && (imsPhone.getServiceState().getState() == ServiceState.STATE_IN_SERVICE || imsPhone.isUtEnabled())) { imsPhone.getOutgoingCallerIdDisplay(onComplete); return; } mCi.getCLIR(onComplete); } @Override public void setOutgoingCallerIdDisplay(int commandInterfaceCLIRMode, Message onComplete) { ImsPhone imsPhone = mImsPhone; if ((imsPhone != null) && (imsPhone.getServiceState().getState() == ServiceState.STATE_IN_SERVICE || imsPhone.isUtEnabled())) { imsPhone.setOutgoingCallerIdDisplay(commandInterfaceCLIRMode, obtainMessage(EVENT_SET_CLIR_COMPLETE, commandInterfaceCLIRMode, 0, onComplete)); return; } mCi.setCLIR(commandInterfaceCLIRMode, obtainMessage(EVENT_SET_CLIR_COMPLETE, commandInterfaceCLIRMode, 0, onComplete)); } Loading src/java/com/android/internal/telephony/imsphone/ImsPhone.java +39 −0 Original line number Diff line number Diff line Loading @@ -99,6 +99,8 @@ public class ImsPhone extends ImsPhoneBase { protected static final int EVENT_GET_CALL_BARRING_DONE = EVENT_LAST + 2; protected static final int EVENT_SET_CALL_WAITING_DONE = EVENT_LAST + 3; protected static final int EVENT_GET_CALL_WAITING_DONE = EVENT_LAST + 4; protected static final int EVENT_SET_CLIR_DONE = EVENT_LAST + 5; protected static final int EVENT_GET_CLIR_DONE = EVENT_LAST + 6; public static final String CS_FALLBACK = "cs_fallback"; Loading Loading @@ -702,6 +704,33 @@ public class ImsPhone extends ImsPhoneBase { return ImsUtInterface.INVALID; } @Override public void getOutgoingCallerIdDisplay(Message onComplete) { if (DBG) Rlog.d(LOG_TAG, "getCLIR"); Message resp; resp = obtainMessage(EVENT_GET_CLIR_DONE, onComplete); try { ImsUtInterface ut = mCT.getUtInterface(); ut.queryCLIR(resp); } catch (ImsException e) { sendErrorResponse(onComplete, e); } } @Override public void setOutgoingCallerIdDisplay(int clirMode, Message onComplete) { if (DBG) Rlog.d(LOG_TAG, "setCLIR action= " + clirMode); Message resp; resp = obtainMessage(EVENT_SET_CLIR_DONE, onComplete); try { ImsUtInterface ut = mCT.getUtInterface(); ut.updateCLIR(clirMode, resp); } catch (ImsException e) { sendErrorResponse(onComplete, e); } } @Override public void getCallForwardingOption(int commandInterfaceCFReason, Message onComplete) { Loading Loading @@ -1231,6 +1260,16 @@ public class ImsPhone extends ImsPhoneBase { sendResponse((Message) ar.userObj, ssInfos, ar.exception); break; case EVENT_GET_CLIR_DONE: Bundle ssInfo = (Bundle) ar.result; int[] clirInfo = null; if (ssInfo != null) { clirInfo = ssInfo.getIntArray(ImsPhoneMmiCode.UT_BUNDLE_KEY_CLIR); } sendResponse((Message) ar.userObj, clirInfo, ar.exception); break; case EVENT_SET_CLIR_DONE: case EVENT_SET_CALL_BARRING_DONE: case EVENT_SET_CALL_WAITING_DONE: sendResponse((Message) ar.userObj, null, ar.exception); Loading Loading
src/java/com/android/internal/telephony/gsm/GSMPhone.java +15 −0 Original line number Diff line number Diff line Loading @@ -1364,12 +1364,27 @@ public class GSMPhone extends PhoneBase { @Override public void getOutgoingCallerIdDisplay(Message onComplete) { ImsPhone imsPhone = mImsPhone; if ((imsPhone != null) && (imsPhone.getServiceState().getState() == ServiceState.STATE_IN_SERVICE || imsPhone.isUtEnabled())) { imsPhone.getOutgoingCallerIdDisplay(onComplete); return; } mCi.getCLIR(onComplete); } @Override public void setOutgoingCallerIdDisplay(int commandInterfaceCLIRMode, Message onComplete) { ImsPhone imsPhone = mImsPhone; if ((imsPhone != null) && (imsPhone.getServiceState().getState() == ServiceState.STATE_IN_SERVICE || imsPhone.isUtEnabled())) { imsPhone.setOutgoingCallerIdDisplay(commandInterfaceCLIRMode, obtainMessage(EVENT_SET_CLIR_COMPLETE, commandInterfaceCLIRMode, 0, onComplete)); return; } mCi.setCLIR(commandInterfaceCLIRMode, obtainMessage(EVENT_SET_CLIR_COMPLETE, commandInterfaceCLIRMode, 0, onComplete)); } Loading
src/java/com/android/internal/telephony/imsphone/ImsPhone.java +39 −0 Original line number Diff line number Diff line Loading @@ -99,6 +99,8 @@ public class ImsPhone extends ImsPhoneBase { protected static final int EVENT_GET_CALL_BARRING_DONE = EVENT_LAST + 2; protected static final int EVENT_SET_CALL_WAITING_DONE = EVENT_LAST + 3; protected static final int EVENT_GET_CALL_WAITING_DONE = EVENT_LAST + 4; protected static final int EVENT_SET_CLIR_DONE = EVENT_LAST + 5; protected static final int EVENT_GET_CLIR_DONE = EVENT_LAST + 6; public static final String CS_FALLBACK = "cs_fallback"; Loading Loading @@ -702,6 +704,33 @@ public class ImsPhone extends ImsPhoneBase { return ImsUtInterface.INVALID; } @Override public void getOutgoingCallerIdDisplay(Message onComplete) { if (DBG) Rlog.d(LOG_TAG, "getCLIR"); Message resp; resp = obtainMessage(EVENT_GET_CLIR_DONE, onComplete); try { ImsUtInterface ut = mCT.getUtInterface(); ut.queryCLIR(resp); } catch (ImsException e) { sendErrorResponse(onComplete, e); } } @Override public void setOutgoingCallerIdDisplay(int clirMode, Message onComplete) { if (DBG) Rlog.d(LOG_TAG, "setCLIR action= " + clirMode); Message resp; resp = obtainMessage(EVENT_SET_CLIR_DONE, onComplete); try { ImsUtInterface ut = mCT.getUtInterface(); ut.updateCLIR(clirMode, resp); } catch (ImsException e) { sendErrorResponse(onComplete, e); } } @Override public void getCallForwardingOption(int commandInterfaceCFReason, Message onComplete) { Loading Loading @@ -1231,6 +1260,16 @@ public class ImsPhone extends ImsPhoneBase { sendResponse((Message) ar.userObj, ssInfos, ar.exception); break; case EVENT_GET_CLIR_DONE: Bundle ssInfo = (Bundle) ar.result; int[] clirInfo = null; if (ssInfo != null) { clirInfo = ssInfo.getIntArray(ImsPhoneMmiCode.UT_BUNDLE_KEY_CLIR); } sendResponse((Message) ar.userObj, clirInfo, ar.exception); break; case EVENT_SET_CLIR_DONE: case EVENT_SET_CALL_BARRING_DONE: case EVENT_SET_CALL_WAITING_DONE: sendResponse((Message) ar.userObj, null, ar.exception); Loading