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

* commit '78cc93ec80f5dcc487db697a1f9a545890745847':
  Fix NPE in StrictMode handling.
This commit is contained in:
John Spurlock
2014-10-06 19:16:53 +00:00
committed by Android Git Automerger

View File

@@ -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;