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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user