Use FooterPreference in xml explicitly
We don't rely on FooterPreferenceMixinCompat to create footer preference in dashboard fragment. Instead, declare a FooterPreference explicitly in xml of screen. It makes more sense for our referenceController design. Test: visual, robotest Bug: 124129485 Change-Id: I0b0c0f9e38d85aa89b815ce2b84ddff30a1d206b
This commit is contained in:
@@ -31,7 +31,6 @@ import com.android.settings.R;
|
||||
import com.android.settings.dashboard.DashboardFragment;
|
||||
import com.android.settings.search.BaseSearchIndexProvider;
|
||||
import com.android.settings.search.Indexable;
|
||||
import com.android.settingslib.core.AbstractPreferenceController;
|
||||
import com.android.settingslib.search.SearchIndexable;
|
||||
|
||||
import java.time.LocalTime;
|
||||
@@ -176,17 +175,6 @@ public class NightDisplaySettings extends DashboardFragment
|
||||
return TAG;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<AbstractPreferenceController> createPreferenceControllers(Context context) {
|
||||
return buildPreferenceControllers(context);
|
||||
}
|
||||
|
||||
private static List<AbstractPreferenceController> buildPreferenceControllers(Context context) {
|
||||
final List<AbstractPreferenceController> controllers = new ArrayList<>(1);
|
||||
controllers.add(new NightDisplayFooterPreferenceController(context));
|
||||
return controllers;
|
||||
}
|
||||
|
||||
public static final Indexable.SearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
|
||||
new BaseSearchIndexProvider() {
|
||||
@Override
|
||||
@@ -203,11 +191,5 @@ public class NightDisplaySettings extends DashboardFragment
|
||||
protected boolean isPageSearchEnabled(Context context) {
|
||||
return ColorDisplayManager.isNightDisplayAvailable(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AbstractPreferenceController> createPreferenceControllers(
|
||||
Context context) {
|
||||
return buildPreferenceControllers(context);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user