Skip to content

Commit 256ab9e

Browse files
jmtriviAndroid (Google) Code Review
authored andcommitted
Merge "Use device availability to start WFD audio routing" into jb-mr1-dev
2 parents 2aa50b6 + c203ecf commit 256ab9e

File tree

2 files changed

+6
-16
lines changed

2 files changed

+6
-16
lines changed

media/java/android/media/AudioService.java

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,10 @@ public class AudioService extends IAudioService.Stub implements OnFinished {
153153
private static final int MSG_SET_A2DP_CONNECTION_STATE = 22;
154154
// end of messages handled under wakelock
155155
private static final int MSG_SET_RSX_CONNECTION_STATE = 23; // change remote submix connection
156-
private static final int MSG_SET_FORCE_RSX_USE = 24; // force remote submix audio routing
157-
private static final int MSG_CHECK_MUSIC_ACTIVE = 25;
158-
private static final int MSG_BROADCAST_AUDIO_BECOMING_NOISY = 26;
159-
private static final int MSG_CONFIGURE_SAFE_MEDIA_VOLUME = 27;
160-
private static final int MSG_CONFIGURE_SAFE_MEDIA_VOLUME_FORCED = 28;
156+
private static final int MSG_CHECK_MUSIC_ACTIVE = 24;
157+
private static final int MSG_BROADCAST_AUDIO_BECOMING_NOISY = 25;
158+
private static final int MSG_CONFIGURE_SAFE_MEDIA_VOLUME = 26;
159+
private static final int MSG_CONFIGURE_SAFE_MEDIA_VOLUME_FORCED = 27;
161160

162161
// flags for MSG_PERSIST_VOLUME indicating if current and/or last audible volume should be
163162
// persisted
@@ -2221,13 +2220,6 @@ public void setRemoteSubmixOn(boolean on, int address) {
22212220
on ? 1 : 0 /*arg1*/,
22222221
address /*arg2*/,
22232222
null/*obj*/, 0/*delay*/);
2224-
2225-
// Note that we are currently forcing use of remote submix as soon as corresponding device
2226-
// is made available
2227-
sendMsg(mAudioHandler, MSG_SET_FORCE_RSX_USE, SENDMSG_REPLACE,
2228-
AudioSystem.FOR_MEDIA,
2229-
on ? AudioSystem.FORCE_REMOTE_SUBMIX : AudioSystem.FORCE_NONE,
2230-
null/*obj*/, 0/*delay*/);
22312223
}
22322224

22332225
private void onSetRsxConnectionState(int available, int address) {
@@ -3320,7 +3312,6 @@ public void handleMessage(Message msg) {
33203312

33213313
case MSG_SET_FORCE_USE:
33223314
case MSG_SET_FORCE_BT_A2DP_USE:
3323-
case MSG_SET_FORCE_RSX_USE:
33243315
setForceUse(msg.arg1, msg.arg2);
33253316
break;
33263317

media/java/android/media/AudioSystem.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -360,9 +360,8 @@ public static String getDeviceName(int device)
360360
public static final int FORCE_ANALOG_DOCK = 8;
361361
public static final int FORCE_DIGITAL_DOCK = 9;
362362
public static final int FORCE_NO_BT_A2DP = 10;
363-
public static final int FORCE_REMOTE_SUBMIX = 11;
364-
public static final int FORCE_SYSTEM_ENFORCED = 12;
365-
private static final int NUM_FORCE_CONFIG = 13;
363+
public static final int FORCE_SYSTEM_ENFORCED = 11;
364+
private static final int NUM_FORCE_CONFIG = 12;
366365
public static final int FORCE_DEFAULT = FORCE_NONE;
367366

368367
// usage for setForceUse, must match AudioSystem::force_use

0 commit comments

Comments
 (0)