Home
last modified time | relevance | path

Searched refs:Estimate (Results 1 – 16 of 16) sorted by relevance

/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/
DBatteryInfoTest.java44 import com.android.settingslib.fuelgauge.Estimate;
77 private static final Estimate DUMMY_ESTIMATE = new Estimate(
142 Estimate estimate = new Estimate(Duration.ofHours(4).toMillis(), in testGetBatteryInfo_basedOnUsageTrueMoreThanFifteenMinutes_usesCorrectString()
162 Estimate estimate = new Estimate(Duration.ofMinutes(7).toMillis(), in testGetBatteryInfo_basedOnUsageTrueLessThanSevenMinutes_usesCorrectString()
182 Estimate estimate = new Estimate(Duration.ofDays(3).toMillis(), in getBatteryInfo_MoreThanOneDay_suggestionLabelIsCorrectString()
195 Estimate estimate = new Estimate(Duration.ofMinutes(10).toMillis(), in testGetBatteryInfo_basedOnUsageTrueBetweenSevenAndFifteenMinutes_usesCorrectString()
328 Estimate batteryEstimate = new Estimate( in getBatteryInfo()
DBatteryUtilsTest.java65 import com.android.settingslib.fuelgauge.Estimate;
744 Estimate estimate = new Estimate(1000, true, 1000); in getEnhancedEstimate_doesNotUpdateCache_ifEstimateFresh()
745 Estimate.storeCachedEstimate(mContext, estimate); in getEnhancedEstimate_doesNotUpdateCache_ifEstimateFresh()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/fuelgauge/
DBatteryInfo.java47 public long averageTimeToDischarge = Estimate.AVERAGE_TIME_TO_DISCHARGE_UNKNOWN;
192 Estimate estimate = provider.getEnhancedBatteryPrediction(context); in getBatteryInfo()
202 final Estimate estimate = new Estimate( in getBatteryInfo()
205 Estimate.AVERAGE_TIME_TO_DISCHARGE_UNKNOWN); in getBatteryInfo()
214 Estimate estimate = new Estimate( in getBatteryInfoOld()
217 Estimate.AVERAGE_TIME_TO_DISCHARGE_UNKNOWN); in getBatteryInfoOld()
224 BatteryStats stats, Estimate estimate, long elapsedRealtimeUs, boolean shortString) { in getBatteryInfo()
271 Estimate estimate, BatteryInfo info) { in updateBatteryInfoDischarging()
DDebugEstimatesLoader.java61 Estimate estimate = powerUsageFeatureProvider.getEnhancedBatteryPrediction(context); in loadInBackground()
63 estimate = new Estimate(0, false, Estimate.AVERAGE_TIME_TO_DISCHARGE_UNKNOWN); in loadInBackground()
DEstimate.java3 public class Estimate { class
12 public Estimate(long estimateMillis, boolean isBasedOnUsage, in Estimate() method in Estimate
DBatteryUtils.java452 Estimate estimate = null; in getBatteryInfo()
460 estimate = new Estimate( in getBatteryInfo()
463 Estimate.AVERAGE_TIME_TO_DISCHARGE_UNKNOWN); in getBatteryInfo()
DPowerUsageFeatureProvider.java68 Estimate getEnhancedBatteryPrediction(Context context); in getEnhancedBatteryPrediction()
DPowerUsageFeatureProviderImpl.java93 public Estimate getEnhancedBatteryPrediction(Context context) { in getEnhancedBatteryPrediction()
DPowerUsageSummary.java316 != Estimate.AVERAGE_TIME_TO_DISCHARGE_UNKNOWN) { in updateLastFullChargePreference()
/packages/apps/Settings/src/com/android/settings/fuelgauge/
DBatteryInfo.java37 import com.android.settingslib.fuelgauge.Estimate;
194 Estimate estimate = provider.getEnhancedBatteryPrediction(context); in getBatteryInfo()
196 Estimate.storeCachedEstimate(context, estimate); in getBatteryInfo()
205 final Estimate estimate = new Estimate( in getBatteryInfo()
217 Estimate estimate = new Estimate( in getBatteryInfoOld()
227 BatteryStats stats, Estimate estimate, long elapsedRealtimeUs, boolean shortString) { in getBatteryInfo()
274 Estimate estimate, BatteryInfo info) { in updateBatteryInfoDischarging()
DBatteryUtils.java51 import com.android.settingslib.fuelgauge.Estimate;
478 Estimate estimate = getEnhancedEstimate(); in getBatteryInfo()
482 estimate = new Estimate( in getBatteryInfo()
497 Estimate getEnhancedEstimate() { in getEnhancedEstimate()
498 Estimate estimate = null; in getEnhancedEstimate()
500 if (Duration.between(Estimate.getLastCacheUpdateTime(mContext), Instant.now()) in getEnhancedEstimate()
502 estimate = Estimate.getCachedEstimateIfAvailable(mContext); in getEnhancedEstimate()
507 Estimate.storeCachedEstimate(mContext, estimate); in getEnhancedEstimate()
DDebugEstimatesLoader.java26 import com.android.settingslib.fuelgauge.Estimate;
63 Estimate estimate = powerUsageFeatureProvider.getEnhancedBatteryPrediction(context); in loadInBackground()
65 estimate = new Estimate(0, false, EstimateKt.AVERAGE_TIME_TO_DISCHARGE_UNKNOWN); in loadInBackground()
DPowerUsageFeatureProvider.java24 import com.android.settingslib.fuelgauge.Estimate;
69 Estimate getEnhancedBatteryPrediction(Context context); in getEnhancedBatteryPrediction()
DPowerUsageFeatureProviderImpl.java27 import com.android.settingslib.fuelgauge.Estimate;
94 public Estimate getEnhancedBatteryPrediction(Context context) { in getEnhancedBatteryPrediction()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/fuelgauge/batterytip/
DBatteryTipLoader.java26 import com.android.car.developeroptions.fuelgauge.Estimate;
90 Estimate.AVERAGE_TIME_TO_DISCHARGE_UNKNOWN)); in getFakeData()
DBatteryTipPreferenceController.java29 import com.android.car.developeroptions.fuelgauge.Estimate;
96 Estimate.AVERAGE_TIME_TO_DISCHARGE_UNKNOWN); in displayPreference()