From 2c1d2c21cf5772d0b82124a580c8db8bafd0429a Mon Sep 17 00:00:00 2001 From: Jakub Pawlowski Date: Fri, 25 Sep 2020 20:17:33 +0200 Subject: [PATCH] Make BluetoothGattCallback.onServiceChanged public Bug: 154056389 Test: proper CTS test will be provided Change-Id: I2c9264910b65d62124c75c3ee3fd0b5bd18a2006 --- api/current.txt | 1 + core/java/android/bluetooth/BluetoothGattCallback.java | 5 +++-- non-updatable-api/current.txt | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/api/current.txt b/api/current.txt index 167c2b4668afa..d85e5cbcacfdc 100644 --- a/api/current.txt +++ b/api/current.txt @@ -8771,6 +8771,7 @@ package android.bluetooth { method public void onPhyUpdate(android.bluetooth.BluetoothGatt, int, int, int); method public void onReadRemoteRssi(android.bluetooth.BluetoothGatt, int, int); method public void onReliableWriteCompleted(android.bluetooth.BluetoothGatt, int); + method public void onServiceChanged(@NonNull android.bluetooth.BluetoothGatt); method public void onServicesDiscovered(android.bluetooth.BluetoothGatt, int); } diff --git a/core/java/android/bluetooth/BluetoothGattCallback.java b/core/java/android/bluetooth/BluetoothGattCallback.java index 9f6b8287e791c..1c40cff076f6d 100644 --- a/core/java/android/bluetooth/BluetoothGattCallback.java +++ b/core/java/android/bluetooth/BluetoothGattCallback.java @@ -16,6 +16,8 @@ package android.bluetooth; +import android.annotation.NonNull; + /** * This abstract class is used to implement {@link BluetoothGatt} callbacks. */ @@ -203,8 +205,7 @@ public abstract class BluetoothGattCallback { * called to re-discover the services. * * @param gatt GATT client involved - * @hide */ - public void onServiceChanged(BluetoothGatt gatt) { + public void onServiceChanged(@NonNull BluetoothGatt gatt) { } } diff --git a/non-updatable-api/current.txt b/non-updatable-api/current.txt index d6c74b1e24f6d..ae336a211ce72 100644 --- a/non-updatable-api/current.txt +++ b/non-updatable-api/current.txt @@ -8771,6 +8771,7 @@ package android.bluetooth { method public void onPhyUpdate(android.bluetooth.BluetoothGatt, int, int, int); method public void onReadRemoteRssi(android.bluetooth.BluetoothGatt, int, int); method public void onReliableWriteCompleted(android.bluetooth.BluetoothGatt, int); + method public void onServiceChanged(@NonNull android.bluetooth.BluetoothGatt); method public void onServicesDiscovered(android.bluetooth.BluetoothGatt, int); }