From 3b64f38a167dd755977b01a339cb7724e05efbea Mon Sep 17 00:00:00 2001 From: Andre Eisenbach Date: Fri, 5 Apr 2013 09:34:11 -0700 Subject: [PATCH] Make BluetoothGattServer.close() public This functino is needed for applications to un-register from the Bluetooth stack. bug 8591003 Change-Id: Id05f592245d1d90791d34c3617aadac67bc6502c --- api/current.txt | 1 + core/java/android/bluetooth/BluetoothGattServer.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/api/current.txt b/api/current.txt index 7451a938b5b6..ef00be7595e1 100644 --- a/api/current.txt +++ b/api/current.txt @@ -5018,6 +5018,7 @@ package android.bluetooth { method public boolean addService(android.bluetooth.BluetoothGattService); method public void cancelConnection(android.bluetooth.BluetoothDevice); method public void clearServices(); + method public void close(); method public boolean connect(android.bluetooth.BluetoothDevice, boolean); method public java.util.List getConnectedDevices(); method public int getConnectionState(android.bluetooth.BluetoothDevice); diff --git a/core/java/android/bluetooth/BluetoothGattServer.java b/core/java/android/bluetooth/BluetoothGattServer.java index 644c619b9a66..d7f150b31910 100644 --- a/core/java/android/bluetooth/BluetoothGattServer.java +++ b/core/java/android/bluetooth/BluetoothGattServer.java @@ -288,9 +288,9 @@ public final class BluetoothGattServer implements BluetoothProfile { } /** - * Close the connection to the gatt service. + * Close this GATT server instance. */ - /*package*/ void close() { + public void close() { if (DBG) Log.d(TAG, "close()"); unregisterCallback(); } -- 2.11.0