diff options
| author | Ajay Panicker <apanicke@google.com> | 2015-07-28 16:52:09 -0700 |
|---|---|---|
| committer | Ajay Panicker <apanicke@google.com> | 2015-08-05 10:35:15 -0700 |
| commit | e1601facd17c1d0b6f74e86fa19187126060fc45 (patch) | |
| tree | 50c647f87c0005aaefcf328a9a9a1bbd5a567872 /framework/java/android/bluetooth/BluetoothAdapter.java | |
| parent | 4737654a1d7a11107696a394733f3ec367957496 (diff) | |
Implement Bluetooth settings factory reset (2/5)
Implemented the factory reset function to be used to reset all bluetooth
settings on device to factory default
Bug: 16161518
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothAdapter.java')
| -rw-r--r-- | framework/java/android/bluetooth/BluetoothAdapter.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/framework/java/android/bluetooth/BluetoothAdapter.java b/framework/java/android/bluetooth/BluetoothAdapter.java index 97afafa4c8..1f3ff51487 100644 --- a/framework/java/android/bluetooth/BluetoothAdapter.java +++ b/framework/java/android/bluetooth/BluetoothAdapter.java @@ -1002,6 +1002,25 @@ public final class BluetoothAdapter { } /** + * Factory reset bluetooth settings. + * + * <p>Requires the {@link android.Manifest.permission#BLUETOOTH_PRIVILEGED} + * permission + * + * @return true to indicate that the config file was successfully cleared + * + * @hide + */ + public boolean factoryReset() { + try { + if (mService != null) { + return mService.factoryReset(); + } + } catch (RemoteException e) {Log.e(TAG, "", e);} + return false; + } + + /** * Get the UUIDs supported by the local Bluetooth adapter. * * <p>Requires {@link android.Manifest.permission#BLUETOOTH} |
