Add getBatteryHistory method to query data from SettingsIntelligence

Bug: 184807417
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: Idd640f8f8b07311fafc76f7b61c96c453ae7b604
This commit is contained in:
ykhung
2021-04-08 14:37:17 +08:00
committed by YUKAI HUNG
parent b6e8a1ca22
commit 318cc18f25
4 changed files with 228 additions and 46 deletions

View File

@@ -23,6 +23,9 @@ import android.util.SparseIntArray;
import com.android.internal.os.BatterySipper;
import com.android.settingslib.fuelgauge.Estimate;
import java.util.List;
import java.util.Map;
/**
* Feature Provider used in power usage
*/
@@ -126,7 +129,12 @@ public interface PowerUsageFeatureProvider {
boolean isSmartBatterySupported();
/**
* Checks whether we should enable chart graph design or not
* Checks whether we should enable chart graph design or not.
*/
boolean isChartGraphEnabled(Context context);
/**
* Returns battery history data with corresponding timestamp key.
*/
Map<Long, List<BatteryHistEntry>> getBatteryHistory(Context context);
}