am 1b4c0d70: Merge "Fix a crash in BatteryStatsImpl, due to a previous fix." into froyo

Merge commit '1b4c0d702066794b9ce97b02721aa9e552997381' into froyo-plus-aosp

* commit '1b4c0d702066794b9ce97b02721aa9e552997381':
  Fix a crash in BatteryStatsImpl, due to a previous fix.
This commit is contained in:
Amith Yamasani
2010-04-05 14:20:57 -07:00
committed by Android Git Automerger

View File

@@ -891,7 +891,10 @@ public final class BatteryStatsImpl extends BatteryStats {
for (endIndex=startIndex;
endIndex < len && wlBuffer[endIndex] != '\n' && wlBuffer[endIndex] != '\0';
endIndex++);
endIndex++; // endIndex is an exclusive upper bound.
// Don't go over the end of the buffer
if (endIndex < len) {
endIndex++; // endIndex is an exclusive upper bound.
}
String[] nameStringArray = mProcWakelocksName;
long[] wlData = mProcWakelocksData;