diff options
author | Sailesh Nepal <sail@google.com> | 2014-04-01 11:48:07 -0700 |
---|---|---|
committer | Sailesh Nepal <sail@google.com> | 2014-04-01 13:58:52 -0700 |
commit | 248a6687e8075e9730217be73c54ee4f95501a0e (patch) | |
tree | 4f8ec9114772499c8431c10613212ae1e53c5128 /InCallUI/src/com/android/incallui/DialpadPresenter.java | |
parent | d11c7a03578697637f97e26758ac5bd96c85e967 (diff) |
InCallUI - Use custom object to track Calls
This is the first step in completely moving away from Telephony.
This CL creates a custom Call object. Currently this is just a
copy of the telephony Call object. I'll update various fields
in individual CLs.
This CL also deletes the old Telephony services.
Bug: 13643568
Change-Id: Id1860a5df9706f2a7fddd40e70f0d693af7b04bd
Diffstat (limited to 'InCallUI/src/com/android/incallui/DialpadPresenter.java')
-rw-r--r-- | InCallUI/src/com/android/incallui/DialpadPresenter.java | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/InCallUI/src/com/android/incallui/DialpadPresenter.java b/InCallUI/src/com/android/incallui/DialpadPresenter.java index e426a6a18..53a21d090 100644 --- a/InCallUI/src/com/android/incallui/DialpadPresenter.java +++ b/InCallUI/src/com/android/incallui/DialpadPresenter.java @@ -19,8 +19,6 @@ package com.android.incallui; import android.telecomm.InCallAdapter; import android.telephony.PhoneNumberUtils; -import com.android.services.telephony.common.Call; - /** * Logic for call buttons. */ @@ -50,17 +48,12 @@ public class DialpadPresenter extends Presenter<DialpadPresenter.DialpadUi> Log.d(this, "Processing dtmf key " + c); // if it is a valid key, then update the display and send the dtmf tone. if (PhoneNumberUtils.is12Key(c) && mCall != null) { - // Plays the tone through Telecomm - InCallAdapter telecommAdapter = InCallPresenter.getInstance().getTelecommAdapter(); - if (telecommAdapter != null) { - String callId = CallInfoTranslator.getTelecommCallId(mCall); - if (callId != null) { - Log.d(this, "updating display and sending dtmf tone for '" + c + "'"); - // Append this key to the "digits" widget. - getUi().appendDigitsToField(c); - telecommAdapter.playDtmfTone(callId, c); - } - } + Log.d(this, "updating display and sending dtmf tone for '" + c + "'"); + + // Append this key to the "digits" widget. + getUi().appendDigitsToField(c); + // Plays the tone through Telecomm. + TelecommAdapter.getInstance().playDtmfTone(mCall.getCallId(), c); } else { Log.d(this, "ignoring dtmf request for '" + c + "'"); } @@ -72,14 +65,7 @@ public class DialpadPresenter extends Presenter<DialpadPresenter.DialpadUi> public void stopTone() { if (mCall != null) { Log.d(this, "stopping remote tone"); - InCallAdapter telecommAdapter = InCallPresenter.getInstance().getTelecommAdapter(); - if (telecommAdapter != null) { - String callId = CallInfoTranslator.getTelecommCallId(mCall); - if (callId != null) { - Log.d(this, "stopping remote tone: " + callId); - telecommAdapter.stopDtmfTone(callId); - } - } + TelecommAdapter.getInstance().stopDtmfTone(mCall.getCallId()); } } |