/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/ |
D | BatteryInfoTest.java | 110 @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 …]
|
D | BatteryInfoLoaderTest.java | 50 @Mock private BatteryUsageStats mBatteryUsageStats; field in BatteryInfoLoaderTest 63 when(mBatteryUsageStats.getBatteryTimeRemainingMs()).thenReturn(TEST_TIME_REMAINING); in setUp() 65 .thenReturn(mBatteryUsageStats); in setUp()
|
D | BatteryUtilsTest.java | 104 @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/ |
D | HighUsageDetector.java | 48 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/ |
D | AppBatteryPreferenceControllerTest.java | 72 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/ |
D | HighUsageDetectorTest.java | 69 @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/ |
D | AppBatteryPreferenceController.java | 65 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/ |
D | PowerUsageBase.java | 45 @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()
|
D | PowerUsageSummary.java | 111 return new BatteryTipLoader(getContext(), mBatteryUsageStats);
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/batteryusage/ |
D | BatteryUsageStatsLoaderTest.java | 43 @Mock private BatteryUsageStats mBatteryUsageStats; field in BatteryUsageStatsLoaderTest 61 .thenReturn(mBatteryUsageStats); in testLoadInBackground_loadWithoutHistory() 76 .thenReturn(mBatteryUsageStats); in testLoadInBackground_loadWithHistory()
|
D | BatteryUsageDataLoaderTest.java | 60 @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()
|
D | ConvertUtilsTest.java | 65 @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()
|
D | DatabaseUtilsTest.java | 75 @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()
|
D | BatteryHistEntryTest.java | 45 @Mock private BatteryUsageStats mBatteryUsageStats; field in BatteryHistEntryTest 60 when(mBatteryUsageStats.getConsumedPower()).thenReturn(5.1); in testConstructor_contentValues_returnsExpectedResult() 76 mBatteryUsageStats, in testConstructor_contentValues_returnsExpectedResult()
|
D | DataProcessManagerTest.java | 86 @Mock private BatteryUsageStats mBatteryUsageStats; field in DataProcessManagerTest 102 doReturn(mBatteryUsageStats) in setUp()
|
D | DataProcessorTest.java | 81 @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/ |
D | BatteryTipLoader.java | 44 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/ |
D | BatteryTipLoaderTest.java | 60 private BatteryUsageStats mBatteryUsageStats; field in BatteryTipLoaderTest 78 mBatteryTipLoader = new BatteryTipLoader(mContext, mBatteryUsageStats); in setUp()
|
/packages/apps/Settings/src/com/android/settings/fuelgauge/ |
D | BatteryInfo.java | 64 private BatteryUsageStats mBatteryUsageStats; field in BatteryInfo 303 info.mBatteryUsageStats = batteryUsageStats; in getBatteryInfo() 584 mBatteryUsageStats.iterateBatteryStatsHistory(); in parseBatteryHistory() 628 mBatteryUsageStats.iterateBatteryStatsHistory(); in parseBatteryHistory()
|