Merge "Stop the searching of broadcast" into udc-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
c97fe1a27f
@@ -125,6 +125,10 @@ public class BluetoothFindBroadcastsFragment extends RestrictedDashboardFragment
|
|||||||
Log.w(TAG, "onSourceAdded: mSelectedPreference == null!");
|
Log.w(TAG, "onSourceAdded: mSelectedPreference == null!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (mLeBroadcastAssistant != null
|
||||||
|
&& mLeBroadcastAssistant.isSearchInProgress()) {
|
||||||
|
mLeBroadcastAssistant.stopSearchingForSources();
|
||||||
|
}
|
||||||
getActivity().runOnUiThread(() -> updateListCategoryFromBroadcastMetadata(
|
getActivity().runOnUiThread(() -> updateListCategoryFromBroadcastMetadata(
|
||||||
mSelectedPreference.getBluetoothLeBroadcastMetadata(), true));
|
mSelectedPreference.getBluetoothLeBroadcastMetadata(), true));
|
||||||
}
|
}
|
||||||
@@ -232,6 +236,9 @@ public class BluetoothFindBroadcastsFragment extends RestrictedDashboardFragment
|
|||||||
public void onStop() {
|
public void onStop() {
|
||||||
super.onStop();
|
super.onStop();
|
||||||
if (mLeBroadcastAssistant != null) {
|
if (mLeBroadcastAssistant != null) {
|
||||||
|
if (mLeBroadcastAssistant.isSearchInProgress()) {
|
||||||
|
mLeBroadcastAssistant.stopSearchingForSources();
|
||||||
|
}
|
||||||
mLeBroadcastAssistant.unregisterServiceCallBack(mBroadcastAssistantCallback);
|
mLeBroadcastAssistant.unregisterServiceCallBack(mBroadcastAssistantCallback);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user