diff options
author | Jean-Michel Trivi <jmtrivi@google.com> | 2012-10-11 10:13:50 -0700 |
---|---|---|
committer | Jean-Michel Trivi <jmtrivi@google.com> | 2012-10-11 18:30:11 -0700 |
commit | c203ecfd9f6c356542fcb10bc85b27b98b170ddf (patch) | |
tree | 710d8d4f923ba5c91fcd7facd3e1652af730aa79 /media | |
parent | bcfc1ca8ab8bf057e20d9369af3d007d80ca83e4 (diff) | |
download | frameworks_base-c203ecfd9f6c356542fcb10bc85b27b98b170ddf.zip frameworks_base-c203ecfd9f6c356542fcb10bc85b27b98b170ddf.tar.gz frameworks_base-c203ecfd9f6c356542fcb10bc85b27b98b170ddf.tar.bz2 |
Use device availability to start WFD audio routing
Don't use the force_use mechanism to start WFD audio routing,
but rather only the availability of the remote submix audio
device. This is matched by a change in the audio policy
manager.
Bug 7318180
Change-Id: I756f032d8ca0375c3dbeddb7c321261c497539bc
Diffstat (limited to 'media')
-rw-r--r-- | media/java/android/media/AudioService.java | 17 | ||||
-rw-r--r-- | media/java/android/media/AudioSystem.java | 5 |
2 files changed, 6 insertions, 16 deletions
diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java index f26d322..f77cbfb 100644 --- a/media/java/android/media/AudioService.java +++ b/media/java/android/media/AudioService.java @@ -153,11 +153,10 @@ public class AudioService extends IAudioService.Stub implements OnFinished { private static final int MSG_SET_A2DP_CONNECTION_STATE = 22; // end of messages handled under wakelock private static final int MSG_SET_RSX_CONNECTION_STATE = 23; // change remote submix connection - private static final int MSG_SET_FORCE_RSX_USE = 24; // force remote submix audio routing - private static final int MSG_CHECK_MUSIC_ACTIVE = 25; - private static final int MSG_BROADCAST_AUDIO_BECOMING_NOISY = 26; - private static final int MSG_CONFIGURE_SAFE_MEDIA_VOLUME = 27; - private static final int MSG_CONFIGURE_SAFE_MEDIA_VOLUME_FORCED = 28; + private static final int MSG_CHECK_MUSIC_ACTIVE = 24; + private static final int MSG_BROADCAST_AUDIO_BECOMING_NOISY = 25; + private static final int MSG_CONFIGURE_SAFE_MEDIA_VOLUME = 26; + private static final int MSG_CONFIGURE_SAFE_MEDIA_VOLUME_FORCED = 27; // flags for MSG_PERSIST_VOLUME indicating if current and/or last audible volume should be // persisted @@ -2221,13 +2220,6 @@ public class AudioService extends IAudioService.Stub implements OnFinished { on ? 1 : 0 /*arg1*/, address /*arg2*/, null/*obj*/, 0/*delay*/); - - // Note that we are currently forcing use of remote submix as soon as corresponding device - // is made available - sendMsg(mAudioHandler, MSG_SET_FORCE_RSX_USE, SENDMSG_REPLACE, - AudioSystem.FOR_MEDIA, - on ? AudioSystem.FORCE_REMOTE_SUBMIX : AudioSystem.FORCE_NONE, - null/*obj*/, 0/*delay*/); } private void onSetRsxConnectionState(int available, int address) { @@ -3320,7 +3312,6 @@ public class AudioService extends IAudioService.Stub implements OnFinished { case MSG_SET_FORCE_USE: case MSG_SET_FORCE_BT_A2DP_USE: - case MSG_SET_FORCE_RSX_USE: setForceUse(msg.arg1, msg.arg2); break; diff --git a/media/java/android/media/AudioSystem.java b/media/java/android/media/AudioSystem.java index 260ddc7..dde2979 100644 --- a/media/java/android/media/AudioSystem.java +++ b/media/java/android/media/AudioSystem.java @@ -360,9 +360,8 @@ public class AudioSystem public static final int FORCE_ANALOG_DOCK = 8; public static final int FORCE_DIGITAL_DOCK = 9; public static final int FORCE_NO_BT_A2DP = 10; - public static final int FORCE_REMOTE_SUBMIX = 11; - public static final int FORCE_SYSTEM_ENFORCED = 12; - private static final int NUM_FORCE_CONFIG = 13; + public static final int FORCE_SYSTEM_ENFORCED = 11; + private static final int NUM_FORCE_CONFIG = 12; public static final int FORCE_DEFAULT = FORCE_NONE; // usage for setForceUse, must match AudioSystem::force_use |