Merge "Stop the searching of broadcast" into udc-qpr-dev am: c97fe1a27f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23744199 Change-Id: I74132b143b5312886d27ddf6f8e5eb3bb74ce9c7 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user