Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c97fe1a2 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Stop the searching of broadcast" into udc-qpr-dev

parents 7239e2d5 dbe58e96
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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);
        }
    }