diff options
author | Jean-Michel Trivi <jmtrivi@google.com> | 2010-11-17 09:49:23 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-11-17 09:49:23 -0800 |
commit | 05b07fd204cc9cc340dc579db17008bf9e8161fd (patch) | |
tree | 94cb3ddb9cae774750cf40c6d6c58f848e257272 /media/java | |
parent | 1bf397ffbdaae9a5354c9bb0b5121c4a9f1c8c76 (diff) | |
parent | 8f677d66d9c3ba34c97e69b2bb9e161f129af0ee (diff) | |
download | frameworks_base-05b07fd204cc9cc340dc579db17008bf9e8161fd.zip frameworks_base-05b07fd204cc9cc340dc579db17008bf9e8161fd.tar.gz frameworks_base-05b07fd204cc9cc340dc579db17008bf9e8161fd.tar.bz2 |
Merge "Add new audio mode for audio communications other than telelphony."
Diffstat (limited to 'media/java')
-rw-r--r-- | media/java/android/media/AudioManager.java | 11 | ||||
-rw-r--r-- | media/java/android/media/AudioService.java | 3 | ||||
-rw-r--r-- | media/java/android/media/AudioSystem.java | 3 |
3 files changed, 12 insertions, 5 deletions
diff --git a/media/java/android/media/AudioManager.java b/media/java/android/media/AudioManager.java index b84a2c2..def88ae 100644 --- a/media/java/android/media/AudioManager.java +++ b/media/java/android/media/AudioManager.java @@ -984,7 +984,7 @@ public class AudioManager { * application when it places a phone call, as it will cause signals from the radio layer * to feed the platform mixer. * - * @param mode the requested audio mode (NORMAL, RINGTONE, or IN_CALL). + * @param mode the requested audio mode (NORMAL, RINGTONE, IN_CALL or IN_COMMUNICATION). * Informs the HAL about the current audio state so that * it can route the audio appropriately. */ @@ -1000,7 +1000,7 @@ public class AudioManager { /** * Returns the current audio mode. * - * @return the current audio mode (NORMAL, RINGTONE, or IN_CALL). + * @return the current audio mode (NORMAL, RINGTONE, IN_CALL or IN_COMMUNICATION). * Returns the current current audio state from the HAL. */ public int getMode() { @@ -1034,9 +1034,14 @@ public class AudioManager { */ public static final int MODE_RINGTONE = AudioSystem.MODE_RINGTONE; /** - * In call audio mode. A call is established. + * In call audio mode. A telephony call is established. */ public static final int MODE_IN_CALL = AudioSystem.MODE_IN_CALL; + /** + * @hide + * In communication audio mode. An audio/video chat or VoIP call is established. + */ + public static final int MODE_IN_COMMUNICATION = AudioSystem.MODE_IN_COMMUNICATION; /* Routing bits for setRouting/getRouting API */ /** diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java index 3bee906..cfcc2ba 100644 --- a/media/java/android/media/AudioService.java +++ b/media/java/android/media/AudioService.java @@ -718,7 +718,7 @@ public class AudioService extends IAudioService.Stub { return; } - if (mode < AudioSystem.MODE_CURRENT || mode > AudioSystem.MODE_IN_CALL) { + if (mode < AudioSystem.MODE_CURRENT || mode >= AudioSystem.NUM_MODES) { return; } @@ -2305,6 +2305,7 @@ public class AudioService extends IAudioService.Stub { // add modify the phone app to take advantage of the new API synchronized(mRingingLock) { if (mIsRinging || (getMode() == AudioSystem.MODE_IN_CALL) || + (getMode() == AudioSystem.MODE_IN_COMMUNICATION) || (getMode() == AudioSystem.MODE_RINGTONE) ) { return; } diff --git a/media/java/android/media/AudioSystem.java b/media/java/android/media/AudioSystem.java index 5442791..1fd03dc 100644 --- a/media/java/android/media/AudioSystem.java +++ b/media/java/android/media/AudioSystem.java @@ -106,7 +106,8 @@ public class AudioSystem public static final int MODE_NORMAL = 0; public static final int MODE_RINGTONE = 1; public static final int MODE_IN_CALL = 2; - public static final int NUM_MODES = 3; + public static final int MODE_IN_COMMUNICATION = 3; + public static final int NUM_MODES = 4; /* Routing bits for setRouting/getRouting API */ |