am 1dd985ab: am cd8acb22: Merge "Implement Bluetooth settings factory reset (5/5)" into mnc-dev

* commit '1dd985abdc5e2a04cf97b4dce778db89891e5064':
  Implement Bluetooth settings factory reset (5/5)
This commit is contained in:
Ajay Panicker
2015-08-05 18:16:29 +00:00
committed by Android Git Automerger

View File

@@ -18,6 +18,7 @@ package com.android.settings;
import android.app.Fragment; import android.app.Fragment;
import android.content.Context; import android.content.Context;
import android.bluetooth.BluetoothManager;
import android.net.ConnectivityManager; import android.net.ConnectivityManager;
import android.net.NetworkPolicyManager; import android.net.NetworkPolicyManager;
import android.net.wifi.WifiManager; import android.net.wifi.WifiManager;
@@ -93,6 +94,12 @@ public class ResetNetworkConfirm extends InstrumentedFragment {
policyManager.factoryReset(subscriberId); policyManager.factoryReset(subscriberId);
} }
BluetoothManager btManager = (BluetoothManager)
context.getSystemService(Context.BLUETOOTH_SERVICE);
if (btManager != null) {
btManager.getAdapter().factoryReset();
}
Toast.makeText(context, R.string.reset_network_complete_toast, Toast.LENGTH_SHORT) Toast.makeText(context, R.string.reset_network_complete_toast, Toast.LENGTH_SHORT)
.show(); .show();
} }