Move allowed list definition in the battery usage to feature provider

Bug: 199367609
Test: make SettingsRoboTests
Change-Id: I321426e6ff1b9586ee493792f1d39aed35ecc34d
Signed-off-by: ykhung <ykhung@google.com>
This commit is contained in:
ykhung
2021-09-09 17:25:08 +08:00
parent 88cd5025e1
commit b62cdecc67
7 changed files with 26 additions and 14 deletions

View File

@@ -121,14 +121,16 @@ public class BatteryChartPreferenceController extends AbstractPreferenceControll
mFragment = fragment;
mPreferenceKey = preferenceKey;
mIs24HourFormat = DateFormat.is24HourFormat(context);
mNotAllowShowSummaryPackages = context.getResources()
.getTextArray(R.array.allowlist_hide_summary_in_battery_usage);
mMetricsFeatureProvider =
FeatureFactory.getFactory(mContext).getMetricsFeatureProvider();
mNotAllowShowEntryPackages =
FeatureFactory.getFactory(mContext)
FeatureFactory.getFactory(context)
.getPowerUsageFeatureProvider(context)
.getHideApplicationEntries(mContext);
.getHideApplicationEntries(context);
mNotAllowShowSummaryPackages =
FeatureFactory.getFactory(context)
.getPowerUsageFeatureProvider(context)
.getHideApplicationSummary(context);
if (lifecycle != null) {
lifecycle.addObserver(this);
}