OSDN Git Service

Make BluetoothGattServer.close() public
authorAndre Eisenbach <andre@broadcom.com>
Fri, 5 Apr 2013 16:34:11 +0000 (09:34 -0700)
committerMatthew Xie <mattx@google.com>
Thu, 11 Apr 2013 02:13:10 +0000 (19:13 -0700)
This functino is needed for applications to un-register from the
Bluetooth stack.
bug 8591003

Change-Id: Id05f592245d1d90791d34c3617aadac67bc6502c

api/current.txt
core/java/android/bluetooth/BluetoothGattServer.java

index 7451a93..ef00be7 100644 (file)
@@ -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<android.bluetooth.BluetoothDevice> getConnectedDevices();
     method public int getConnectionState(android.bluetooth.BluetoothDevice);
index 644c619..d7f150b 100644 (file)
@@ -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();
     }