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

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

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

parents 93cb527c 35b447ff
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
@@ -220,6 +220,27 @@ public class LocalBluetoothLeBroadcastAssistant implements LocalBluetoothProfile
        return mService.isSearchInProgress();
    }

    /**
     * Stops an ongoing search for nearby Broadcast Sources.
     *
     * On success, {@link BluetoothLeBroadcastAssistant.Callback#onSearchStopped(int)} will be
     * called with reason code {@link BluetoothStatusCodes#REASON_LOCAL_APP_REQUEST}.
     * On failure, {@link BluetoothLeBroadcastAssistant.Callback#onSearchStopFailed(int)} will be
     * called with reason code
     *
     * @throws IllegalStateException if callback was not registered
     */
    public void stopSearchingForSources() {
        if (DEBUG) {
            Log.d(TAG, "stopSearchingForSources()");
        }
        if (mService == null) {
            Log.d(TAG, "The BluetoothLeBroadcastAssistant is null");
            return;
        }
        mService.stopSearchingForSources();
    }

    /**
     * Get information about all Broadcast Sources that a Broadcast Sink knows about.
     *