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

Commit 298ffee3 authored by Rajeev Kumar's avatar Rajeev Kumar
Browse files

Get rid of unnecessary KEY_RESTRICT_BACKGROUND preference.

This preference is not needed for Data plan settings page. This change
fixes the NPE which happens because we try to remove a preference which
is not added to the settings preference fragment.
Test: make RunSettingsRoboTests -j40
Bug: 64068792

Change-Id: Ibbcf1637b8aed1a94542ea3786170f2f318df4a9
parent eafcc98a
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -53,7 +53,6 @@ import java.util.List;

public class DataPlanUsageSummary extends DataUsageBase implements Indexable {

    public static final String KEY_RESTRICT_BACKGROUND = "restrict_background";
    public static final String KEY_DATA_PLAN_USAGE = "data_plan_usage";

    public static final String KEY_STATUS_HEADER = "status_header";
@@ -100,10 +99,6 @@ public class DataPlanUsageSummary extends DataUsageBase implements Indexable {
        }
        mDefaultTemplate = DataUsageUtils.getDefaultTemplate(context, defaultSubId);

        if (!hasMobileData || !isAdmin()) {
            removePreference(KEY_RESTRICT_BACKGROUND);
        }

        if (hasMobileData) {
            addDataPlanSection(defaultSubId);
        }