Loading src/java/com/android/internal/telephony/GsmCdmaPhone.java +12 −16 Original line number Diff line number Diff line Loading @@ -2797,9 +2797,8 @@ public class GsmCdmaPhone extends Phone { 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) { if (ar.exception == null) { setVoiceCallForwardingFlag(1, msg.arg1 == 1, cfu.mSetCfNumber); } if (cfu.mOnComplete != null) { Loading Loading @@ -3137,8 +3136,6 @@ public class GsmCdmaPhone extends Phone { } private void handleCfuQueryResult(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 Loading @@ -3154,7 +3151,6 @@ public class GsmCdmaPhone extends Phone { } } } } /** * Retrieves the IccPhoneBookInterfaceManager of the GsmCdmaPhone Loading src/java/com/android/internal/telephony/Phone.java +7 −3 Original line number Diff line number Diff line Loading @@ -1968,10 +1968,11 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { public void setVoiceCallForwardingFlag(int line, boolean enable, String number) { setCallForwardingIndicatorInSharedPref(enable); IccRecords r = mIccRecords.get(); IccRecords r = getIccRecords(); if (r != null) { r.setVoiceCallForwardingFlag(line, enable, number); } notifyCallForwardingIndicator(); } /** Loading @@ -1985,8 +1986,11 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { public void setVoiceCallForwardingFlag(IccRecords r, int line, boolean enable, String number) { setCallForwardingIndicatorInSharedPref(enable); if (r != null) { r.setVoiceCallForwardingFlag(line, enable, number); } notifyCallForwardingIndicator(); } /** * Get voice call forwarding indicator status. No change notification Loading @@ -1999,7 +2003,7 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { Rlog.e(LOG_TAG, "getCallForwardingIndicator: not possible in CDMA"); return false; } IccRecords r = mIccRecords.get(); IccRecords r = getIccRecords(); int callForwardingIndicator = IccRecords.CALL_FORWARDING_STATUS_UNKNOWN; if (r != null) { callForwardingIndicator = r.getVoiceCallForwardingFlag(); Loading src/java/com/android/internal/telephony/gsm/GsmMmiCode.java +5 −16 Original line number Diff line number Diff line Loading @@ -380,12 +380,7 @@ public final class GsmMmiCode extends Handler implements MmiCode { isServiceClassVoiceorNone(ssData.serviceClass)); Rlog.d(LOG_TAG, "setVoiceCallForwardingFlag cffEnabled: " + cffEnabled); if (mIccRecords != null) { mPhone.setVoiceCallForwardingFlag(1, cffEnabled, null); Rlog.d(LOG_TAG, "setVoiceCallForwardingFlag done from SS Info."); } else { Rlog.e(LOG_TAG, "setVoiceCallForwardingFlag aborted. sim records is null."); } } onSetComplete(null, new AsyncResult(null, ssData.cfInfo, ex)); break; Loading Loading @@ -1209,10 +1204,8 @@ public final class GsmMmiCode extends Handler implements MmiCode { */ if ((ar.exception == null) && (msg.arg1 == 1)) { boolean cffEnabled = (msg.arg2 == 1); if (mIccRecords != null) { mPhone.setVoiceCallForwardingFlag(1, cffEnabled, mDialingNumber); } } onSetComplete(msg, ar); break; Loading Loading @@ -1585,10 +1578,8 @@ public final class GsmMmiCode extends Handler implements MmiCode { (info.serviceClass & serviceClassMask) == CommandsInterface.SERVICE_CLASS_VOICE) { boolean cffEnabled = (info.status == 1); if (mIccRecords != null) { mPhone.setVoiceCallForwardingFlag(1, cffEnabled, info.number); } } return TextUtils.replace(template, sources, destinations); } Loading @@ -1614,14 +1605,12 @@ public final class GsmMmiCode extends Handler implements MmiCode { infos = (CallForwardInfo[]) ar.result; if (infos.length == 0) { if (infos == null || infos.length == 0) { // Assume the default is not active sb.append(mContext.getText(com.android.internal.R.string.serviceDisabled)); // Set unconditional CFF in SIM to false if (mIccRecords != null) { mPhone.setVoiceCallForwardingFlag(1, false, null); } } else { SpannableStringBuilder tb = new SpannableStringBuilder(); Loading src/java/com/android/internal/telephony/imsphone/ImsPhone.java +11 −13 Original line number Diff line number Diff line Loading @@ -1569,21 +1569,16 @@ public class ImsPhone extends ImsPhoneBase { cfInfos = new CallForwardInfo[infos.length]; } IccRecords r = mDefaultPhone.getIccRecords(); if (infos == null || infos.length == 0) { if (r != null) { // Assume the default is not active // Set unconditional CFF in SIM to false setVoiceCallForwardingFlag(r, 1, false, null); } setVoiceCallForwardingFlag(getIccRecords(), 1, false, null); } else { for (int i = 0, s = infos.length; i < s; i++) { if (infos[i].getCondition() == ImsUtInterface.CDIV_CF_UNCONDITIONAL) { if (r != null) { setVoiceCallForwardingFlag(r, 1, (infos[i].getStatus() == 1), setVoiceCallForwardingFlag(getIccRecords(), 1, (infos[i].getStatus() == 1), infos[i].getNumber()); } } cfInfos[i] = getCallForwardInfo(infos[i]); } } Loading Loading @@ -1649,10 +1644,9 @@ public class ImsPhone extends ImsPhoneBase { if (DBG) logd("handleMessage what=" + msg.what); switch (msg.what) { case EVENT_SET_CALL_FORWARD_DONE: IccRecords r = mDefaultPhone.getIccRecords(); Cf cf = (Cf) ar.userObj; if (cf.mIsCfu && ar.exception == null && r != null) { setVoiceCallForwardingFlag(r, 1, msg.arg1 == 1, cf.mSetCfNumber); if (cf.mIsCfu && ar.exception == null) { setVoiceCallForwardingFlag(getIccRecords(), 1, msg.arg1 == 1, cf.mSetCfNumber); } sendResponse(cf.mOnComplete, null, ar.exception); break; Loading Loading @@ -2291,6 +2285,10 @@ public class ImsPhone extends ImsPhoneBase { } }; public IccRecords getIccRecords() { return mDefaultPhone.getIccRecords(); } @Override public void dump(FileDescriptor fd, PrintWriter printWriter, String[] args) { IndentingPrintWriter pw = new IndentingPrintWriter(printWriter, " "); Loading src/java/com/android/internal/telephony/imsphone/ImsPhoneBase.java +0 −5 Original line number Diff line number Diff line Loading @@ -167,11 +167,6 @@ abstract class ImsPhoneBase extends Phone { return false; } @Override public boolean getCallForwardingIndicator() { return false; } @Override public List<? extends MmiCode> getPendingMmiCodes() { return new ArrayList<MmiCode>(0); Loading Loading
src/java/com/android/internal/telephony/GsmCdmaPhone.java +12 −16 Original line number Diff line number Diff line Loading @@ -2797,9 +2797,8 @@ public class GsmCdmaPhone extends Phone { 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) { if (ar.exception == null) { setVoiceCallForwardingFlag(1, msg.arg1 == 1, cfu.mSetCfNumber); } if (cfu.mOnComplete != null) { Loading Loading @@ -3137,8 +3136,6 @@ public class GsmCdmaPhone extends Phone { } private void handleCfuQueryResult(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 Loading @@ -3154,7 +3151,6 @@ public class GsmCdmaPhone extends Phone { } } } } /** * Retrieves the IccPhoneBookInterfaceManager of the GsmCdmaPhone Loading
src/java/com/android/internal/telephony/Phone.java +7 −3 Original line number Diff line number Diff line Loading @@ -1968,10 +1968,11 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { public void setVoiceCallForwardingFlag(int line, boolean enable, String number) { setCallForwardingIndicatorInSharedPref(enable); IccRecords r = mIccRecords.get(); IccRecords r = getIccRecords(); if (r != null) { r.setVoiceCallForwardingFlag(line, enable, number); } notifyCallForwardingIndicator(); } /** Loading @@ -1985,8 +1986,11 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { public void setVoiceCallForwardingFlag(IccRecords r, int line, boolean enable, String number) { setCallForwardingIndicatorInSharedPref(enable); if (r != null) { r.setVoiceCallForwardingFlag(line, enable, number); } notifyCallForwardingIndicator(); } /** * Get voice call forwarding indicator status. No change notification Loading @@ -1999,7 +2003,7 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { Rlog.e(LOG_TAG, "getCallForwardingIndicator: not possible in CDMA"); return false; } IccRecords r = mIccRecords.get(); IccRecords r = getIccRecords(); int callForwardingIndicator = IccRecords.CALL_FORWARDING_STATUS_UNKNOWN; if (r != null) { callForwardingIndicator = r.getVoiceCallForwardingFlag(); Loading
src/java/com/android/internal/telephony/gsm/GsmMmiCode.java +5 −16 Original line number Diff line number Diff line Loading @@ -380,12 +380,7 @@ public final class GsmMmiCode extends Handler implements MmiCode { isServiceClassVoiceorNone(ssData.serviceClass)); Rlog.d(LOG_TAG, "setVoiceCallForwardingFlag cffEnabled: " + cffEnabled); if (mIccRecords != null) { mPhone.setVoiceCallForwardingFlag(1, cffEnabled, null); Rlog.d(LOG_TAG, "setVoiceCallForwardingFlag done from SS Info."); } else { Rlog.e(LOG_TAG, "setVoiceCallForwardingFlag aborted. sim records is null."); } } onSetComplete(null, new AsyncResult(null, ssData.cfInfo, ex)); break; Loading Loading @@ -1209,10 +1204,8 @@ public final class GsmMmiCode extends Handler implements MmiCode { */ if ((ar.exception == null) && (msg.arg1 == 1)) { boolean cffEnabled = (msg.arg2 == 1); if (mIccRecords != null) { mPhone.setVoiceCallForwardingFlag(1, cffEnabled, mDialingNumber); } } onSetComplete(msg, ar); break; Loading Loading @@ -1585,10 +1578,8 @@ public final class GsmMmiCode extends Handler implements MmiCode { (info.serviceClass & serviceClassMask) == CommandsInterface.SERVICE_CLASS_VOICE) { boolean cffEnabled = (info.status == 1); if (mIccRecords != null) { mPhone.setVoiceCallForwardingFlag(1, cffEnabled, info.number); } } return TextUtils.replace(template, sources, destinations); } Loading @@ -1614,14 +1605,12 @@ public final class GsmMmiCode extends Handler implements MmiCode { infos = (CallForwardInfo[]) ar.result; if (infos.length == 0) { if (infos == null || infos.length == 0) { // Assume the default is not active sb.append(mContext.getText(com.android.internal.R.string.serviceDisabled)); // Set unconditional CFF in SIM to false if (mIccRecords != null) { mPhone.setVoiceCallForwardingFlag(1, false, null); } } else { SpannableStringBuilder tb = new SpannableStringBuilder(); Loading
src/java/com/android/internal/telephony/imsphone/ImsPhone.java +11 −13 Original line number Diff line number Diff line Loading @@ -1569,21 +1569,16 @@ public class ImsPhone extends ImsPhoneBase { cfInfos = new CallForwardInfo[infos.length]; } IccRecords r = mDefaultPhone.getIccRecords(); if (infos == null || infos.length == 0) { if (r != null) { // Assume the default is not active // Set unconditional CFF in SIM to false setVoiceCallForwardingFlag(r, 1, false, null); } setVoiceCallForwardingFlag(getIccRecords(), 1, false, null); } else { for (int i = 0, s = infos.length; i < s; i++) { if (infos[i].getCondition() == ImsUtInterface.CDIV_CF_UNCONDITIONAL) { if (r != null) { setVoiceCallForwardingFlag(r, 1, (infos[i].getStatus() == 1), setVoiceCallForwardingFlag(getIccRecords(), 1, (infos[i].getStatus() == 1), infos[i].getNumber()); } } cfInfos[i] = getCallForwardInfo(infos[i]); } } Loading Loading @@ -1649,10 +1644,9 @@ public class ImsPhone extends ImsPhoneBase { if (DBG) logd("handleMessage what=" + msg.what); switch (msg.what) { case EVENT_SET_CALL_FORWARD_DONE: IccRecords r = mDefaultPhone.getIccRecords(); Cf cf = (Cf) ar.userObj; if (cf.mIsCfu && ar.exception == null && r != null) { setVoiceCallForwardingFlag(r, 1, msg.arg1 == 1, cf.mSetCfNumber); if (cf.mIsCfu && ar.exception == null) { setVoiceCallForwardingFlag(getIccRecords(), 1, msg.arg1 == 1, cf.mSetCfNumber); } sendResponse(cf.mOnComplete, null, ar.exception); break; Loading Loading @@ -2291,6 +2285,10 @@ public class ImsPhone extends ImsPhoneBase { } }; public IccRecords getIccRecords() { return mDefaultPhone.getIccRecords(); } @Override public void dump(FileDescriptor fd, PrintWriter printWriter, String[] args) { IndentingPrintWriter pw = new IndentingPrintWriter(printWriter, " "); Loading
src/java/com/android/internal/telephony/imsphone/ImsPhoneBase.java +0 −5 Original line number Diff line number Diff line Loading @@ -167,11 +167,6 @@ abstract class ImsPhoneBase extends Phone { return false; } @Override public boolean getCallForwardingIndicator() { return false; } @Override public List<? extends MmiCode> getPendingMmiCodes() { return new ArrayList<MmiCode>(0); Loading