[LE] Add api to check the media device is BT LE device

Bug: 228274114
Test: Manual test
Change-Id: Idb65ebe3b6afa2b6376036a0a4b5fa442460e8fb
This commit is contained in:
changbetty
2022-04-15 07:00:04 +00:00
committed by Betty Chang
parent 4f027ec47c
commit 142026bbdb

View File

@@ -249,6 +249,15 @@ public abstract class MediaDevice implements Comparable<MediaDevice> {
return mRouteInfo.getClientPackageName();
}
/**
* Check if the device is Bluetooth LE Audio device.
*
* @return true if the RouteInfo equals TYPE_BLE_HEADSET.
*/
public boolean isBLEDevice() {
return mRouteInfo.getType() == TYPE_BLE_HEADSET;
}
/**
* Get application label from MediaDevice.
*