diff --git a/src/com/android/settings/fuelgauge/batteryusage/DataProcessor.java b/src/com/android/settings/fuelgauge/batteryusage/DataProcessor.java
index ec1a4be..8818431 100644
--- a/src/com/android/settings/fuelgauge/batteryusage/DataProcessor.java
+++ b/src/com/android/settings/fuelgauge/batteryusage/DataProcessor.java
@@ -852,9 +852,11 @@
             final List<AppUsagePeriod> usagePeriodList,
             final List<BatteryEvent> batteryEventList) {
         final List<AppUsagePeriod> resultList = new ArrayList<>();
+        int index = 0;
         for (AppUsagePeriod inputPeriod : usagePeriodList) {
             long lastStartTime = inputPeriod.getStartTime();
-            for (BatteryEvent batteryEvent : batteryEventList) {
+            while (index < batteryEventList.size()) {
+                BatteryEvent batteryEvent = batteryEventList.get(index);
                 if (batteryEvent.getTimestamp() < inputPeriod.getStartTime()) {
                     // Because the batteryEventList has been sorted, here is to mark the power
                     // connection state when the usage period starts. If power is connected when
@@ -865,6 +867,7 @@
                     } else if (batteryEvent.getType() == BatteryEventType.POWER_DISCONNECTED) {
                         lastStartTime = inputPeriod.getStartTime();
                     }
+                    index++;
                     continue;
                 }
                 if (batteryEvent.getTimestamp() > inputPeriod.getEndTime()) {
@@ -883,6 +886,7 @@
                 } else if (batteryEvent.getType() == BatteryEventType.POWER_DISCONNECTED) {
                     lastStartTime = batteryEvent.getTimestamp();
                 }
+                index++;
             }
             if (lastStartTime != 0) {
                 resultList.add(AppUsagePeriod.newBuilder()
