Loading src/java/com/android/internal/telephony/CallTracker.java +1 −0 Original line number Diff line number Diff line Loading @@ -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_CDMA_INFO_REC = 17; protected void pollCallsWhenSafe() { mNeedsPoll = true; Loading src/java/com/android/internal/telephony/cdma/CdmaCallTracker.java +16 −0 Original line number Diff line number Diff line Loading @@ -100,10 +100,22 @@ public final class CdmaCallTracker extends CallTracker { mCi.registerForOn(this, EVENT_RADIO_AVAILABLE, null); mCi.registerForNotAvailable(this, EVENT_RADIO_NOT_AVAILABLE, null); mCi.registerForCallWaitingInfo(this, EVENT_CALL_WAITING_INFO_CDMA, null); mCi.registerForLineControlInfo(this, EVENT_CDMA_INFO_REC, null); mForegroundCall.setGeneric(false); } private void onControlInfoRec() { if (mState == PhoneConstants.State.OFFHOOK) { Rlog.d(LOG_TAG, "on accepted, reset connection time"); CdmaConnection c = (CdmaConnection) mForegroundCall.getLatestConnection(); if (c.getDurationMillis() > 0 && !c.isConnectionTimerReset() && !c.isIncoming()) { c.resetConnectionTimer(); } } } public void dispose() { mCi.unregisterForLineControlInfo(this); mCi.unregisterForCallStateChanged(this); mCi.unregisterForOn(this); mCi.unregisterForNotAvailable(this); Loading Loading @@ -1030,6 +1042,10 @@ public final class CdmaCallTracker extends CallTracker { } break; case EVENT_CDMA_INFO_REC: onControlInfoRec(); break; default:{ throw new RuntimeException("unexpected event not handled"); } Loading src/java/com/android/internal/telephony/cdma/CdmaConnection.java 100755 → 100644 +14 −0 Original line number Diff line number Diff line Loading @@ -93,6 +93,8 @@ public class CdmaConnection extends Connection { static final int WAKE_LOCK_TIMEOUT_MILLIS = 60*1000; static final int PAUSE_DELAY_MILLIS = 2 * 1000; private boolean mConnTimerReset = false; //***** Inner Classes class MyHandler extends Handler { Loading Loading @@ -957,4 +959,16 @@ public class CdmaConnection extends Connection { // UUS information not supported in CDMA return null; } void resetConnectionTimer() { mConnectTime = System.currentTimeMillis(); mConnectTimeReal = SystemClock.elapsedRealtime(); mDuration = 0; mConnTimerReset = true; log("CdmaConnection time reseted"); } public boolean isConnectionTimerReset() { return mConnTimerReset; } } Loading
src/java/com/android/internal/telephony/CallTracker.java +1 −0 Original line number Diff line number Diff line Loading @@ -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_CDMA_INFO_REC = 17; protected void pollCallsWhenSafe() { mNeedsPoll = true; Loading
src/java/com/android/internal/telephony/cdma/CdmaCallTracker.java +16 −0 Original line number Diff line number Diff line Loading @@ -100,10 +100,22 @@ public final class CdmaCallTracker extends CallTracker { mCi.registerForOn(this, EVENT_RADIO_AVAILABLE, null); mCi.registerForNotAvailable(this, EVENT_RADIO_NOT_AVAILABLE, null); mCi.registerForCallWaitingInfo(this, EVENT_CALL_WAITING_INFO_CDMA, null); mCi.registerForLineControlInfo(this, EVENT_CDMA_INFO_REC, null); mForegroundCall.setGeneric(false); } private void onControlInfoRec() { if (mState == PhoneConstants.State.OFFHOOK) { Rlog.d(LOG_TAG, "on accepted, reset connection time"); CdmaConnection c = (CdmaConnection) mForegroundCall.getLatestConnection(); if (c.getDurationMillis() > 0 && !c.isConnectionTimerReset() && !c.isIncoming()) { c.resetConnectionTimer(); } } } public void dispose() { mCi.unregisterForLineControlInfo(this); mCi.unregisterForCallStateChanged(this); mCi.unregisterForOn(this); mCi.unregisterForNotAvailable(this); Loading Loading @@ -1030,6 +1042,10 @@ public final class CdmaCallTracker extends CallTracker { } break; case EVENT_CDMA_INFO_REC: onControlInfoRec(); break; default:{ throw new RuntimeException("unexpected event not handled"); } Loading
src/java/com/android/internal/telephony/cdma/CdmaConnection.java 100755 → 100644 +14 −0 Original line number Diff line number Diff line Loading @@ -93,6 +93,8 @@ public class CdmaConnection extends Connection { static final int WAKE_LOCK_TIMEOUT_MILLIS = 60*1000; static final int PAUSE_DELAY_MILLIS = 2 * 1000; private boolean mConnTimerReset = false; //***** Inner Classes class MyHandler extends Handler { Loading Loading @@ -957,4 +959,16 @@ public class CdmaConnection extends Connection { // UUS information not supported in CDMA return null; } void resetConnectionTimer() { mConnectTime = System.currentTimeMillis(); mConnectTimeReal = SystemClock.elapsedRealtime(); mDuration = 0; mConnTimerReset = true; log("CdmaConnection time reseted"); } public boolean isConnectionTimerReset() { return mConnTimerReset; } }