[le audio] BassClient clear notified flag before new scanning
Bug: 287357243
Tag: #bug
Test: atest BassClientServiceTest
Test: manually test assistant to observe sources are always notified
Change-Id: Id6deecbee5429ff3c5337cfe1e588586679f00e8
diff --git a/android/app/src/com/android/bluetooth/bass_client/BassClientService.java b/android/app/src/com/android/bluetooth/bass_client/BassClientService.java
index 38cb01c..0d8e079 100644
--- a/android/app/src/com/android/bluetooth/bass_client/BassClientService.java
+++ b/android/app/src/com/android/bluetooth/bass_client/BassClientService.java
@@ -983,6 +983,11 @@
}
};
mScanBroadcasts.clear();
+ // clear previous sources notify flag before scanning new result
+ // this is to make sure the active sources are notified even if already synced
+ if (mPeriodicAdvertisementResultMap != null) {
+ clearNotifiedFlags();
+ }
ScanSettings settings = new ScanSettings.Builder().setCallbackType(
ScanSettings.CALLBACK_TYPE_ALL_MATCHES)
.setScanMode(ScanSettings.SCAN_MODE_LOW_LATENCY)