Refactor battery related feature provider

Merge BatteryInfoFeatureProvider to BatterySettingsFeatureProvider. Also
add a new string to indicate the unavailability when there's error
fetching the cycle count value.

Bug: 276399056
Test: robotests
Change-Id: Ic6a641d72d5bb295f2a0766dcebdcbe855d91125
This commit is contained in:
Yi-Ling Chuang
2023-05-23 14:21:44 +08:00
parent 097cd12494
commit ee97eaf2d9
17 changed files with 132 additions and 202 deletions

View File

@@ -16,9 +16,19 @@
package com.android.settings.fuelgauge;
import android.content.ComponentName;
/** Feature provider for battery settings usage. */
public interface BatterySettingsFeatureProvider {
/** Returns true if manufacture date should be shown */
boolean isManufactureDateAvailable();
/** Returns true if first use date should be shown */
boolean isFirstUseDateAvailable();
/** Returns the summary of battery manufacture date */
CharSequence getManufactureDateSummary();
/** Returns the summary of battery first use date */
CharSequence getFirstUseDateSummary();
}