Loading android/app/src/com/android/bluetooth/avrcp/Avrcp.java +9 −5 Original line number Diff line number Diff line Loading @@ -489,7 +489,6 @@ public final class Avrcp { break; case MSG_PLAY_INTERVAL_TIMEOUT: if (DEBUG) Log.v(TAG, "MSG_PLAY_INTERVAL_TIMEOUT"); sendPlayPosNotificationRsp(false); break; Loading Loading @@ -1164,15 +1163,19 @@ public final class Avrcp { } long playPositionMs = getPlayPosition(); String debugLine = "sendPlayPosNotificationRsp: "; // mNextPosMs is set to -1 when the previous position was invalid // so this will be true if the new position is valid & old was invalid. // mPlayPositionMs is set to -1 when the new position is invalid, // and the old mPrevPosMs is >= 0 so this is true when the new is invalid // and the old was valid. if (DEBUG) Log.d(TAG, "sendPlayPosNotificationRsp: (" + requested + ") " + mPrevPosMs + " <=? " + playPositionMs + " <=? " + mNextPosMs); if (DEBUG) Log.d(TAG, "sendPlayPosNotificationRsp: currentPlayState " + mCurrentPlayState); if (DEBUG) { debugLine += "(" + requested + ") " + mPrevPosMs + " <=? " + playPositionMs + " <=? " + mNextPosMs; if (isPlayingState(mCurrentPlayState)) debugLine += " Playing"; debugLine += " State: " + mCurrentPlayState.getState(); } if (requested || ((mLastReportedPosition != playPositionMs) && (playPositionMs >= mNextPosMs) || (playPositionMs <= mPrevPosMs))) { if (!requested) mPlayPosChangedNT = AvrcpConstants.NOTIFICATION_TYPE_CHANGED; Loading @@ -1194,9 +1197,10 @@ public final class Avrcp { if (mNextPosMs != -1) { delay = mNextPosMs - (playPositionMs > 0 ? playPositionMs : 0); } if (DEBUG) Log.d(TAG, "PLAY_INTERVAL_TIMEOUT set for " + delay + "ms from now"); if (DEBUG) debugLine += " Timeout " + delay + "ms"; mHandler.sendMessageDelayed(msg, delay); } if (DEBUG) Log.d(TAG, debugLine); } /** Loading Loading
android/app/src/com/android/bluetooth/avrcp/Avrcp.java +9 −5 Original line number Diff line number Diff line Loading @@ -489,7 +489,6 @@ public final class Avrcp { break; case MSG_PLAY_INTERVAL_TIMEOUT: if (DEBUG) Log.v(TAG, "MSG_PLAY_INTERVAL_TIMEOUT"); sendPlayPosNotificationRsp(false); break; Loading Loading @@ -1164,15 +1163,19 @@ public final class Avrcp { } long playPositionMs = getPlayPosition(); String debugLine = "sendPlayPosNotificationRsp: "; // mNextPosMs is set to -1 when the previous position was invalid // so this will be true if the new position is valid & old was invalid. // mPlayPositionMs is set to -1 when the new position is invalid, // and the old mPrevPosMs is >= 0 so this is true when the new is invalid // and the old was valid. if (DEBUG) Log.d(TAG, "sendPlayPosNotificationRsp: (" + requested + ") " + mPrevPosMs + " <=? " + playPositionMs + " <=? " + mNextPosMs); if (DEBUG) Log.d(TAG, "sendPlayPosNotificationRsp: currentPlayState " + mCurrentPlayState); if (DEBUG) { debugLine += "(" + requested + ") " + mPrevPosMs + " <=? " + playPositionMs + " <=? " + mNextPosMs; if (isPlayingState(mCurrentPlayState)) debugLine += " Playing"; debugLine += " State: " + mCurrentPlayState.getState(); } if (requested || ((mLastReportedPosition != playPositionMs) && (playPositionMs >= mNextPosMs) || (playPositionMs <= mPrevPosMs))) { if (!requested) mPlayPosChangedNT = AvrcpConstants.NOTIFICATION_TYPE_CHANGED; Loading @@ -1194,9 +1197,10 @@ public final class Avrcp { if (mNextPosMs != -1) { delay = mNextPosMs - (playPositionMs > 0 ? playPositionMs : 0); } if (DEBUG) Log.d(TAG, "PLAY_INTERVAL_TIMEOUT set for " + delay + "ms from now"); if (DEBUG) debugLine += " Timeout " + delay + "ms"; mHandler.sendMessageDelayed(msg, delay); } if (DEBUG) Log.d(TAG, debugLine); } /** Loading