Create BluetoothSwitchPreference
In the new design, bluetooth preference is not MasterSwitchPreference any more. This cl creates BluetoothSwitchPreference while reuse the BluetoothEnabler. Future cl will remove the BluetoothMasterSwitchPreference when P feature is finalized. Bug: 69333961 Test: RunSettingsRoboTests Change-Id: Ie1f934b4e93a6758a1b0cf83bb5098585a635c2a
This commit is contained in:
@@ -24,6 +24,7 @@ import com.android.settings.R;
|
||||
import com.android.settings.SettingsActivity;
|
||||
import com.android.settings.bluetooth.BluetoothFilesPreferenceController;
|
||||
import com.android.settings.bluetooth.BluetoothMasterSwitchPreferenceController;
|
||||
import com.android.settings.bluetooth.BluetoothSwitchPreferenceController;
|
||||
import com.android.settings.bluetooth.Utils;
|
||||
import com.android.settings.dashboard.DashboardFragment;
|
||||
import com.android.settings.deviceinfo.UsbBackend;
|
||||
@@ -83,10 +84,8 @@ public class AdvancedConnectedDeviceDashboardFragment extends DashboardFragment
|
||||
mUsbPrefController = new UsbModePreferenceController(context, new UsbBackend(context));
|
||||
lifecycle.addObserver(mUsbPrefController);
|
||||
controllers.add(mUsbPrefController);
|
||||
final BluetoothMasterSwitchPreferenceController bluetoothPreferenceController =
|
||||
new BluetoothMasterSwitchPreferenceController(
|
||||
context, Utils.getLocalBtManager(context), this,
|
||||
(SettingsActivity) getActivity());
|
||||
final BluetoothSwitchPreferenceController bluetoothPreferenceController =
|
||||
new BluetoothSwitchPreferenceController(context);
|
||||
lifecycle.addObserver(bluetoothPreferenceController);
|
||||
controllers.add(bluetoothPreferenceController);
|
||||
|
||||
|
Reference in New Issue
Block a user