am c86f09d7: am 2dafe666: Merge "CEC: Enable log for non-user builds" into lmp-mr1-dev

* commit 'c86f09d714360ddcc0363157b56ae7446770ae01':
  CEC: Enable log for non-user builds
This commit is contained in:
Jinsuk Kim
2014-11-21 21:55:42 +00:00
committed by Android Git Automerger

View File

@@ -17,6 +17,7 @@
package com.android.server.hdmi; package com.android.server.hdmi;
import android.annotation.Nullable; import android.annotation.Nullable;
import android.os.Build;
import android.os.SystemClock; import android.os.SystemClock;
import android.util.Pair; import android.util.Pair;
import android.util.Slog; import android.util.Slog;
@@ -41,7 +42,7 @@ final class HdmiLogger {
// Logging duration for same error message. // Logging duration for same error message.
private static final long ERROR_LOG_DURATTION_MILLIS = 20 * 1000; // 20s private static final long ERROR_LOG_DURATTION_MILLIS = 20 * 1000; // 20s
private static final boolean DEBUG = false; private static final boolean IS_USER_BUILD = "user".equals(Build.TYPE);
private static final ThreadLocal<HdmiLogger> sLogger = new ThreadLocal<>(); private static final ThreadLocal<HdmiLogger> sLogger = new ThreadLocal<>();
@@ -82,7 +83,7 @@ final class HdmiLogger {
} }
private void debugInternal(String logMessage) { private void debugInternal(String logMessage) {
if (!DEBUG) { if (IS_USER_BUILD) {
return; return;
} }
Slog.d(TAG, logMessage); Slog.d(TAG, logMessage);