summaryrefslogtreecommitdiffstats
path: root/telecomm/java/android/telecom/Conference.java
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2014-09-15 19:18:13 -0700
committerYorke Lee <yorkelee@google.com>2014-09-15 19:18:13 -0700
commita0d3ca9746143d669fe9384babb9e1b9fca33dcf (patch)
tree2b83ccfd205073bc0c87612865af2cd6c4fc1eb0 /telecomm/java/android/telecom/Conference.java
parentbd9d66474353f411dd2167d4216a46a547b7221d (diff)
downloadframeworks_base-a0d3ca9746143d669fe9384babb9e1b9fca33dcf.zip
frameworks_base-a0d3ca9746143d669fe9384babb9e1b9fca33dcf.tar.gz
frameworks_base-a0d3ca9746143d669fe9384babb9e1b9fca33dcf.tar.bz2
Add missing methods to Conference object
Add setAudioState, onPlayDtmf and onStopDtmf to the conference object. This fixes DTMF tones for conference calls. Bug: 17512380 Change-Id: Ice9403d3d750131f077a3ea129b7f67430c68348
Diffstat (limited to 'telecomm/java/android/telecom/Conference.java')
-rw-r--r--telecomm/java/android/telecom/Conference.java41
1 files changed, 41 insertions, 0 deletions
diff --git a/telecomm/java/android/telecom/Conference.java b/telecomm/java/android/telecom/Conference.java
index ca85446..7c553e2 100644
--- a/telecomm/java/android/telecom/Conference.java
+++ b/telecomm/java/android/telecom/Conference.java
@@ -45,6 +45,7 @@ public abstract class Conference {
Collections.unmodifiableList(mChildConnections);
private PhoneAccountHandle mPhoneAccount;
+ private AudioState mAudioState;
private int mState = Connection.STATE_NEW;
private int mDisconnectCause = DisconnectCause.NOT_VALID;
private int mCapabilities;
@@ -96,6 +97,15 @@ public abstract class Conference {
}
/**
+ * @return The audio state of the conference, describing how its audio is currently
+ * being routed by the system. This is {@code null} if this Conference
+ * does not directly know about its audio state.
+ */
+ public final AudioState getAudioState() {
+ return mAudioState;
+ }
+
+ /**
* Invoked when the Conference and all it's {@link Connection}s should be disconnected.
*/
public void onDisconnect() {}
@@ -130,6 +140,25 @@ public abstract class Conference {
public void onSwap() {}
/**
+ * Notifies this conference of a request to play a DTMF tone.
+ *
+ * @param c A DTMF character.
+ */
+ public void onPlayDtmfTone(char c) {}
+
+ /**
+ * Notifies this conference of a request to stop any currently playing DTMF tones.
+ */
+ public void onStopDtmfTone() {}
+
+ /**
+ * Notifies this conference that the {@link #getAudioState()} property has a new value.
+ *
+ * @param state The new call audio state.
+ */
+ public void onAudioStateChanged(AudioState state) {}
+
+ /**
* Sets state to be on hold.
*/
public final void setOnHold() {
@@ -255,6 +284,18 @@ public abstract class Conference {
return this;
}
+ /**
+ * Inform this Conference that the state of its audio output has been changed externally.
+ *
+ * @param state The new audio state.
+ * @hide
+ */
+ final void setAudioState(AudioState state) {
+ Log.d(this, "setAudioState %s", state);
+ mAudioState = state;
+ onAudioStateChanged(state);
+ }
+
private void setState(int newState) {
if (newState != Connection.STATE_ACTIVE &&
newState != Connection.STATE_HOLDING &&