Merge "Fix BT keeping wrong state issue"

This commit is contained in:
Treehugger Robot
2019-04-05 09:26:21 +00:00
committed by Gerrit Code Review

View File

@@ -669,6 +669,9 @@ public class MediaSessionRecord implements IBinder.DeathRecipient {
PlaybackState state;
long duration = -1;
synchronized (mLock) {
if (mDestroyed) {
return null;
}
state = mPlaybackState;
if (mMetadata != null && mMetadata.containsKey(MediaMetadata.METADATA_KEY_DURATION)) {
duration = mMetadata.getLong(MediaMetadata.METADATA_KEY_DURATION);