Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9edd5bf2 authored by Łukasz Rymanowski's avatar Łukasz Rymanowski Committed by Gerrit Code Review
Browse files

Merge changes I81e9cbd0,I4f47634d

* changes:
  gmcs: Minor typo fix
  gmcs: Tolerate invalid track duration
parents 6b5fcd75 dfaae988
Loading
Loading
Loading
Loading
+3 −11
Original line number Diff line number Diff line
@@ -1270,7 +1270,7 @@ public class MediaControlGattService implements MediaControlGattServiceInterface
        }

        if (stateFields.containsKey(PlayerStateField.PLAYBACK_STATE)) {
            MediaState blaybackState =
            MediaState playbackState =
                    (MediaState) stateFields.get(PlayerStateField.PLAYBACK_STATE);
            if (DBG) {
                Log.d(TAG,
@@ -1278,7 +1278,7 @@ public class MediaControlGattService implements MediaControlGattServiceInterface
                                + stateFields.get(PlayerStateField.PLAYBACK_STATE));
            }

            if (blaybackState == MediaState.INACTIVE) {
            if (playbackState == MediaState.INACTIVE) {
                setInitialCharacteristicValues();
            }
        }
@@ -1376,16 +1376,8 @@ public class MediaControlGattService implements MediaControlGattServiceInterface

        int mediaState = getMediaStateChar();
        if (mediaState != mCurrentMediaState.getValue()) {
            if ((getTrackDurationChar() == 0
                    || getTrackDurationChar() == TRACK_DURATION_UNAVAILABLE)) {
                // Set to INACTIVE if not set already
                if (mediaState != MediaState.INACTIVE.getValue()) {
                    updateMediaStateChar(MediaState.INACTIVE.getValue());
                }
            } else {
            updateMediaStateChar(mCurrentMediaState.getValue());
        }
        }

        if (stateFields.containsKey(PlayerStateField.SEEKING_SPEED)) {
            int playbackState = getMediaStateChar();