Remove isChartGraphEnabled() which should always return true after

migration.

Bug: 253395332
Test: make RunSettingsRoboTests + manually
Change-Id: I0c4a6e00a7a9fd66d4050e5ddcf87176462067cd
This commit is contained in:
Kuan Wang
2022-10-25 15:44:43 +08:00
parent a79edc3b56
commit 628f12c1ad
10 changed files with 36 additions and 396 deletions

View File

@@ -480,15 +480,10 @@ public class AdvancedPowerUsageDetail extends DashboardFragment implements
final String slotTime = bundle.getString(EXTRA_SLOT_TIME, null);
final long totalTimeMs = foregroundTimeMs + backgroundTimeMs;
final CharSequence usageTimeSummary;
final boolean isChartGraphEnabled = FeatureFactory.getFactory(getContext())
.getPowerUsageFeatureProvider(getContext()).isChartGraphEnabled(getContext());
if (!isChartGraphEnabled && BatteryEntry.isSystemUid(uid)) {
return null;
}
if (totalTimeMs == 0) {
usageTimeSummary = getText(
isChartGraphEnabled && consumedPower > 0 ? R.string.battery_usage_without_time
consumedPower > 0 ? R.string.battery_usage_without_time
: R.string.battery_not_usage);
} else if (slotTime == null) {
// Shows summary text with last full charge if slot time is null.