Add error log to BluetoothAdapter.factoryReset() and make

BluetoothAdapter.getUuids() marked with @Nullable

Bug: 144765076
Test: Manual
Change-Id: I2a38fbb2256177ad29e2739ccbec8c13aae9df6a
This commit is contained in:
Rahul Sabnis
2020-01-17 15:09:44 -08:00
parent ec3e77e1d0
commit d3dd01190c

View File

@@ -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;
}