Home
last modified time | relevance | path

Searched refs:batteryEvent (Results 1 – 4 of 4) sorted by relevance

/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/batteryusage/
DConvertUtilsTest.java269 final BatteryEvent batteryEvent = in convertBatteryEventToContentValues_normalCase_returnsExpectedContentValues() local
275 final ContentValues values = ConvertUtils.convertBatteryEventToContentValues(batteryEvent); in convertBatteryEventToContentValues_normalCase_returnsExpectedContentValues()
557 final BatteryEvent batteryEvent = in convertToBatteryEvent_normalCase_returnsExpectedResult() local
559 assertThat(batteryEvent.getTimestamp()).isEqualTo(666L); in convertToBatteryEvent_normalCase_returnsExpectedResult()
560 assertThat(batteryEvent.getType()).isEqualTo(BatteryEventType.POWER_DISCONNECTED); in convertToBatteryEvent_normalCase_returnsExpectedResult()
561 assertThat(batteryEvent.getBatteryLevel()).isEqualTo(88); in convertToBatteryEvent_normalCase_returnsExpectedResult()
DDatabaseUtilsTest.java140 final BatteryEvent batteryEvent = in sendBatteryEventData_returnsExpectedList() local
148 DatabaseUtils.sendBatteryEventData(mContext, batteryEvent); in sendBatteryEventData_returnsExpectedList()
/packages/apps/Settings/src/com/android/settings/fuelgauge/batteryusage/
DDataProcessor.java836 BatteryEvent batteryEvent = batteryEventList.get(index); in excludePowerConnectedTimeFromAppUsagePeriodList() local
837 if (batteryEvent.getTimestamp() < inputPeriod.getStartTime()) { in excludePowerConnectedTimeFromAppUsagePeriodList()
842 if (batteryEvent.getType() == BatteryEventType.POWER_CONNECTED) { in excludePowerConnectedTimeFromAppUsagePeriodList()
844 } else if (batteryEvent.getType() == BatteryEventType.POWER_DISCONNECTED) { in excludePowerConnectedTimeFromAppUsagePeriodList()
850 if (batteryEvent.getTimestamp() > inputPeriod.getEndTime()) { in excludePowerConnectedTimeFromAppUsagePeriodList()
856 if (batteryEvent.getType() == BatteryEventType.POWER_CONNECTED in excludePowerConnectedTimeFromAppUsagePeriodList()
861 .setEndTime(batteryEvent.getTimestamp()) in excludePowerConnectedTimeFromAppUsagePeriodList()
864 } else if (batteryEvent.getType() == BatteryEventType.POWER_DISCONNECTED) { in excludePowerConnectedTimeFromAppUsagePeriodList()
865 lastStartTime = batteryEvent.getTimestamp(); in excludePowerConnectedTimeFromAppUsagePeriodList()
DDatabaseUtils.java582 final Context context, final BatteryEvent batteryEvent) { in sendBatteryEventData() argument
584 ContentValues contentValues = ConvertUtils.convertBatteryEventToContentValues(batteryEvent); in sendBatteryEventData()
588 Log.d(TAG, "insert() battery event data into database: " + batteryEvent.toString()); in sendBatteryEventData()
608 batteryEvent -> in sendBatteryEventData()
611 batteryEvent))); in sendBatteryEventData()