use of com.android.settings.nfc.NfcPreferenceController in project android_packages_apps_Settings by LineageOS.
the class ConnectedDeviceDashboardFragment method getPreferenceControllers.
@Override
protected List<AbstractPreferenceController> getPreferenceControllers(Context context) {
final List<AbstractPreferenceController> controllers = new ArrayList<>();
final Lifecycle lifecycle = getLifecycle();
final NfcPreferenceController nfcPreferenceController = new NfcPreferenceController(context);
lifecycle.addObserver(nfcPreferenceController);
controllers.add(nfcPreferenceController);
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());
lifecycle.addObserver(bluetoothPreferenceController);
controllers.add(bluetoothPreferenceController);
SmsMirroringFeatureProvider smsMirroringFeatureProvider = FeatureFactory.getFactory(context).getSmsMirroringFeatureProvider();
AbstractPreferenceController smsMirroringController = smsMirroringFeatureProvider.getController(context);
controllers.add(smsMirroringController);
return controllers;
}
use of com.android.settings.nfc.NfcPreferenceController in project android_packages_apps_Settings by DirtyUnicorns.
the class ConnectedDeviceDashboardFragment method getPreferenceControllers.
@Override
protected List<AbstractPreferenceController> getPreferenceControllers(Context context) {
final List<AbstractPreferenceController> controllers = new ArrayList<>();
final Lifecycle lifecycle = getLifecycle();
final NfcPreferenceController nfcPreferenceController = new NfcPreferenceController(context);
lifecycle.addObserver(nfcPreferenceController);
controllers.add(nfcPreferenceController);
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());
lifecycle.addObserver(bluetoothPreferenceController);
controllers.add(bluetoothPreferenceController);
SmsMirroringFeatureProvider smsMirroringFeatureProvider = FeatureFactory.getFactory(context).getSmsMirroringFeatureProvider();
AbstractPreferenceController smsMirroringController = smsMirroringFeatureProvider.getController(context);
controllers.add(smsMirroringController);
return controllers;
}
use of com.android.settings.nfc.NfcPreferenceController in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class AdvancedConnectedDeviceControllerTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
mContext = spy(RuntimeEnvironment.application);
mContentResolver = mContext.getContentResolver();
mNfcController = new NfcPreferenceController(mContext, NfcPreferenceController.KEY_TOGGLE_NFC);
mShadowNfcAdapter = Shadows.shadowOf(NfcAdapter.getNfcAdapter(mContext));
}
Aggregations