/packages/apps/Settings/src/com/android/settings/fuelgauge/batterytip/detectors/ |
D | HighUsageDetector.java | 47 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/ |
D | AppBatteryPreferenceControllerTest.java | 74 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/ |
D | HighUsageDetector.java | 48 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/ |
D | BatteryUtilsTest.java | 156 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 …]
|
D | AdvancedPowerUsageDetailTest.java | 119 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()
|
D | PowerUsageBaseTest.java | 49 private BatteryStatsHelper mBatteryStatsHelper; field in PowerUsageBaseTest 59 mFragment.setBatteryStatsHelper(mBatteryStatsHelper); in setUp()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/batterytip/detectors/ |
D | HighUsageDetectorTest.java | 62 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/ |
D | BatteryTipLoader.java | 51 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/ |
D | BatteryTipLoader.java | 51 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/ |
D | BatteryTipLoaderTest.java | 61 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/ |
D | BatteryAppListPreferenceController.java | 74 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/ |
D | BatteryAppListPreferenceController.java | 74 private BatteryStatsHelper mBatteryStatsHelper; field in BatteryAppListPreferenceController 165 mFragment, mBatteryStatsHelper, STATS_TYPE, entry, pgp.getPercent()); in handlePreferenceTreeClick() 176 mBatteryStatsHelper = statsHelper; in refreshAppListGroup()
|