Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e27c176e authored by Amith Yamasani's avatar Amith Yamasani Committed by Android Git Automerger
Browse files

am c2e060cb: am 0913ce95: Merge "Potential fix for bug: 2564824 : Device...

am c2e060cb: am 0913ce95: Merge "Potential fix for bug: 2564824 : Device runtime restart in BatteryService" into froyo

Merge commit 'c2e060cb' into kraken

* commit 'c2e060cb':
  Potential fix for bug: 2564824 : Device runtime restart in BatteryService
parents 1ea99657 c2e060cb
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -895,6 +895,12 @@ public final class BatteryStatsImpl extends BatteryStats {

                String[] nameStringArray = mProcWakelocksName;
                long[] wlData = mProcWakelocksData;
                // Stomp out any bad characters since this is from a circular buffer
                // A corruption is seen sometimes that results in the vm crashing
                // This should prevent crashes and the line will probably fail to parse
                for (int j = startIndex; j < endIndex; j++) {
                    if ((wlBuffer[j] & 0x80) != 0) wlBuffer[j] = (byte) '?';
                }
                boolean parsed = Process.parseProcLine(wlBuffer, startIndex, endIndex,
                        PROC_WAKELOCKS_FORMAT, nameStringArray, wlData, null);