Work on issue #17656716: Unhandled exception in Window Manager
Remove the checks for large parcel sizes. Those were triggering,
and identifyng the area of the problem, but also cause a lot of
trouble by making the unsafe deadlocky code there much more likely
to deadlock.
Add logging for strict mode IPCs, since those seem to be the
problem. Only log when things look bad.
Also add a log when battery stats are reset, to diagnose why they
are getting reset when they shouldn't be.
Change-Id: I588c858fb8d8c45f3c9c164ae2de9ae01547b304
diff --git a/core/java/com/android/internal/os/BatteryStatsImpl.java b/core/java/com/android/internal/os/BatteryStatsImpl.java
index 81705be..42fc613 100644
--- a/core/java/com/android/internal/os/BatteryStatsImpl.java
+++ b/core/java/com/android/internal/os/BatteryStatsImpl.java
@@ -6748,6 +6748,9 @@
|| getLowDischargeAmountSinceCharge() >= 60)
|| (getHighDischargeAmountSinceCharge() >= 60
&& mHistoryBuffer.dataSize() >= MAX_HISTORY_BUFFER)) {
+ Slog.i(TAG, "Resetting battery stats: level=" + level + " status=" + oldStatus
+ + " lowAmount=" + getLowDischargeAmountSinceCharge()
+ + " highAmount=" + getHighDischargeAmountSinceCharge());
// Before we write, collect a snapshot of the final aggregated
// stats to be reported in the next checkin. Only do this if we have
// a sufficient amount of data to make it interesting.