Home
last modified time | relevance | path

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

/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/
DBatteryInfoTest.java110 @Mock private BatteryUsageStats mBatteryUsageStats; field in BatteryInfoTest
141 doReturn(REMAINING_TIME_NULL).when(mBatteryUsageStats).getBatteryTimeRemainingMs(); in getBatteryInfo_hasStatusLabel()
146 mBatteryUsageStats, in getBatteryInfo_hasStatusLabel()
155 doReturn(REMAINING_TIME).when(mBatteryUsageStats).getChargeTimeRemainingMs(); in getBatteryInfo_doNotShowChargingMethod_hasRemainingTime()
160 mBatteryUsageStats, in getBatteryInfo_doNotShowChargingMethod_hasRemainingTime()
169 doReturn(REMAINING_TIME_NULL).when(mBatteryUsageStats).getChargeTimeRemainingMs(); in getBatteryInfo_doNotShowChargingMethod_noRemainingTime()
174 mBatteryUsageStats, in getBatteryInfo_doNotShowChargingMethod_noRemainingTime()
184 .when(mBatteryUsageStats) in getBatteryInfo_pluggedInUsingShortString_usesCorrectData()
190 mBatteryUsageStats, in getBatteryInfo_pluggedInUsingShortString_usesCorrectData()
209 mBatteryUsageStats, in getBatteryInfo_basedOnUsageTrueMoreThanFifteenMinutes_usesCorrectString()
[all …]
DBatteryInfoLoaderTest.java50 @Mock private BatteryUsageStats mBatteryUsageStats; field in BatteryInfoLoaderTest
63 when(mBatteryUsageStats.getBatteryTimeRemainingMs()).thenReturn(TEST_TIME_REMAINING); in setUp()
65 .thenReturn(mBatteryUsageStats); in setUp()
DBatteryUtilsTest.java104 @Mock private BatteryUsageStats mBatteryUsageStats; field in BatteryUtilsTest
225 when(mBatteryUsageStats.getStatsStartTimestamp()) in testCalculateLastFullChargeTime()
228 assertThat(mBatteryUtils.calculateLastFullChargeTime(mBatteryUsageStats, currentTimeMs)) in testCalculateLastFullChargeTime()
/packages/apps/Settings/src/com/android/settings/fuelgauge/batterytip/detectors/
DHighUsageDetector.java48 private BatteryUsageStats mBatteryUsageStats; field in HighUsageDetector
61 mBatteryUsageStats = batteryUsageStats; in HighUsageDetector()
75 mBatteryUsageStats, System.currentTimeMillis()); in detect()
79 final double totalPower = mBatteryUsageStats.getConsumedPower(); in detect()
80 final int dischargeAmount = mBatteryUsageStats.getDischargePercentage(); in detect()
82 mBatteryUsageStats.getUidBatteryConsumers(); in detect()
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/appinfo/
DAppBatteryPreferenceControllerTest.java72 private BatteryUsageStats mBatteryUsageStats; field in AppBatteryPreferenceControllerTest
130 when(mBatteryUsageStats.getUidBatteryConsumers()).thenReturn(uidBatteryConsumers); in findTargetBatteryConsumer_findCorrectBatteryConsumer()
132 assertThat(mController.findTargetUidBatteryConsumer(mBatteryUsageStats, TARGET_UID)) in findTargetBatteryConsumer_findCorrectBatteryConsumer()
181 mController.mBatteryUsageStats = mBatteryUsageStats; in isBatteryStatsAvailable_hasBatteryStatsHelperAndSipper_returnTrue()
199 mController.mBatteryUsageStats = mBatteryUsageStats; in launchPowerUsageDetailFragment_shouldNotCrash()
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/batterytip/detectors/
DHighUsageDetectorTest.java69 @Mock private BatteryUsageStats mBatteryUsageStats; field in HighUsageDetectorTest
89 .thenReturn(mBatteryUsageStats); in setUp()
100 mBatteryUsageStats, in setUp()
111 when(mBatteryUsageStats.getDischargePercentage()).thenReturn(100); in setUp()
112 when(mBatteryUsageStats.getConsumedPower()).thenReturn(POWER_HIGH + POWER_LOW); in setUp()
121 when(mBatteryUsageStats.getUidBatteryConsumers()).thenReturn(consumers); in setUp()
/packages/apps/Settings/src/com/android/settings/applications/appinfo/
DAppBatteryPreferenceController.java65 BatteryUsageStats mBatteryUsageStats; field in AppBatteryPreferenceController
207 if (mBatteryUsageStats == null) { in onLoadFinished()
213 mUidBatteryConsumer = findTargetUidBatteryConsumer(mBatteryUsageStats, in onLoadFinished()
255 mBatteryUsageStats = batteryUsageStats; in onLoadFinished()
265 if (mBatteryUsageStats != null) { in closeBatteryUsageStats()
267 mBatteryUsageStats.close(); in closeBatteryUsageStats()
271 mBatteryUsageStats = null; in closeBatteryUsageStats()
/packages/apps/Settings/src/com/android/settings/fuelgauge/batteryusage/
DPowerUsageBase.java45 @VisibleForTesting BatteryUsageStats mBatteryUsageStats; field in PowerUsageBase
146 mBatteryUsageStats = batteryUsageStats; in onLoadFinished()
155 if (mBatteryUsageStats == null) { in closeBatteryUsageStatsIfNeeded()
159 mBatteryUsageStats.close(); in closeBatteryUsageStatsIfNeeded()
163 mBatteryUsageStats = null; in closeBatteryUsageStatsIfNeeded()
DPowerUsageSummary.java111 return new BatteryTipLoader(getContext(), mBatteryUsageStats);
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/batteryusage/
DBatteryUsageStatsLoaderTest.java43 @Mock private BatteryUsageStats mBatteryUsageStats; field in BatteryUsageStatsLoaderTest
61 .thenReturn(mBatteryUsageStats); in testLoadInBackground_loadWithoutHistory()
76 .thenReturn(mBatteryUsageStats); in testLoadInBackground_loadWithHistory()
DBatteryUsageDataLoaderTest.java60 @Mock private BatteryUsageStats mBatteryUsageStats; field in BatteryUsageDataLoaderTest
83 .thenReturn(mBatteryUsageStats); in loadUsageData_loadUsageDataWithHistory()
97 .thenReturn(mBatteryUsageStats); in loadUsageData_nullBatteryEntryList_insertFakeDataIntoProvider()
108 .thenReturn(mBatteryUsageStats); in loadUsageData_emptyBatteryEntryList_insertFakeDataIntoProvider()
DConvertUtilsTest.java65 @Mock private BatteryUsageStats mBatteryUsageStats; field in ConvertUtilsTest
86 when(mBatteryUsageStats.getConsumedPower()).thenReturn(5.1); in convertBatteryEntryToContentValues_appEntry_returnsExpectedContentValues()
103 mBatteryUsageStats, in convertBatteryEntryToContentValues_appEntry_returnsExpectedContentValues()
153 when(mBatteryUsageStats.getConsumedPower()).thenReturn(5.1); in convertBatteryEntryToContentValues_systemEntry_returnsExpectedContentValues()
169 mBatteryUsageStats, in convertBatteryEntryToContentValues_systemEntry_returnsExpectedContentValues()
305 when(mBatteryUsageStats.getConsumedPower()).thenReturn(5.1); in convertToBatteryHistEntry_returnsExpectedResult()
320 ConvertUtils.convertToBatteryHistEntry(mMockBatteryEntry, mBatteryUsageStats); in convertToBatteryHistEntry_returnsExpectedResult()
DDatabaseUtilsTest.java75 @Mock private BatteryUsageStats mBatteryUsageStats; field in DatabaseUtilsTest
166 mBatteryUsageStats, in sendBatteryEntryData_nullBatteryIntent_returnsNullValue()
189 mBatteryUsageStats, in sendBatteryEntryData_returnsExpectedList()
213 mBatteryUsageStats, in sendBatteryEntryData_emptyBatteryEntryList_sendFakeDataIntoProvider()
233 mBatteryUsageStats, in sendBatteryEntryData_nullBatteryEntryList_sendFakeDataIntoProvider()
DBatteryHistEntryTest.java45 @Mock private BatteryUsageStats mBatteryUsageStats; field in BatteryHistEntryTest
60 when(mBatteryUsageStats.getConsumedPower()).thenReturn(5.1); in testConstructor_contentValues_returnsExpectedResult()
76 mBatteryUsageStats, in testConstructor_contentValues_returnsExpectedResult()
DDataProcessManagerTest.java86 @Mock private BatteryUsageStats mBatteryUsageStats; field in DataProcessManagerTest
102 doReturn(mBatteryUsageStats) in setUp()
DDataProcessorTest.java81 @Mock private BatteryUsageStats mBatteryUsageStats; field in DataProcessorTest
1904 DataProcessor.convertToBatteryHistEntry(null, mBatteryUsageStats), in generateBatteryDiffData_emptyBatteryEntryList_returnEmptyBatteryDiffData()
1966 batteryEntryList, mBatteryUsageStats), in generateBatteryDiffData_returnsExpectedResult()
/packages/apps/Settings/src/com/android/settings/fuelgauge/batterytip/
DBatteryTipLoader.java44 private BatteryUsageStats mBatteryUsageStats; field in BatteryTipLoader
50 mBatteryUsageStats = batteryUsageStats; in BatteryTipLoader()
62 new HighUsageDetector(context, batteryTipPolicy, mBatteryUsageStats, batteryInfo) in loadInBackground()
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/batterytip/
DBatteryTipLoaderTest.java60 private BatteryUsageStats mBatteryUsageStats; field in BatteryTipLoaderTest
78 mBatteryTipLoader = new BatteryTipLoader(mContext, mBatteryUsageStats); in setUp()
/packages/apps/Settings/src/com/android/settings/fuelgauge/
DBatteryInfo.java64 private BatteryUsageStats mBatteryUsageStats; field in BatteryInfo
303 info.mBatteryUsageStats = batteryUsageStats; in getBatteryInfo()
584 mBatteryUsageStats.iterateBatteryStatsHistory(); in parseBatteryHistory()
628 mBatteryUsageStats.iterateBatteryStatsHistory(); in parseBatteryHistory()