Don't send changed response as playing to remote while already playing

When some remotes reconnect to DUT, it will send Play and we send the
correct play status as playing. After that when FF/Rewind sent from remote
we send immediately changed response as playing. Due to which, remote
is sending Pause and streaming has been paused. So to avoid this don't
send changed response as playing when FF/Rewind has been sent while
already playing.

CRs-Fixed: 2374351
Change-Id: I5c8df3061b30b44920c76f7d45ab8d9ee058e795
diff --git a/packages_apps_bluetooth_ext/src/avrcp/Avrcp_ext.java b/packages_apps_bluetooth_ext/src/avrcp/Avrcp_ext.java
index 5f331f8..1de651b 100644
--- a/packages_apps_bluetooth_ext/src/avrcp/Avrcp_ext.java
+++ b/packages_apps_bluetooth_ext/src/avrcp/Avrcp_ext.java
@@ -5101,14 +5101,18 @@
                 AvrcpConstants.NOTIFICATION_TYPE_INTERIM) && (action == KeyEvent.ACTION_UP)) {
             int currentPlayState =
                     convertPlayStateToPlayStatus(deviceFeatures[deviceIndex].mCurrentPlayState);
-            deviceFeatures[deviceIndex].mPlayStatusChangedNT =
-                    AvrcpConstants.NOTIFICATION_TYPE_CHANGED;
-            if (deviceFeatures[deviceIndex].mCurrentDevice != null)
+            Log.d(TAG, " currentPlayState: " + currentPlayState + " mLastRspPlayStatus: " +
+                          deviceFeatures[deviceIndex].mLastRspPlayStatus);
+            if (deviceFeatures[deviceIndex].mCurrentDevice != null &&
+                    deviceFeatures[deviceIndex].mLastRspPlayStatus != currentPlayState) {
+                deviceFeatures[deviceIndex].mPlayStatusChangedNT =
+                                    AvrcpConstants.NOTIFICATION_TYPE_CHANGED;
                 registerNotificationRspPlayStatusNative(deviceFeatures[deviceIndex].mPlayStatusChangedNT
                        ,currentPlayState,
                         getByteAddress(deviceFeatures[deviceIndex].mCurrentDevice));
-            deviceFeatures[deviceIndex].mLastRspPlayStatus = currentPlayState;
-            Log.d(TAG, "Sending playback status CHANGED rsp on FF/Rewind key release");
+                deviceFeatures[deviceIndex].mLastRspPlayStatus = currentPlayState;
+                Log.d(TAG, "Sending playback status CHANGED rsp on FF/Rewind key release");
+            }
         }
 
         Log.d(TAG, "cached passthrough: " + deviceFeatures[deviceIndex].mLastPassthroughcmd +