summaryrefslogtreecommitdiffstats
path: root/core/java/android/bluetooth/BluetoothGatt.java
diff options
context:
space:
mode:
authorWei Wang <weiwa@google.com>2014-07-29 21:34:25 -0700
committerWei Wang <weiwa@google.com>2014-08-01 14:34:25 -0700
commite0d4afb2d4caecb264852a35f6e3cfc1248e08c4 (patch)
tree53de9f5a5084316723d22ff5fd830eafc7a4fa9e /core/java/android/bluetooth/BluetoothGatt.java
parentbfa96fb3820201749dc4366b1b14788c88892755 (diff)
downloadframeworks_base-e0d4afb2d4caecb264852a35f6e3cfc1248e08c4.zip
frameworks_base-e0d4afb2d4caecb264852a35f6e3cfc1248e08c4.tar.gz
frameworks_base-e0d4afb2d4caecb264852a35f6e3cfc1248e08c4.tar.bz2
Add a default impelementation of IBluetoothGattCallback(1/2).
Also cleaned up a few TODOs and fixed bug. b/16410260 AdvertiseCallback null onSuccess callback Change-Id: I75a582c03be1e2ef6964c2cbeba42aaaf9f9e17c
Diffstat (limited to 'core/java/android/bluetooth/BluetoothGatt.java')
-rw-r--r--core/java/android/bluetooth/BluetoothGatt.java44
1 files changed, 2 insertions, 42 deletions
diff --git a/core/java/android/bluetooth/BluetoothGatt.java b/core/java/android/bluetooth/BluetoothGatt.java
index 1fe43ec..59d7956 100644
--- a/core/java/android/bluetooth/BluetoothGatt.java
+++ b/core/java/android/bluetooth/BluetoothGatt.java
@@ -16,7 +16,6 @@
package android.bluetooth;
-import android.bluetooth.le.ScanResult;
import android.content.Context;
import android.os.ParcelUuid;
import android.os.RemoteException;
@@ -130,10 +129,10 @@ public final class BluetoothGatt implements BluetoothProfile {
/*package*/ static final int AUTHENTICATION_MITM = 2;
/**
- * Bluetooth GATT interface callbacks
+ * Bluetooth GATT callbacks. Overrides the default BluetoothGattCallback implementation.
*/
private final IBluetoothGattCallback mBluetoothGattCallback =
- new IBluetoothGattCallback.Stub() {
+ new BluetoothGattCallbackWrapper() {
/**
* Application interface registered - app is ready to go
* @hide
@@ -198,14 +197,6 @@ public final class BluetoothGatt implements BluetoothProfile {
}
/**
- * Callback reporting an LE scan result.
- * @hide
- */
- public void onScanResult(String address, int rssi, byte[] advData) {
- // no op
- }
-
- /**
* A new GATT service has been discovered.
* The service is added to the internal list and the search
* continues.
@@ -600,23 +591,6 @@ public final class BluetoothGatt implements BluetoothProfile {
}
/**
- * Advertise state change callback
- * @hide
- */
- public void onAdvertiseStateChange(int state, int status) {
- if (DBG) Log.d(TAG, "onAdvertiseStateChange() - state = "
- + state + " status=" + status);
- }
-
- /**
- * @hide
- */
- @Override
- public void onMultiAdvertiseCallback(int status) {
- // no op.
- }
-
- /**
* Callback invoked when the MTU for a given connection changes
* @hide
*/
@@ -647,20 +621,6 @@ public final class BluetoothGatt implements BluetoothProfile {
Log.w(TAG, "Unhandled exception in callback", ex);
}
}
-
- @Override
- public void onBatchScanResults(List<ScanResult> results) {
- // no op
- }
-
- /**
- * @hide
- */
- @Override
- public void onFoundOrLost(boolean onFound, String address, int rssi,
- byte[] advData) {
- // no op.
- }
};
/*package*/ BluetoothGatt(Context context, IBluetoothGatt iGatt, BluetoothDevice device,