Loading src/java/com/android/internal/telephony/gsm/GsmCallTracker.java +3 −3 Original line number Diff line number Diff line Loading @@ -219,7 +219,7 @@ public final class GsmCallTracker extends CallTracker { throw new CallStateException("cannot dial in current state"); } mPendingMO = new GsmConnection(mPhone.getContext(), checkForTestEmergencyNumber(dialString), mPendingMO = new GsmConnection(mPhone, checkForTestEmergencyNumber(dialString), this, mForegroundCall); mHangupPendingMO = false; Loading Loading @@ -510,7 +510,7 @@ public final class GsmCallTracker extends CallTracker { return; } } else { mConnections[i] = new GsmConnection(mPhone.getContext(), dc, this, i); mConnections[i] = new GsmConnection(mPhone, dc, this, i); Connection hoConnection = getHoConnection(dc); if (hoConnection != null) { Loading Loading @@ -575,7 +575,7 @@ public final class GsmCallTracker extends CallTracker { // we were tracking. Assume dropped call and new call mDroppedDuringPoll.add(conn); mConnections[i] = new GsmConnection (mPhone.getContext(), dc, this, i); mConnections[i] = new GsmConnection (mPhone, dc, this, i); if (mConnections[i].getCall() == mRingingCall) { newRinging = mConnections[i]; Loading src/java/com/android/internal/telephony/gsm/GsmConnection.java +30 −5 Original line number Diff line number Diff line Loading @@ -20,9 +20,11 @@ import android.os.AsyncResult; import android.os.Handler; import android.os.Looper; import android.os.Message; import android.os.PersistableBundle; import android.os.PowerManager; import android.os.Registrant; import android.os.SystemClock; import android.telephony.CarrierConfigManager; import android.telephony.DisconnectCause; import android.telephony.Rlog; import android.telephony.PhoneNumberUtils; Loading Loading @@ -72,11 +74,15 @@ public class GsmConnection extends Connection { private PowerManager.WakeLock mPartialWakeLock; // The cached delay to be used between DTMF tones fetched from carrier config. private int mDtmfToneDelay = 0; //***** Event Constants static final int EVENT_DTMF_DONE = 1; static final int EVENT_PAUSE_DONE = 2; static final int EVENT_NEXT_POST_DIAL = 3; static final int EVENT_WAKE_LOCK_TIMEOUT = 4; static final int EVENT_DTMF_DELAY_DONE = 5; //***** Constants static final int PAUSE_DELAY_MILLIS = 3 * 1000; Loading @@ -93,13 +99,19 @@ public class GsmConnection extends Connection { switch (msg.what) { case EVENT_NEXT_POST_DIAL: case EVENT_DTMF_DONE: case EVENT_DTMF_DELAY_DONE: case EVENT_PAUSE_DONE: processNextPostDialChar(); break; case EVENT_WAKE_LOCK_TIMEOUT: releaseWakeLock(); break; case EVENT_DTMF_DONE: // We may need to add a delay specified by carrier between DTMF tones that are // sent out. mHandler.sendMessageDelayed(mHandler.obtainMessage(EVENT_DTMF_DELAY_DONE), mDtmfToneDelay); break; } } } Loading @@ -108,8 +120,8 @@ public class GsmConnection extends Connection { /** This is probably an MT call that we first saw in a CLCC response */ /*package*/ GsmConnection (Context context, DriverCall dc, GsmCallTracker ct, int index) { createWakeLock(context); GsmConnection (GSMPhone phone, DriverCall dc, GsmCallTracker ct, int index) { createWakeLock(phone.getContext()); acquireWakeLock(); mOwner = ct; Loading @@ -128,12 +140,14 @@ public class GsmConnection extends Connection { mParent = parentFromDCState (dc.state); mParent.attach(this, dc); fetchDtmfToneDelay(phone); } /** This is an MO call, created when dialing */ /*package*/ GsmConnection (Context context, String dialString, GsmCallTracker ct, GsmCall parent) { createWakeLock(context); GsmConnection (GSMPhone phone, String dialString, GsmCallTracker ct, GsmCall parent) { createWakeLock(phone.getContext()); acquireWakeLock(); mOwner = ct; Loading @@ -154,6 +168,8 @@ public class GsmConnection extends Connection { mParent = parent; parent.attachFake(this, GsmCall.State.DIALING); fetchDtmfToneDelay(phone); } public void dispose() { Loading Loading @@ -751,6 +767,15 @@ public class GsmConnection extends Connection { } } private void fetchDtmfToneDelay(GSMPhone phone) { CarrierConfigManager configMgr = (CarrierConfigManager) phone.getContext().getSystemService(Context.CARRIER_CONFIG_SERVICE); PersistableBundle b = configMgr.getConfigForSubId(phone.getSubId()); if (b != null) { mDtmfToneDelay = b.getInt(CarrierConfigManager.KEY_GSM_DTMF_TONE_DELAY_INT); } } private void log(String msg) { Rlog.d(LOG_TAG, "[GSMConn] " + msg); } Loading Loading
src/java/com/android/internal/telephony/gsm/GsmCallTracker.java +3 −3 Original line number Diff line number Diff line Loading @@ -219,7 +219,7 @@ public final class GsmCallTracker extends CallTracker { throw new CallStateException("cannot dial in current state"); } mPendingMO = new GsmConnection(mPhone.getContext(), checkForTestEmergencyNumber(dialString), mPendingMO = new GsmConnection(mPhone, checkForTestEmergencyNumber(dialString), this, mForegroundCall); mHangupPendingMO = false; Loading Loading @@ -510,7 +510,7 @@ public final class GsmCallTracker extends CallTracker { return; } } else { mConnections[i] = new GsmConnection(mPhone.getContext(), dc, this, i); mConnections[i] = new GsmConnection(mPhone, dc, this, i); Connection hoConnection = getHoConnection(dc); if (hoConnection != null) { Loading Loading @@ -575,7 +575,7 @@ public final class GsmCallTracker extends CallTracker { // we were tracking. Assume dropped call and new call mDroppedDuringPoll.add(conn); mConnections[i] = new GsmConnection (mPhone.getContext(), dc, this, i); mConnections[i] = new GsmConnection (mPhone, dc, this, i); if (mConnections[i].getCall() == mRingingCall) { newRinging = mConnections[i]; Loading
src/java/com/android/internal/telephony/gsm/GsmConnection.java +30 −5 Original line number Diff line number Diff line Loading @@ -20,9 +20,11 @@ import android.os.AsyncResult; import android.os.Handler; import android.os.Looper; import android.os.Message; import android.os.PersistableBundle; import android.os.PowerManager; import android.os.Registrant; import android.os.SystemClock; import android.telephony.CarrierConfigManager; import android.telephony.DisconnectCause; import android.telephony.Rlog; import android.telephony.PhoneNumberUtils; Loading Loading @@ -72,11 +74,15 @@ public class GsmConnection extends Connection { private PowerManager.WakeLock mPartialWakeLock; // The cached delay to be used between DTMF tones fetched from carrier config. private int mDtmfToneDelay = 0; //***** Event Constants static final int EVENT_DTMF_DONE = 1; static final int EVENT_PAUSE_DONE = 2; static final int EVENT_NEXT_POST_DIAL = 3; static final int EVENT_WAKE_LOCK_TIMEOUT = 4; static final int EVENT_DTMF_DELAY_DONE = 5; //***** Constants static final int PAUSE_DELAY_MILLIS = 3 * 1000; Loading @@ -93,13 +99,19 @@ public class GsmConnection extends Connection { switch (msg.what) { case EVENT_NEXT_POST_DIAL: case EVENT_DTMF_DONE: case EVENT_DTMF_DELAY_DONE: case EVENT_PAUSE_DONE: processNextPostDialChar(); break; case EVENT_WAKE_LOCK_TIMEOUT: releaseWakeLock(); break; case EVENT_DTMF_DONE: // We may need to add a delay specified by carrier between DTMF tones that are // sent out. mHandler.sendMessageDelayed(mHandler.obtainMessage(EVENT_DTMF_DELAY_DONE), mDtmfToneDelay); break; } } } Loading @@ -108,8 +120,8 @@ public class GsmConnection extends Connection { /** This is probably an MT call that we first saw in a CLCC response */ /*package*/ GsmConnection (Context context, DriverCall dc, GsmCallTracker ct, int index) { createWakeLock(context); GsmConnection (GSMPhone phone, DriverCall dc, GsmCallTracker ct, int index) { createWakeLock(phone.getContext()); acquireWakeLock(); mOwner = ct; Loading @@ -128,12 +140,14 @@ public class GsmConnection extends Connection { mParent = parentFromDCState (dc.state); mParent.attach(this, dc); fetchDtmfToneDelay(phone); } /** This is an MO call, created when dialing */ /*package*/ GsmConnection (Context context, String dialString, GsmCallTracker ct, GsmCall parent) { createWakeLock(context); GsmConnection (GSMPhone phone, String dialString, GsmCallTracker ct, GsmCall parent) { createWakeLock(phone.getContext()); acquireWakeLock(); mOwner = ct; Loading @@ -154,6 +168,8 @@ public class GsmConnection extends Connection { mParent = parent; parent.attachFake(this, GsmCall.State.DIALING); fetchDtmfToneDelay(phone); } public void dispose() { Loading Loading @@ -751,6 +767,15 @@ public class GsmConnection extends Connection { } } private void fetchDtmfToneDelay(GSMPhone phone) { CarrierConfigManager configMgr = (CarrierConfigManager) phone.getContext().getSystemService(Context.CARRIER_CONFIG_SERVICE); PersistableBundle b = configMgr.getConfigForSubId(phone.getSubId()); if (b != null) { mDtmfToneDelay = b.getInt(CarrierConfigManager.KEY_GSM_DTMF_TONE_DELAY_INT); } } private void log(String msg) { Rlog.d(LOG_TAG, "[GSMConn] " + msg); } Loading