java.lang.Object | |
↳ | com.android.phone.DTMFTwelveKeyDialer |
Dialer class that encapsulates the DTMF twelve key behaviour. This model backs up the UI behaviour in DTMFTwelveKeyDialerView.java.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
DTMFTwelveKeyDialer constructor.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Clears out the display of "DTMF digits typed so far" that's kept in
mDialpadDigits.
| |||||||||||
Forces the dialer into the "closed" state.
| |||||||||||
Called externally (from InCallScreen) to play a DTMF Tone.
| |||||||||||
Called externally (from InCallScreen) to cancel the last DTMF Tone played.
| |||||||||||
Implemented for the SlidingDrawer close listener, release the dialer.
| |||||||||||
Implemented for the SlidingDrawer open listener, prepare the dialer.
| |||||||||||
Implements View.OnKeyListener for the DTMF buttons.
| |||||||||||
catch the back and call buttons to return to the in call activity.
| |||||||||||
catch the back and call buttons to return to the in call activity.
| |||||||||||
Implemented for the TouchListener, process the touch events.
| |||||||||||
Forces the dialer into the "open" state.
| |||||||||||
Sets the visibility of the dialpad's onscreen "handle".
| |||||||||||
Allocates some resources we keep around during a "dialer session".
| |||||||||||
Releases resources we keep around during a "dialer session"
(see startDialerSession).
| |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
android.view.View.OnKeyListener
| |||||||||||
From interface
android.view.View.OnTouchListener
| |||||||||||
From interface
android.widget.SlidingDrawer.OnDrawerCloseListener
| |||||||||||
From interface
android.widget.SlidingDrawer.OnDrawerOpenListener
|
DTMFTwelveKeyDialer constructor.
parent | the InCallScreen instance that owns us. |
---|---|
dialerView | the DTMFTwelveKeyDialerView we should use to display the dialpad. |
dialerDrawer | the SlidingDrawer widget that contains dialerView, or null if this device doesn't use a SlidingDrawer as a container for the dialpad. |
Clears out the display of "DTMF digits typed so far" that's kept in mDialpadDigits. The InCallScreen is responsible for calling this method any time a new call becomes active (or, more simply, any time a call ends). This is how we make sure that the "history" of DTMF digits you type doesn't persist from one call to the next. TODO: it might be more elegent if the dialpad itself could remember the call that we're associated with, and clear the digits if the "current call" has changed since last time. (This would require some unique identifier that's different for each call. We can't just use the foreground Call object, since that's a singleton that lasts the whole life of the phone process. Instead, maybe look at the Connection object that comes back from getEarliestConnection()? Or getEarliestConnectTime()?) Or to be even fancier, we could keep a mapping of *multiple* "active calls" to DTMF strings. That way you could have two lines in use and swap calls multiple times, and we'd still remember the digits for each call. (But that's such an obscure use case that it's probably not worth the extra complexity.)
Forces the dialer into the "closed" state. Does nothing if the dialer is already closed.
animate | if true, close the dialer with an animation. |
---|
Called externally (from InCallScreen) to play a DTMF Tone.
Called externally (from InCallScreen) to cancel the last DTMF Tone played.
Implemented for the SlidingDrawer close listener, release the dialer.
Implemented for the SlidingDrawer open listener, prepare the dialer.
Implements View.OnKeyListener for the DTMF buttons. Enables dialing with trackball/dpad.
catch the back and call buttons to return to the in call activity.
catch the back and call buttons to return to the in call activity.
Implemented for the TouchListener, process the touch events.
Forces the dialer into the "open" state. Does nothing if the dialer is already open.
animate | if true, open the dialer with an animation. |
---|
Sets the visibility of the dialpad's onscreen "handle". This has no effect on platforms that don't use a SlidingDrawer as a container for the dialpad.
Allocates some resources we keep around during a "dialer session". (Currently, a "dialer session" just means any situation where we might need to play local DTMF tones, which means that we need to keep a ToneGenerator instance around. A ToneGenerator instance keeps an AudioTrack resource busy in AudioFlinger, so we don't want to keep it around forever.) Call stopDialerSession to release the dialer session resources.
Releases resources we keep around during a "dialer session" (see startDialerSession). It's safe to call this even without a corresponding startDialerSession call.