From 708f57f4dc34587cd9a0b507fda20555a94c4755 Mon Sep 17 00:00:00 2001 From: Andre Eisenbach Date: Thu, 14 May 2015 14:48:00 -0700 Subject: [PATCH] Un-hide connectGatt() variant with selective transport Change-Id: I1d3c512160de2bd68550faf243bb151d5cf7f3c9 --- api/current.txt | 4 ++++ api/system-current.txt | 4 ++++ core/java/android/bluetooth/BluetoothDevice.java | 4 ---- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/api/current.txt b/api/current.txt index 28c344e7ebe4..d38e75a642f7 100644 --- a/api/current.txt +++ b/api/current.txt @@ -6676,6 +6676,7 @@ package android.bluetooth { public final class BluetoothDevice implements android.os.Parcelable { method public android.bluetooth.BluetoothGatt connectGatt(android.content.Context, boolean, android.bluetooth.BluetoothGattCallback); + method public android.bluetooth.BluetoothGatt connectGatt(android.content.Context, boolean, android.bluetooth.BluetoothGattCallback, int); method public boolean createBond(); method public android.bluetooth.BluetoothSocket createInsecureRfcommSocketToServiceRecord(java.util.UUID) throws java.io.IOException; method public android.bluetooth.BluetoothSocket createRfcommSocketToServiceRecord(java.util.UUID) throws java.io.IOException; @@ -6719,6 +6720,9 @@ package android.bluetooth { field public static final java.lang.String EXTRA_UUID = "android.bluetooth.device.extra.UUID"; field public static final int PAIRING_VARIANT_PASSKEY_CONFIRMATION = 2; // 0x2 field public static final int PAIRING_VARIANT_PIN = 0; // 0x0 + field public static final int TRANSPORT_AUTO = 0; // 0x0 + field public static final int TRANSPORT_BREDR = 1; // 0x1 + field public static final int TRANSPORT_LE = 2; // 0x2 } public final class BluetoothGatt implements android.bluetooth.BluetoothProfile { diff --git a/api/system-current.txt b/api/system-current.txt index b4d1e27342ab..44d8c8ed7f14 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -6870,6 +6870,7 @@ package android.bluetooth { public final class BluetoothDevice implements android.os.Parcelable { method public android.bluetooth.BluetoothGatt connectGatt(android.content.Context, boolean, android.bluetooth.BluetoothGattCallback); + method public android.bluetooth.BluetoothGatt connectGatt(android.content.Context, boolean, android.bluetooth.BluetoothGattCallback, int); method public boolean createBond(); method public android.bluetooth.BluetoothSocket createInsecureRfcommSocketToServiceRecord(java.util.UUID) throws java.io.IOException; method public android.bluetooth.BluetoothSocket createRfcommSocketToServiceRecord(java.util.UUID) throws java.io.IOException; @@ -6915,6 +6916,9 @@ package android.bluetooth { field public static final java.lang.String EXTRA_UUID = "android.bluetooth.device.extra.UUID"; field public static final int PAIRING_VARIANT_PASSKEY_CONFIRMATION = 2; // 0x2 field public static final int PAIRING_VARIANT_PIN = 0; // 0x0 + field public static final int TRANSPORT_AUTO = 0; // 0x0 + field public static final int TRANSPORT_BREDR = 1; // 0x1 + field public static final int TRANSPORT_LE = 2; // 0x2 } public final class BluetoothGatt implements android.bluetooth.BluetoothProfile { diff --git a/core/java/android/bluetooth/BluetoothDevice.java b/core/java/android/bluetooth/BluetoothDevice.java index 26a91e43a8e7..dcf06d8a8875 100644 --- a/core/java/android/bluetooth/BluetoothDevice.java +++ b/core/java/android/bluetooth/BluetoothDevice.java @@ -567,19 +567,16 @@ public final class BluetoothDevice implements Parcelable { /** * No preferrence of physical transport for GATT connections to remote dual-mode devices - * @hide */ public static final int TRANSPORT_AUTO = 0; /** * Prefer BR/EDR transport for GATT connections to remote dual-mode devices - * @hide */ public static final int TRANSPORT_BREDR = 1; /** * Prefer LE transport for GATT connections to remote dual-mode devices - * @hide */ public static final int TRANSPORT_LE = 2; @@ -1564,7 +1561,6 @@ public final class BluetoothDevice implements Parcelable { * {@link BluetoothDevice#TRANSPORT_AUTO} or * {@link BluetoothDevice#TRANSPORT_BREDR} or {@link BluetoothDevice#TRANSPORT_LE} * @throws IllegalArgumentException if callback is null - * @hide */ public BluetoothGatt connectGatt(Context context, boolean autoConnect, BluetoothGattCallback callback, int transport) { -- 2.11.0