From 2fca55dee2b20357a4bbadeeeca03965e306d359 Mon Sep 17 00:00:00 2001 From: Chienyuan Date: Wed, 8 Jan 2020 17:50:08 +0800 Subject: Support PBAP for get/close profile proxy Bug: 147078847 Test: manual Change-Id: Iabcf9ab81b052be8f6f7388843681450a1cd7da4 --- core/java/android/bluetooth/BluetoothAdapter.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'core/java/android/bluetooth/BluetoothAdapter.java') diff --git a/core/java/android/bluetooth/BluetoothAdapter.java b/core/java/android/bluetooth/BluetoothAdapter.java index 291d1d99fdc9..220b77b299a4 100644 --- a/core/java/android/bluetooth/BluetoothAdapter.java +++ b/core/java/android/bluetooth/BluetoothAdapter.java @@ -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(); -- cgit v1.2.3