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

Commit 3a9b098d authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Bluetooth: Porper update of the tracknumber and initialize with proper value."

parents 9fe68ddd f17182ad
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -327,7 +327,7 @@ public final class Avrcp {
        mAvailablePlayersChangedNT = NOTIFICATION_TYPE_CHANGED;
        mNowPlayingContentChangedNT = NOTIFICATION_TYPE_CHANGED;
        mTrackNumber = -1L;
        mCurrentPosMs = 0L;
        mCurrentPosMs = -1L;
        mPlayStartTimeMs = -1L;
        mSongLengthMs = 0L;
        mPlaybackIntervalMs = 0L;
@@ -675,8 +675,10 @@ public final class Avrcp {
                }
                mMediaUri = uri;
                if (handler != null) {
                     // Don't send the complete path to CK as few gets confused by that
                    // Send only the name of the root folder
                    handler.obtainMessage(MSG_UPDATE_BROWSED_PLAYER_FOLDER, NUM_ROOT_ELEMENTS,
                                                SplitPath.length, SplitPath).sendToTarget();
                                                1, SplitPath).sendToTarget();
                }
            } else {
                handler.obtainMessage(MSG_UPDATE_BROWSED_PLAYER_FOLDER, 0, 0, null)
@@ -1398,7 +1400,7 @@ public final class Avrcp {
            trackTitle = null;
            albumTitle = null;
            genre = null;
            tracknum = 0;
            tracknum = -1L;
        }

        public String toString() {
@@ -3137,11 +3139,9 @@ public final class Avrcp {
        long TrackNumberRsp = -1L;

        if(DEBUG) Log.v(TAG,"mCurrentPlayState" + mCurrentPlayState );
        /*As per spec 6.7.2 Register Notification
          If no track is currently selected, then return
         0xFFFFFFFFFFFFFFFF in the interim response */
        if (mCurrentPlayState == RemoteControlClient.PLAYSTATE_PLAYING)

            TrackNumberRsp = mMetadata.tracknum ;

        /* track is stored in big endian format */
        for (int i = 0; i < TRACK_ID_SIZE; ++i) {
            track[i] = (byte) (TrackNumberRsp >> (56 - 8 * i));