Clean FooterPreferenceMixin and FooterPreferenceMixinCompat
Fixes: 124129485 Test: manual test Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.core Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.SettingsPreferenceFragmentTest Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.bluetooth Change-Id: I920d0de403b9c7109de0e2e53be7ed99bc8e7390
This commit is contained in:
@@ -58,7 +58,6 @@
|
||||
android:title="@string/night_display_text"
|
||||
android:selectable="false"
|
||||
settings:allowDividerAbove="true"
|
||||
settings:searchable="false"
|
||||
settings:controller="com.android.settings.display.NightDisplayFooterPreferenceController"/>
|
||||
|
||||
</PreferenceScreen>
|
@@ -53,7 +53,6 @@ import com.android.settings.widget.LoadingViewController;
|
||||
import com.android.settingslib.CustomDialogPreferenceCompat;
|
||||
import com.android.settingslib.CustomEditTextPreferenceCompat;
|
||||
import com.android.settingslib.core.instrumentation.Instrumentable;
|
||||
import com.android.settingslib.widget.FooterPreferenceMixinCompat;
|
||||
import com.android.settingslib.widget.LayoutPreference;
|
||||
|
||||
import java.util.UUID;
|
||||
@@ -68,10 +67,6 @@ public abstract class SettingsPreferenceFragment extends InstrumentedPreferenceF
|
||||
|
||||
private static final String SAVE_HIGHLIGHTED_KEY = "android:preference_highlighted";
|
||||
|
||||
protected final FooterPreferenceMixinCompat mFooterPreferenceMixin =
|
||||
new FooterPreferenceMixinCompat(this, getSettingsLifecycle());
|
||||
|
||||
|
||||
private static final int ORDER_FIRST = -1;
|
||||
|
||||
private SettingsDialogFragment mDialogFragment;
|
||||
@@ -317,8 +312,7 @@ public abstract class SettingsPreferenceFragment extends InstrumentedPreferenceF
|
||||
if (getPreferenceScreen() != null) {
|
||||
final View listContainer = getActivity().findViewById(android.R.id.list_container);
|
||||
boolean show = (getPreferenceScreen().getPreferenceCount()
|
||||
- (mHeader != null ? 1 : 0)
|
||||
- (mFooterPreferenceMixin.hasFooter() ? 1 : 0)) <= 0
|
||||
- (mHeader != null ? 1 : 0)) <= 0
|
||||
|| (listContainer != null && listContainer.getVisibility() != View.VISIBLE);
|
||||
mEmptyView.setVisibility(show ? View.VISIBLE : View.GONE);
|
||||
} else {
|
||||
|
@@ -32,7 +32,7 @@ import com.android.settingslib.widget.FooterPreference;
|
||||
public class BluetoothDetailsMacAddressController extends BluetoothDetailsController {
|
||||
public static final String KEY_DEVICE_DETAILS_FOOTER = "device_details_footer";
|
||||
|
||||
FooterPreference mFooterPreference;
|
||||
private FooterPreference mFooterPreference;
|
||||
|
||||
public BluetoothDetailsMacAddressController(Context context,
|
||||
PreferenceFragmentCompat fragment,
|
||||
|
Reference in New Issue
Block a user