Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1dd985ab authored by Ajay Panicker's avatar Ajay Panicker Committed by Android Git Automerger
Browse files

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

* commit 'cd8acb22':
  Implement Bluetooth settings factory reset (5/5)
parents c86f6dfd cd8acb22
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package com.android.settings;

import android.app.Fragment;
import android.content.Context;
import android.bluetooth.BluetoothManager;
import android.net.ConnectivityManager;
import android.net.NetworkPolicyManager;
import android.net.wifi.WifiManager;
@@ -93,6 +94,12 @@ public class ResetNetworkConfirm extends InstrumentedFragment {
                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)
                    .show();
        }