Support PBAP for get/close profile proxy

Bug: 147078847
Test: manual

Change-Id: Iabcf9ab81b052be8f6f7388843681450a1cd7da4
This commit is contained in:
Chienyuan
2020-01-08 17:50:08 +08:00
parent b5b0b321f6
commit 2fca55dee2

View File

@@ -2670,6 +2670,9 @@ public final class BluetoothAdapter {
} else if (profile == BluetoothProfile.PAN) {
BluetoothPan pan = new BluetoothPan(context, listener);
return true;
} else if (profile == BluetoothProfile.PBAP) {
BluetoothPbap pbap = new BluetoothPbap(context, listener);
return true;
} else if (profile == BluetoothProfile.HEALTH) {
Log.e(TAG, "getProfileProxy(): BluetoothHealth is deprecated");
return false;
@@ -2742,6 +2745,10 @@ public final class BluetoothAdapter {
BluetoothPan pan = (BluetoothPan) proxy;
pan.close();
break;
case BluetoothProfile.PBAP:
BluetoothPbap pbap = (BluetoothPbap) proxy;
pbap.close();
break;
case BluetoothProfile.GATT:
BluetoothGatt gatt = (BluetoothGatt) proxy;
gatt.close();