Home
last modified time | relevance | path

Searched refs:mBatteryInfo (Results 1 – 13 of 13) sorted by relevance

/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/batterytip/detectors/
DLowBatteryDetectorTest.java47 private BatteryInfo mBatteryInfo; field in LowBatteryDetectorTest
62 mBatteryInfo.discharging = true; in setUp()
64 mLowBatteryDetector = new LowBatteryDetector(mContext, mPolicy, mBatteryInfo); in setUp()
84 mBatteryInfo.batteryLevel = 3; in testDetect_lowBattery_tipNew()
85 mBatteryInfo.remainingTimeUs = TimeUnit.DAYS.toMillis(1); in testDetect_lowBattery_tipNew()
88 mBatteryInfo.batteryLevel = 50; in testDetect_lowBattery_tipNew()
89 mBatteryInfo.remainingTimeUs = TimeUnit.MINUTES.toMillis(1); in testDetect_lowBattery_tipNew()
102 mBatteryInfo.discharging = false; in testDetect_charging_tipInvisible()
109 mBatteryInfo.batteryLevel = 50; in testDetect_timeEstimationZero_tipInvisible()
110 mBatteryInfo.remainingTimeUs = 0; in testDetect_timeEstimationZero_tipInvisible()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/
DBatteryHeaderPreferenceControllerTest.java79 private BatteryInfo mBatteryInfo; field in BatteryHeaderPreferenceControllerTest
115 mBatteryInfo.batteryLevel = BATTERY_LEVEL; in setUp()
147 mBatteryInfo.remainingLabel = TIME_LEFT; in updatePreference_hasRemainingTime_showRemainingLabel()
149 mController.updateHeaderPreference(mBatteryInfo); in updatePreference_hasRemainingTime_showRemainingLabel()
151 assertThat(mSummary.getText()).isEqualTo(mBatteryInfo.remainingLabel); in updatePreference_hasRemainingTime_showRemainingLabel()
156 mBatteryInfo.remainingLabel = TIME_LEFT; in updatePreference_updateBatteryInfo()
157 mBatteryInfo.batteryLevel = BATTERY_LEVEL; in updatePreference_updateBatteryInfo()
158 mBatteryInfo.discharging = true; in updatePreference_updateBatteryInfo()
160 mController.updateHeaderPreference(mBatteryInfo); in updatePreference_updateBatteryInfo()
168 mBatteryInfo.remainingLabel = null; in updatePreference_noRemainingTime_showStatusLabel()
[all …]
DBatteryHistoryPreferenceTest.java51 private BatteryInfo mBatteryInfo; field in BatteryHistoryPreferenceTest
68 mBatteryHistoryPreference.mBatteryInfo = mBatteryInfo; in setUp()
81 verify(mBatteryInfo).bindHistory(mUsageView); in testOnBindViewHolder_updateBatteryUsage()
DPowerUsageSummaryTest.java126 private BatteryInfo mBatteryInfo; field in PowerUsageSummaryTest
203 mFragment.mBatteryInfo = null; in updateLastFullChargePreference_noAverageTime_showLastFullChargeSummary()
216 mFragment.mBatteryInfo = mBatteryInfo; in updateLastFullChargePreference_hasAverageTime_showFullChargeLastSummary()
217 mBatteryInfo.averageTimeToDischarge = TIME_SINCE_LAST_FULL_CHARGE_MS; in updateLastFullChargePreference_hasAverageTime_showFullChargeLastSummary()
/packages/apps/Settings/src/com/android/settings/fuelgauge/batterytip/detectors/
DLowBatteryDetector.java33 private BatteryInfo mBatteryInfo; field in LowBatteryDetector
40 mBatteryInfo = batteryInfo; in LowBatteryDetector()
49 final boolean lowBattery = mBatteryInfo.batteryLevel <= mWarningLevel in detect()
50 || (mBatteryInfo.discharging && mBatteryInfo.remainingTimeUs != 0 in detect()
51 && mBatteryInfo.remainingTimeUs < TimeUnit.HOURS.toMicros(mPolicy.lowBatteryHour)); in detect()
58 } else if (mPolicy.testLowBatteryTip || (mBatteryInfo.discharging && lowBattery)) { in detect()
65 state, powerSaveModeOn, mBatteryInfo.suggestionLabel); in detect()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/fuelgauge/batterytip/detectors/
DLowBatteryDetector.java33 private BatteryInfo mBatteryInfo; field in LowBatteryDetector
40 mBatteryInfo = batteryInfo; in LowBatteryDetector()
49 final boolean lowBattery = mBatteryInfo.batteryLevel <= mWarningLevel in detect()
50 || (mBatteryInfo.discharging && mBatteryInfo.remainingTimeUs != 0 in detect()
51 && mBatteryInfo.remainingTimeUs < TimeUnit.HOURS.toMicros(mPolicy.lowBatteryHour)); in detect()
58 } else if (mPolicy.testLowBatteryTip || (mBatteryInfo.discharging && lowBattery)) { in detect()
65 state, powerSaveModeOn, mBatteryInfo.suggestionLabel); in detect()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/fuelgauge/
DBatteryHistoryPreference.java45 BatteryInfo mBatteryInfo; field in BatteryHistoryPreference
55 mBatteryInfo = info; in setStats()
80 if (mBatteryInfo == null) { in onBindViewHolder()
84 ((TextView) view.findViewById(R.id.charge)).setText(mBatteryInfo.batteryPercentString); in onBindViewHolder()
94 mBatteryInfo.bindHistory(usageView); in onBindViewHolder()
DTopLevelBatteryPreferenceController.java36 private BatteryInfo mBatteryInfo; field in TopLevelBatteryPreferenceController
43 mBatteryInfo = info; in TopLevelBatteryPreferenceController()
74 return getDashboardLabel(mContext, mBatteryInfo); in getSummary()
DPowerUsageSummary.java94 BatteryInfo mBatteryInfo; field in PowerUsageSummary
116 mBatteryInfo = batteryInfo;
315 if (mBatteryInfo != null && mBatteryInfo.averageTimeToDischarge in updateLastFullChargePreference()
319 StringUtil.formatElapsedTime(getContext(), mBatteryInfo.averageTimeToDischarge, in updateLastFullChargePreference()
/packages/apps/Settings/src/com/android/settings/fuelgauge/
DBatteryHistoryPreference.java45 BatteryInfo mBatteryInfo; field in BatteryHistoryPreference
55 mBatteryInfo = info; in setStats()
80 if (mBatteryInfo == null) { in onBindViewHolder()
84 ((TextView) view.findViewById(R.id.charge)).setText(mBatteryInfo.batteryPercentString); in onBindViewHolder()
94 mBatteryInfo.bindHistory(usageView); in onBindViewHolder()
DTopLevelBatteryPreferenceController.java36 private BatteryInfo mBatteryInfo; field in TopLevelBatteryPreferenceController
43 mBatteryInfo = info; in TopLevelBatteryPreferenceController()
74 return getDashboardLabel(mContext, mBatteryInfo); in getSummary()
DPowerUsageSummary.java99 BatteryInfo mBatteryInfo; field in PowerUsageSummary
129 mBatteryInfo = batteryInfo;
341 if (mBatteryInfo != null && mBatteryInfo.averageTimeToDischarge in updateLastFullChargePreference()
345 StringUtil.formatElapsedTime(getContext(), mBatteryInfo.averageTimeToDischarge, in updateLastFullChargePreference()
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/batterytip/
DBatteryTipLoaderTest.java69 private BatteryInfo mBatteryInfo; field in BatteryTipLoaderTest
81 doReturn(mBatteryInfo).when(mBatteryUtils).getBatteryInfo(any(), any()); in setUp()