Home
last modified time | relevance | path

Searched refs:mBatteryUsageStats (Results 1 – 17 of 17) sorted by relevance

/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/
DBatteryInfoTest.java88 private BatteryUsageStats mBatteryUsageStats; field in BatteryInfoTest
103 doReturn(REMAINING_TIME_NULL).when(mBatteryUsageStats).getBatteryTimeRemainingMs(); in testGetBatteryInfo_hasStatusLabel()
105 mDisChargingBatteryBroadcast, mBatteryUsageStats, in testGetBatteryInfo_hasStatusLabel()
114 doReturn(REMAINING_TIME).when(mBatteryUsageStats).getChargeTimeRemainingMs(); in testGetBatteryInfo_doNotShowChargingMethod_hasRemainingTime()
116 mBatteryUsageStats, SystemClock.elapsedRealtime() * 1000, false /* shortString */); in testGetBatteryInfo_doNotShowChargingMethod_hasRemainingTime()
123 doReturn(REMAINING_TIME_NULL).when(mBatteryUsageStats).getChargeTimeRemainingMs(); in testGetBatteryInfo_doNotShowChargingMethod_noRemainingTime()
125 mBatteryUsageStats, SystemClock.elapsedRealtime() * 1000, false /* shortString */); in testGetBatteryInfo_doNotShowChargingMethod_noRemainingTime()
133 .when(mBatteryUsageStats).getChargeTimeRemainingMs(); in testGetBatteryInfo_pluggedInUsingShortString_usesCorrectData()
135 mBatteryUsageStats, SystemClock.elapsedRealtime() * 1000, true /* shortString */); in testGetBatteryInfo_pluggedInUsingShortString_usesCorrectData()
147 mBatteryUsageStats, estimate, SystemClock.elapsedRealtime() * 1000, in testGetBatteryInfo_basedOnUsageTrueMoreThanFifteenMinutes_usesCorrectString()
[all …]
DBatteryUsageStatsLoaderTest.java45 private BatteryUsageStats mBatteryUsageStats; field in BatteryUsageStatsLoaderTest
63 .thenReturn(mBatteryUsageStats); in testLoadInBackground_loadWithoutHistory()
78 .thenReturn(mBatteryUsageStats); in testLoadInBackground_loadWithHistory()
DBatteryInfoLoaderTest.java52 private BatteryUsageStats mBatteryUsageStats; field in BatteryInfoLoaderTest
65 when(mBatteryUsageStats.getBatteryTimeRemainingMs()).thenReturn(TEST_TIME_REMAINING); in setUp()
67 .thenReturn(mBatteryUsageStats); in setUp()
DBatteryHistEntryTest.java43 private BatteryUsageStats mBatteryUsageStats; field in BatteryHistEntryTest
58 when(mBatteryUsageStats.getConsumedPower()).thenReturn(5.1); in testConstructor_contentValues_returnsExpectedResult()
69 mBatteryUsageStats, in testConstructor_contentValues_returnsExpectedResult()
DConvertUtilsTest.java53 @Mock private BatteryUsageStats mBatteryUsageStats; field in ConvertUtilsTest
75 when(mBatteryUsageStats.getConsumedPower()).thenReturn(5.1); in testConvert_returnsExpectedContentValues()
87 mBatteryUsageStats, in testConvert_returnsExpectedContentValues()
DBatteryUtilsTest.java114 private BatteryUsageStats mBatteryUsageStats; field in BatteryUtilsTest
264 when(mBatteryUsageStats.getStatsStartTimestamp()).thenReturn( in testCalculateLastFullChargeTime()
267 assertThat(mBatteryUtils.calculateLastFullChargeTime(mBatteryUsageStats, currentTimeMs)) in testCalculateLastFullChargeTime()
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/appinfo/
DAppBatteryPreferenceControllerTest.java69 private BatteryUsageStats mBatteryUsageStats; field in AppBatteryPreferenceControllerTest
127 when(mBatteryUsageStats.getUidBatteryConsumers()).thenReturn(uidBatteryConsumers); in findTargetBatteryConsumer_findCorrectBatteryConsumer()
129 assertThat(mController.findTargetUidBatteryConsumer(mBatteryUsageStats, TARGET_UID)) in findTargetBatteryConsumer_findCorrectBatteryConsumer()
145 mController.mBatteryUsageStats = mBatteryUsageStats; in updateBattery_hasBatteryStats_summaryPercent()
181 mController.mBatteryUsageStats = mBatteryUsageStats; in isBatteryStatsAvailable_hasBatteryStatsHelperAndSipper_returnTrue()
199 mController.mBatteryUsageStats = mBatteryUsageStats; in launchPowerUsageDetailFragment_shouldNotCrash()
/packages/apps/Settings/src/com/android/settings/fuelgauge/batterytip/detectors/
DHighUsageDetector.java45 private BatteryUsageStats mBatteryUsageStats; field in HighUsageDetector
58 mBatteryUsageStats = batteryUsageStats; in HighUsageDetector()
70 mBatteryUsageStats, System.currentTimeMillis()); in detect()
74 final double totalPower = mBatteryUsageStats.getConsumedPower(); in detect()
75 final int dischargeAmount = mBatteryUsageStats.getDischargePercentage(); in detect()
77 mBatteryUsageStats.getUidBatteryConsumers(); in detect()
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/batterytip/detectors/
DHighUsageDetectorTest.java74 private BatteryUsageStats mBatteryUsageStats; field in HighUsageDetectorTest
95 .thenReturn(mBatteryUsageStats); in setUp()
100 mHighUsageDetector = spy(new HighUsageDetector(mContext, mPolicy, mBatteryUsageStats, in setUp()
111 when(mBatteryUsageStats.getDischargePercentage()).thenReturn(100); in setUp()
112 when(mBatteryUsageStats.getConsumedPower()).thenReturn(POWER_HIGH + POWER_LOW); in setUp()
125 when(mBatteryUsageStats.getUidBatteryConsumers()).thenReturn(consumers); in setUp()
/packages/apps/Settings/src/com/android/settings/applications/appinfo/
DAppBatteryPreferenceController.java68 BatteryUsageStats mBatteryUsageStats; field in AppBatteryPreferenceController
232 if (mBatteryUsageStats == null) {
238 mUidBatteryConsumer = findTargetUidBatteryConsumer(mBatteryUsageStats,
275 mUidBatteryConsumer.getConsumedPower(), mBatteryUsageStats.getConsumedPower(),
276 mBatteryUsageStats.getDischargePercentage());
312 mBatteryUsageStats = batteryUsageStats;
/packages/apps/Settings/src/com/android/settings/fuelgauge/
DBatteryAppListPreferenceController.java75 private BatteryUsageStats mBatteryUsageStats; field in BatteryAppListPreferenceController
205 mBatteryUsageStats = USE_FAKE_DATA ? getFakeStats() : batteryUsageStats; in refreshAppListGroup()
269 mBatteryUsageStats = USE_FAKE_DATA ? getFakeStats() : batteryUsageStats; in getBatteryEntryList()
307 mBatteryUsageStats.getUidBatteryConsumers(); in getCoalescedUsageList()
340 final BatteryConsumer deviceConsumer = mBatteryUsageStats.getAggregateBatteryConsumer( in getCoalescedUsageList()
342 final BatteryConsumer appsConsumer = mBatteryUsageStats.getAggregateBatteryConsumer( in getCoalescedUsageList()
374 mBatteryUsageStats.getUserBatteryConsumers(); in getCoalescedUsageList()
DPowerUsageBase.java46 BatteryUsageStats mBatteryUsageStats; field in PowerUsageBase
104 historyPref.setBatteryUsageStats(mBatteryUsageStats); in updatePreference()
122 mBatteryUsageStats = batteryUsageStats; in onLoadFinished()
DBatteryInfo.java58 private BatteryUsageStats mBatteryUsageStats; field in BatteryInfo
232 info.mBatteryUsageStats = batteryUsageStats; in getBatteryInfo()
339 mBatteryUsageStats.iterateBatteryStatsHistory(); in parseBatteryHistory()
384 mBatteryUsageStats.iterateBatteryStatsHistory(); in parseBatteryHistory()
DPowerUsageAdvanced.java141 if (mBatteryAppListPreferenceController != null && mBatteryUsageStats != null) { in refreshUi()
144 mBatteryUsageStats, /* showAllApps */true); in refreshUi()
DPowerUsageSummary.java123 return new BatteryTipLoader(getContext(), mBatteryUsageStats);
/packages/apps/Settings/src/com/android/settings/fuelgauge/batterytip/
DBatteryTipLoader.java50 private BatteryUsageStats mBatteryUsageStats; field in BatteryTipLoader
56 mBatteryUsageStats = batteryUsageStats; in BatteryTipLoader()
71 tips.add(new HighUsageDetector(context, policy, mBatteryUsageStats, batteryInfo).detect()); in loadInBackground()
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/batterytip/
DBatteryTipLoaderTest.java59 private BatteryUsageStats mBatteryUsageStats; field in BatteryTipLoaderTest
80 mBatteryTipLoader = new BatteryTipLoader(mContext, mBatteryUsageStats); in setUp()