summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorConley Owens <cco3@android.com>2011-05-02 09:59:30 -0700
committerConley Owens <cco3@android.com>2011-05-02 09:59:30 -0700
commit5e3357fcee2a23a08434873a89e8ada4c6e6d893 (patch)
tree109657346b7248e970f65d1c50092b8b5a5ad50a
parentf0cae1a3f0243f176fbaa4f708e03141121876d0 (diff)
parent5eb49e0f1e8e03e8808d8d7da6d5ffb761400e0b (diff)
downloadframeworks_base-5e3357fcee2a23a08434873a89e8ada4c6e6d893.zip
frameworks_base-5e3357fcee2a23a08434873a89e8ada4c6e6d893.tar.gz
frameworks_base-5e3357fcee2a23a08434873a89e8ada4c6e6d893.tar.bz2
Merge commit '5eb49e0f' into m
Conflicts: core/java/com/android/internal/os/BatteryStatsImpl.java Change-Id: Idc9c84c2ca7dec2540ceccead7927fddb912ff12
-rw-r--r--core/java/com/android/internal/os/BatteryStatsImpl.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/com/android/internal/os/BatteryStatsImpl.java b/core/java/com/android/internal/os/BatteryStatsImpl.java
index 7cf33fc..12687a1 100644
--- a/core/java/com/android/internal/os/BatteryStatsImpl.java
+++ b/core/java/com/android/internal/os/BatteryStatsImpl.java
@@ -4904,7 +4904,7 @@ public final class BatteryStatsImpl extends BatteryStats {
void readOldHistory(Parcel in) {
mHistory = mHistoryEnd = mHistoryCache = null;
long time;
- while ((time=in.readLong()) >= 0) {
+ while (in.dataAvail() > 0 && (time=in.readLong()) >= 0) {
HistoryItem rec = new HistoryItem(time, in);
addHistoryRecordLocked(rec);
}