Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bb097a7b authored by Jing Zhao's avatar Jing Zhao Committed by Vineeta Srivastava
Browse files

Send empty flash for some CDMA carriers for 3way call

Some carrier need a empty flash before the normal one to connect the 3way call

Bug: 17331584
Change-Id: Ie8f774de909056e398972ea460029d903f059fec
parent 946ef717
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -62,6 +62,7 @@ public abstract class CallTracker extends Handler {
    protected static final int EVENT_EXIT_ECM_RESPONSE_CDMA        = 14;
    protected static final int EVENT_CALL_WAITING_INFO_CDMA        = 15;
    protected static final int EVENT_THREE_WAY_DIAL_L2_RESULT_CDMA = 16;
    protected static final int EVENT_THREE_WAY_DIAL_BLANK_FLASH    = 20;

    protected void pollCallsWhenSafe() {
        mNeedsPoll = true;
+28 −2
Original line number Diff line number Diff line
@@ -88,6 +88,7 @@ public final class CdmaCallTracker extends CallTracker {

    private boolean mIsEcmTimerCanceled = false;

    private int m3WayCallFlashDelay = 0;
//    boolean needsPoll;


@@ -244,8 +245,15 @@ public final class CdmaCallTracker extends CallTracker {
            // Attach the new connection to foregroundCall
            mPendingMO = new CdmaConnection(mPhone.getContext(),
                                checkForTestEmergencyNumber(dialString), this, mForegroundCall);
            // Some network need a empty flash before sending the normal one
            m3WayCallFlashDelay = mPhone.getContext().getResources()
                    .getInteger(com.android.internal.R.integer.config_cdma_3waycall_flash_delay);
            if (m3WayCallFlashDelay > 0) {
                mCi.sendCDMAFeatureCode("", obtainMessage(EVENT_THREE_WAY_DIAL_BLANK_FLASH));
            } else {
                mCi.sendCDMAFeatureCode(mPendingMO.getAddress(),
                        obtainMessage(EVENT_THREE_WAY_DIAL_L2_RESULT_CDMA));
            }
            return mPendingMO;
        }
        return null;
@@ -1021,6 +1029,24 @@ public final class CdmaCallTracker extends CallTracker {
                }
            break;

            case EVENT_THREE_WAY_DIAL_BLANK_FLASH:
                ar = (AsyncResult) msg.obj;
                if (ar.exception == null) {
                    postDelayed(
                            new Runnable() {
                                public void run() {
                                    if (mPendingMO != null) {
                                        mCi.sendCDMAFeatureCode(mPendingMO.getAddress(),
                                                obtainMessage(EVENT_THREE_WAY_DIAL_L2_RESULT_CDMA));
                                    }
                                }
                            }, m3WayCallFlashDelay);
                } else {
                    mPendingMO = null;
                    Rlog.w(LOG_TAG, "exception happened on Blank Flash for 3-way call");
                }
            break;

            default:{
               throw new RuntimeException("unexpected event not handled");
            }