summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Rahul Sabnis <rahulsabnis@google.com> 2020-01-17 15:09:44 -0800
committer Rahul Sabnis <rahulsabnis@google.com> 2020-01-17 15:09:44 -0800
commitd3dd01190cc668b045fd5843deb29801ad7a733a (patch)
tree65e76439f27b075b640ab48a37c406cb5c2852fb
parentec3e77e1d09240c6e148b9e78c29529082fc8171 (diff)
Add error log to BluetoothAdapter.factoryReset() and make
BluetoothAdapter.getUuids() marked with @Nullable Bug: 144765076 Test: Manual Change-Id: I2a38fbb2256177ad29e2739ccbec8c13aae9df6a
-rw-r--r--core/java/android/bluetooth/BluetoothAdapter.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/java/android/bluetooth/BluetoothAdapter.java b/core/java/android/bluetooth/BluetoothAdapter.java
index 220b77b299a4..57ccaa83ae9e 100644
--- a/core/java/android/bluetooth/BluetoothAdapter.java
+++ b/core/java/android/bluetooth/BluetoothAdapter.java
@@ -1222,6 +1222,7 @@ public final class BluetoothAdapter {
if (mService != null) {
return mService.factoryReset();
}
+ Log.e(TAG, "factoryReset(): IBluetooth Service is null");
SystemProperties.set("persist.bluetooth.factoryreset", "true");
} catch (RemoteException e) {
Log.e(TAG, "", e);
@@ -1239,7 +1240,7 @@ public final class BluetoothAdapter {
*/
@UnsupportedAppUsage
@RequiresPermission(Manifest.permission.BLUETOOTH)
- public @NonNull ParcelUuid[] getUuids() {
+ public @Nullable ParcelUuid[] getUuids() {
if (getState() != STATE_ON) {
return null;
}