Bluetooth and NFC added back to Connection preferences
* Bluetooth and NFC added back to "Connection preferences" Bug: 79299421 Test: make -j50 RunSettingsRoboTests Change-Id: I8f4c389c28c7cc752f198be2b59b28b6e9af2c90 Merged-In: I8f4c389c28c7cc752f198be2b59b28b6e9af2c90
This commit is contained in:
committed by
Andrew Sapperstein
parent
e30007dcc0
commit
52feedf354
@@ -26,10 +26,7 @@ import com.android.settings.dashboard.DashboardFragment;
|
||||
import com.android.settings.dashboard.SummaryLoader;
|
||||
import com.android.settings.nfc.NfcPreferenceController;
|
||||
import com.android.settings.search.BaseSearchIndexProvider;
|
||||
import com.android.settingslib.core.AbstractPreferenceController;
|
||||
import com.android.settingslib.core.lifecycle.Lifecycle;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@@ -62,25 +59,6 @@ public class ConnectedDeviceDashboardFragment extends DashboardFragment {
|
||||
return R.xml.connected_devices;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<AbstractPreferenceController> createPreferenceControllers(Context context) {
|
||||
return buildPreferenceControllers(context, getLifecycle());
|
||||
}
|
||||
|
||||
private static List<AbstractPreferenceController> buildPreferenceControllers(Context context,
|
||||
Lifecycle lifecycle) {
|
||||
final List<AbstractPreferenceController> controllers = new ArrayList<>();
|
||||
final NfcPreferenceController nfcPreferenceController =
|
||||
new NfcPreferenceController(context);
|
||||
controllers.add(nfcPreferenceController);
|
||||
|
||||
if (lifecycle != null) {
|
||||
lifecycle.addObserver(nfcPreferenceController);
|
||||
}
|
||||
|
||||
return controllers;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttach(Context context) {
|
||||
super.onAttach(context);
|
||||
@@ -138,12 +116,6 @@ public class ConnectedDeviceDashboardFragment extends DashboardFragment {
|
||||
return Arrays.asList(sir);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AbstractPreferenceController> createPreferenceControllers(Context
|
||||
context) {
|
||||
return buildPreferenceControllers(context, null /* lifecycle */);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getNonIndexableKeys(Context context) {
|
||||
List<String> keys = super.getNonIndexableKeys(context);
|
||||
|
Reference in New Issue
Block a user