From 46b4ba42018655910dbb23441998d226f996dc13 Mon Sep 17 00:00:00 2001 From: Edward Savage-Jones Date: Tue, 13 Oct 2020 19:38:50 +0200 Subject: [PATCH] Redact key value from log when DEBUG is false See bug for details Bug: 170653379 Test: see bug Change-Id: I713fd8c03444167faf35a170b885c38af5482e31 --- core/java/android/util/ArrayMap.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/java/android/util/ArrayMap.java b/core/java/android/util/ArrayMap.java index 4cf0a36d24bbb..418d92c44290b 100644 --- a/core/java/android/util/ArrayMap.java +++ b/core/java/android/util/ArrayMap.java @@ -645,7 +645,7 @@ public final class ArrayMap implements Map { e.fillInStackTrace(); Log.w(TAG, "New hash " + hash + " is before end of array hash " + mHashes[index-1] - + " at index " + index + " key " + key, e); + + " at index " + index + (DEBUG ? " key " + key : ""), e); put(key, value); return; }