Merge "[Broadcast] Stop the searching of broadcast" into udc-qpr-dev am: df39bfee6c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23749453 Change-Id: I782aaf6df6986d75a46adb5af1933b3050cb4a96 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user