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

Commit 81b96aad authored by John Spurlock's avatar John Spurlock Committed by Android Git Automerger
Browse files

am 78cc93ec: Merge "Fix NPE in StrictMode handling." into lmp-dev

* commit '78cc93ec':
  Fix NPE in StrictMode handling.
parents ed2237ae 78cc93ec
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1726,6 +1726,7 @@ public final class StrictMode {
            if (LOG_V) Log.d(TAG, "strict mode violation stacks read from binder call.  i=" + i);
            ViolationInfo info = new ViolationInfo(p, !currentlyGathering);
            if (info.crashInfo.stackTrace != null && info.crashInfo.stackTrace.length() > 10000) {
                String front = info.crashInfo.stackTrace.substring(256);
                // 10000 characters is way too large for this to be any sane kind of
                // strict mode collection of stacks.  We've had a problem where we leave
                // strict mode violations associated with the thread, and it keeps tacking
@@ -1742,7 +1743,7 @@ public final class StrictMode {
                // Now report the problem.
                Slog.wtfStack(TAG, "Stack is too large: numViolations=" + numViolations
                        + " policy=#" + Integer.toHexString(policyMask)
                        + " front=" + info.crashInfo.stackTrace.substring(256));
                        + " front=" + front);
                return;
            }
            info.crashInfo.stackTrace += "# via Binder call with stack:\n" + ourStack;