Snap for 10379371 from c97fe1a27f to udc-qpr1-release

Change-Id: Ic5e843a2ad072099017e17e595b9772605dd1cf3
This commit is contained in:
Android Build Coastguard Worker
2023-06-25 23:18:53 +00:00

View File

@@ -125,6 +125,10 @@ public class BluetoothFindBroadcastsFragment extends RestrictedDashboardFragment
Log.w(TAG, "onSourceAdded: mSelectedPreference == null!");
return;
}
if (mLeBroadcastAssistant != null
&& mLeBroadcastAssistant.isSearchInProgress()) {
mLeBroadcastAssistant.stopSearchingForSources();
}
getActivity().runOnUiThread(() -> updateListCategoryFromBroadcastMetadata(
mSelectedPreference.getBluetoothLeBroadcastMetadata(), true));
}
@@ -232,6 +236,9 @@ public class BluetoothFindBroadcastsFragment extends RestrictedDashboardFragment
public void onStop() {
super.onStop();
if (mLeBroadcastAssistant != null) {
if (mLeBroadcastAssistant.isSearchInProgress()) {
mLeBroadcastAssistant.stopSearchingForSources();
}
mLeBroadcastAssistant.unregisterServiceCallBack(mBroadcastAssistantCallback);
}
}