Disable verbose / debug log by default
To enable them, set RAVENWOOD_VERBOSE to "1".
Flag: EXEMPT host test change only
Bug: 292141694
Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh
Change-Id: Ie6f6f910065ae22e80753d8f6c2406dd4c0c0c40
diff --git a/ravenwood/runtime-helper-src/framework/android/util/Log_host.java b/ravenwood/runtime-helper-src/framework/android/util/Log_host.java
index d232ef2..c85bd23 100644
--- a/ravenwood/runtime-helper-src/framework/android/util/Log_host.java
+++ b/ravenwood/runtime-helper-src/framework/android/util/Log_host.java
@@ -18,6 +18,7 @@
import android.util.Log.Level;
import com.android.internal.os.RuntimeInit;
+import com.android.ravenwood.common.RavenwoodCommonUtils;
import java.io.PrintStream;
@@ -35,6 +36,9 @@
}
public static int println_native(int bufID, int priority, String tag, String msg) {
+ if (priority < Log.INFO && !RavenwoodCommonUtils.RAVENWOOD_VERBOSE_LOGGING) {
+ return msg.length(); // No verbose logging.
+ }
final String buffer;
switch (bufID) {
case Log.LOG_ID_MAIN: buffer = "main"; break;