/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/ |
D | BatteryInfoTest.java | 88 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 …]
|
D | BatteryUsageStatsLoaderTest.java | 45 private BatteryUsageStats mBatteryUsageStats; field in BatteryUsageStatsLoaderTest 63 .thenReturn(mBatteryUsageStats); in testLoadInBackground_loadWithoutHistory() 78 .thenReturn(mBatteryUsageStats); in testLoadInBackground_loadWithHistory()
|
D | BatteryInfoLoaderTest.java | 52 private BatteryUsageStats mBatteryUsageStats; field in BatteryInfoLoaderTest 65 when(mBatteryUsageStats.getBatteryTimeRemainingMs()).thenReturn(TEST_TIME_REMAINING); in setUp() 67 .thenReturn(mBatteryUsageStats); in setUp()
|
D | BatteryHistEntryTest.java | 43 private BatteryUsageStats mBatteryUsageStats; field in BatteryHistEntryTest 58 when(mBatteryUsageStats.getConsumedPower()).thenReturn(5.1); in testConstructor_contentValues_returnsExpectedResult() 69 mBatteryUsageStats, in testConstructor_contentValues_returnsExpectedResult()
|
D | ConvertUtilsTest.java | 53 @Mock private BatteryUsageStats mBatteryUsageStats; field in ConvertUtilsTest 75 when(mBatteryUsageStats.getConsumedPower()).thenReturn(5.1); in testConvert_returnsExpectedContentValues() 87 mBatteryUsageStats, in testConvert_returnsExpectedContentValues()
|
D | BatteryUtilsTest.java | 114 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/ |
D | AppBatteryPreferenceControllerTest.java | 69 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/ |
D | HighUsageDetector.java | 45 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/ |
D | HighUsageDetectorTest.java | 74 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/ |
D | AppBatteryPreferenceController.java | 68 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/ |
D | BatteryAppListPreferenceController.java | 75 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()
|
D | PowerUsageBase.java | 46 BatteryUsageStats mBatteryUsageStats; field in PowerUsageBase 104 historyPref.setBatteryUsageStats(mBatteryUsageStats); in updatePreference() 122 mBatteryUsageStats = batteryUsageStats; in onLoadFinished()
|
D | BatteryInfo.java | 58 private BatteryUsageStats mBatteryUsageStats; field in BatteryInfo 232 info.mBatteryUsageStats = batteryUsageStats; in getBatteryInfo() 339 mBatteryUsageStats.iterateBatteryStatsHistory(); in parseBatteryHistory() 384 mBatteryUsageStats.iterateBatteryStatsHistory(); in parseBatteryHistory()
|
D | PowerUsageAdvanced.java | 141 if (mBatteryAppListPreferenceController != null && mBatteryUsageStats != null) { in refreshUi() 144 mBatteryUsageStats, /* showAllApps */true); in refreshUi()
|
D | PowerUsageSummary.java | 123 return new BatteryTipLoader(getContext(), mBatteryUsageStats);
|
/packages/apps/Settings/src/com/android/settings/fuelgauge/batterytip/ |
D | BatteryTipLoader.java | 50 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/ |
D | BatteryTipLoaderTest.java | 59 private BatteryUsageStats mBatteryUsageStats; field in BatteryTipLoaderTest 80 mBatteryTipLoader = new BatteryTipLoader(mContext, mBatteryUsageStats); in setUp()
|