am 78cc93ec: Merge "Fix NPE in StrictMode handling." into lmp-dev
* commit '78cc93ec80f5dcc487db697a1f9a545890745847': Fix NPE in StrictMode handling.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user