Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d04c885f authored by Sunny Shao's avatar Sunny Shao
Browse files

Use FooterPreference in xml explicitly

Removed the FooterPreferenceMixin from the RestrictedAppDetails page.

Fixes: 139641334
Test: manual test
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.fuelgauge
Change-Id: I6a4e56725d88353bde361de1dfff4a2a449c842c
parent 7af4e5a7
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -16,9 +16,15 @@

<PreferenceScreen
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:settings="http://schemas.android.com/apk/res-auto"
    android:title="@string/restricted_app_title">

    <PreferenceCategory
        android:key="restrict_app_list"/>

    <com.android.settingslib.widget.FooterPreference
        android:key="restricted_app_footer"
        android:title="@string/restricted_app_detail_footer"
        android:selectable="false"
        settings:searchable="false"/>
</PreferenceScreen>
+0 −5
Original line number Diff line number Diff line
@@ -47,7 +47,6 @@ import com.android.settings.fuelgauge.batterytip.tips.UnrestrictAppTip;
import com.android.settings.widget.AppCheckBoxPreference;
import com.android.settingslib.core.AbstractPreferenceController;
import com.android.settingslib.utils.StringUtil;
import com.android.settingslib.widget.FooterPreferenceMixinCompat;

import java.util.List;

@@ -76,8 +75,6 @@ public class RestrictedAppDetails extends DashboardFragment implements
    PackageManager mPackageManager;
    @VisibleForTesting
    BatteryDatabaseManager mBatteryDatabaseManager;
    private final FooterPreferenceMixinCompat mFooterPreferenceMixin =
            new FooterPreferenceMixinCompat(this, getSettingsLifecycle());

    public static void startRestrictedAppDetails(InstrumentedPreferenceFragment fragment,
            List<AppInfo> appInfos) {
@@ -97,8 +94,6 @@ public class RestrictedAppDetails extends DashboardFragment implements
        super.onCreate(icicle);
        final Context context = getContext();

        mFooterPreferenceMixin.createFooterPreference().setTitle(
                R.string.restricted_app_detail_footer);
        mRestrictedAppListGroup = (PreferenceGroup) findPreference(KEY_PREF_RESTRICTED_APP_LIST);
        mAppInfos = getArguments().getParcelableArrayList(EXTRA_APP_INFO_LIST);
        mPackageManager = context.getPackageManager();