From d3dd01190cc668b045fd5843deb29801ad7a733a Mon Sep 17 00:00:00 2001 From: Rahul Sabnis Date: Fri, 17 Jan 2020 15:09:44 -0800 Subject: Add error log to BluetoothAdapter.factoryReset() and make BluetoothAdapter.getUuids() marked with @Nullable Bug: 144765076 Test: Manual Change-Id: I2a38fbb2256177ad29e2739ccbec8c13aae9df6a --- core/java/android/bluetooth/BluetoothAdapter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- cgit v1.2.3-59-g8ed1b