From c525cf7a33430f44246f63d1c68c4cda4b92254e Mon Sep 17 00:00:00 2001 From: Matthew Xie Date: Thu, 22 Jan 2015 20:13:17 -0800 Subject: Delay the second message for 30ms more than the last message for a2dp In function setBluetoothA2dpDeviceConnectionState, current code calculate the delay of the second state update message to be exactly the same as the last delayed messages. This causes a problem that the sequence of the messages may be altered. Bug: 19036411 Change-Id: I35762873fd3341ec098dd229ac96bd42d6f34195 --- media/java/android/media/AudioService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'media') diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java index 532314d..38a5b40 100644 --- a/media/java/android/media/AudioService.java +++ b/media/java/android/media/AudioService.java @@ -4714,7 +4714,7 @@ public class AudioService extends IAudioService.Stub { synchronized (mLastDeviceConnectMsgTime) { long time = SystemClock.uptimeMillis(); if (mLastDeviceConnectMsgTime > time) { - delay = (int)(mLastDeviceConnectMsgTime - time); + delay = (int)(mLastDeviceConnectMsgTime - time) + 30; } } } -- cgit v1.1