diff options
author | William Escande <wescande@google.com> | 2022-03-21 16:56:32 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2022-03-21 16:56:32 +0000 |
commit | 85d45e8ee629edffecbec1c8e7e3beab87f5642d (patch) | |
tree | fe582291c8b8a2440e9a21abcc71759b33615b16 /framework/java/android/bluetooth/BluetoothAdapter.java | |
parent | c403466b5641c11a122ed34113805ffd5130557a (diff) | |
parent | 0d12e935fbbac725622bb50ff2282c903c9f8aa1 (diff) |
Merge "API Review: factoryReset->clearBluetooth"
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothAdapter.java')
-rw-r--r-- | framework/java/android/bluetooth/BluetoothAdapter.java | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/framework/java/android/bluetooth/BluetoothAdapter.java b/framework/java/android/bluetooth/BluetoothAdapter.java index 2b03261cd6..aedd85d156 100644 --- a/framework/java/android/bluetooth/BluetoothAdapter.java +++ b/framework/java/android/bluetooth/BluetoothAdapter.java @@ -1412,7 +1412,7 @@ public final class BluetoothAdapter { android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED, }) - public boolean factoryReset() { + public boolean clearBluetooth() { try { mServiceLock.readLock().lock(); if (mService != null) { @@ -1434,6 +1434,22 @@ public final class BluetoothAdapter { return false; } + /** + * See {@link #clearBluetooth()} + * + * @return true to indicate that the config file was successfully cleared + * @hide + */ + @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) + @RequiresBluetoothConnectPermission + @RequiresPermission(allOf = { + android.Manifest.permission.BLUETOOTH_CONNECT, + android.Manifest.permission.BLUETOOTH_PRIVILEGED, + }) + public boolean factoryReset() { + return clearBluetooth(); + } + /** * Get the UUIDs supported by the local Bluetooth adapter. * |