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

Commit be8e7f9f authored by Donghyun Cho's avatar Donghyun Cho Committed by android-build-merger
Browse files

Merge "Turn on HDMI-related logs conditionally for better debugging" into nyc-dev

am: 5ee693f4

* commit '5ee693f4':
  Turn on HDMI-related logs conditionally for better debugging

Change-Id: Ia20b6cdc32c876752901cd80e46d34c27a7518f7
parents 07e89228 5ee693f4
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import android.os.Build;
import android.os.SystemClock;
import android.util.Pair;
import android.util.Slog;
import android.util.Log;

import java.util.HashMap;

@@ -42,6 +43,7 @@ final class HdmiLogger {
    // Logging duration for same error message.
    private static final long ERROR_LOG_DURATTION_MILLIS = 20 * 1000;  // 20s

    private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
    private static final boolean IS_USER_BUILD = "user".equals(Build.TYPE);

    private static final ThreadLocal<HdmiLogger> sLogger = new ThreadLocal<>();
@@ -83,11 +85,10 @@ final class HdmiLogger {
    }

    private void debugInternal(String logMessage) {
        if (true || IS_USER_BUILD) {
            return;
        }
        if (DEBUG) {
            Slog.d(TAG, logMessage);
        }
    }

    private static final String toLogString(String logMessage, Object[] objs) {
        if (objs.length > 0) {