Home
last modified time | relevance | path

Searched refs:mBatteryStatsHelper (Results 1 – 12 of 12) sorted by relevance

/packages/apps/Settings/src/com/android/settings/fuelgauge/batterytip/detectors/
DHighUsageDetector.java47 private BatteryStatsHelper mBatteryStatsHelper; field in HighUsageDetector
59 mBatteryStatsHelper = batteryStatsHelper; in HighUsageDetector()
70 mBatteryStatsHelper, System.currentTimeMillis()); in detect()
74 final BatteryStats batteryStats = mBatteryStatsHelper.getStats(); in detect()
76 = new ArrayList<>(mBatteryStatsHelper.getUsageList()); in detect()
77 final double totalPower = mBatteryStatsHelper.getTotalPower(); in detect()
118 BatteryInfo.parse(mBatteryStatsHelper.getStats(), mDataParser); in parseBatteryData()
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/appinfo/
DAppBatteryPreferenceControllerTest.java74 private BatteryStatsHelper mBatteryStatsHelper; field in AppBatteryPreferenceControllerTest
126 when(mBatteryStatsHelper.getUsageList()).thenReturn(usageList); in findTargetSipper_findCorrectSipper()
128 assertThat(mController.findTargetSipper(mBatteryStatsHelper, TARGET_UID)) in findTargetSipper_findCorrectSipper()
144 mController.mBatteryHelper = mBatteryStatsHelper; in updateBattery_hasBatteryStats_summaryPercent()
148 doReturn(new ArrayList<>()).when(mBatteryStatsHelper).getUsageList(); in updateBattery_hasBatteryStats_summaryPercent()
158 mController.mBatteryHelper = mBatteryStatsHelper; in isBatteryStatsAvailable_hasBatteryStatsHelperAndSipper_returnTrue()
177 mController.mBatteryHelper = mBatteryStatsHelper; in launchPowerUsageDetailFragment_shouldNotCrash()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/fuelgauge/batterytip/detectors/
DHighUsageDetector.java48 private BatteryStatsHelper mBatteryStatsHelper; field in HighUsageDetector
60 mBatteryStatsHelper = batteryStatsHelper; in HighUsageDetector()
71 mBatteryStatsHelper, System.currentTimeMillis()); in detect()
75 final List<BatterySipper> batterySippers = mBatteryStatsHelper.getUsageList(); in detect()
112 BatteryInfo.parse(mBatteryStatsHelper.getStats(), mDataParser); in parseBatteryData()
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/
DBatteryUtilsTest.java156 private BatteryStatsHelper mBatteryStatsHelper; field in BatteryUtilsTest
189 when(mBatteryStatsHelper.getStats().computeBatteryRealtime(anyLong(), anyInt())).thenReturn( in setUp()
238 when(mBatteryStatsHelper.getUsageList()).thenReturn(mUsageList); in setUp()
239 when(mBatteryStatsHelper.getTotalPower()) in setUp()
241 when(mBatteryStatsHelper.getStats().getDischargeAmount(anyInt())) in setUp()
428 assertThat(mBatteryUtils.calculateRunningTimeBasedOnStatsType(mBatteryStatsHelper, in testCalculateRunningTimeBasedOnStatsType()
448 when(mBatteryStatsHelper.getStats().getStartClockTime()).thenReturn( in testCalculateLastFullChargeTime()
452 mBatteryStatsHelper, currentTimeMs)).isEqualTo(TIME_SINCE_LAST_FULL_CHARGE_MS); in testCalculateLastFullChargeTime()
523 mBatteryUtils.initBatteryStatsHelper(mBatteryStatsHelper, mBundle, mUserManager); in testInitBatteryStatsHelper_init()
525 verify(mBatteryStatsHelper).create(mBundle); in testInitBatteryStatsHelper_init()
[all …]
DAdvancedPowerUsageDetailTest.java119 private BatteryStatsHelper mBatteryStatsHelper; field in AdvancedPowerUsageDetailTest
266 mBatteryStatsHelper, 0, mBatteryEntry, USAGE_PERCENT); in testStartBatteryDetailPage_hasBasicData()
283 mBatteryStatsHelper, 0, mBatteryEntry, USAGE_PERCENT); in testStartBatteryDetailPage_typeNotApp_hasBasicData()
299 mBatteryStatsHelper, 0, mBatteryEntry, USAGE_PERCENT); in testStartBatteryDetailPage_NormalApp()
309 mBatteryStatsHelper, 0, mBatteryEntry, USAGE_PERCENT); in testStartBatteryDetailPage_SystemApp()
322 mBatteryStatsHelper, 0, mBatteryEntry, USAGE_PERCENT); in testStartBatteryDetailPage_WorkApp()
335 mBatteryStatsHelper, 0, mBatteryEntry, USAGE_PERCENT); in testStartBatteryDetailPage_typeUser_startByCurrentUser()
373 mBatteryStatsHelper, 0, mBatteryEntry, USAGE_PERCENT); in testStartBatteryDetailPage_defaultPackageNull_chooseFromBatterySipper()
DPowerUsageBaseTest.java49 private BatteryStatsHelper mBatteryStatsHelper; field in PowerUsageBaseTest
59 mFragment.setBatteryStatsHelper(mBatteryStatsHelper); in setUp()
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/batterytip/detectors/
DHighUsageDetectorTest.java62 private BatteryStatsHelper mBatteryStatsHelper; field in HighUsageDetectorTest
86 mHighUsageDetector = spy(new HighUsageDetector(mContext, mPolicy, mBatteryStatsHelper, in setUp()
102 when(mBatteryStatsHelper.getStats().getDischargeAmount(anyInt())).thenReturn(100); in setUp()
103 when(mBatteryStatsHelper.getTotalPower()).thenReturn(POWER_HIGH + POWER_LOW); in setUp()
117 when(mBatteryStatsHelper.getUsageList()).thenReturn(mUsageList); in setUp()
/packages/apps/Settings/src/com/android/settings/fuelgauge/batterytip/
DBatteryTipLoader.java51 private BatteryStatsHelper mBatteryStatsHelper; field in BatteryTipLoader
57 mBatteryStatsHelper = batteryStatsHelper; in BatteryTipLoader()
68 final BatteryInfo batteryInfo = mBatteryUtils.getBatteryInfo(mBatteryStatsHelper, TAG); in loadInBackground()
72 tips.add(new HighUsageDetector(context, policy, mBatteryStatsHelper, in loadInBackground()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/fuelgauge/batterytip/
DBatteryTipLoader.java51 private BatteryStatsHelper mBatteryStatsHelper; field in BatteryTipLoader
57 mBatteryStatsHelper = batteryStatsHelper; in BatteryTipLoader()
68 final BatteryInfo batteryInfo = mBatteryUtils.getBatteryInfo(mBatteryStatsHelper, TAG); in loadInBackground()
72 tips.add(new HighUsageDetector(context, policy, mBatteryStatsHelper, in loadInBackground()
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/batterytip/
DBatteryTipLoaderTest.java61 private BatteryStatsHelper mBatteryStatsHelper; field in BatteryTipLoaderTest
82 mBatteryTipLoader = new BatteryTipLoader(mContext, mBatteryStatsHelper); in setUp()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/fuelgauge/
DBatteryAppListPreferenceController.java74 private BatteryStatsHelper mBatteryStatsHelper; field in BatteryAppListPreferenceController
165 mFragment, mBatteryStatsHelper, STATS_TYPE, entry, pgp.getPercent()); in handlePreferenceTreeClick()
176 mBatteryStatsHelper = statsHelper; in refreshAppListGroup()
/packages/apps/Settings/src/com/android/settings/fuelgauge/
DBatteryAppListPreferenceController.java74 private BatteryStatsHelper mBatteryStatsHelper; field in BatteryAppListPreferenceController
165 mFragment, mBatteryStatsHelper, STATS_TYPE, entry, pgp.getPercent()); in handlePreferenceTreeClick()
176 mBatteryStatsHelper = statsHelper; in refreshAppListGroup()