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

Commit 6a6f3f71 authored by Automerger Merge Worker's avatar Automerger Merge Worker Committed by Android (Google) Code Review
Browse files

Merge "Merge "fix log spewing coming from Telecom#LogUtils" into tm-dev am:...

Merge "Merge "fix log spewing coming from Telecom#LogUtils" into tm-dev am: 424c6c1f am: 3b6e577c"
parents 5bf64e5c 19d6092c
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -75,6 +75,11 @@ public class Log {
     */
    private static boolean sIsUserExtendedLoggingEnabled = false;

    /**
     *  Enabled in telecom testing to help gate log statements causing log spew.
     */
    private static boolean sIsUnitTestingEnabled = false;

    /**
     * The time when user-activated extended logging should be ended.  Used to determine when
     * extended logging should automatically be disabled.
@@ -330,6 +335,20 @@ public class Log {
        }
    }

    /**
     * Enabled when tests are running to help gate log statements causing log spew.
     *
     *  @param isEnabled {@code true} if running unit tests. false otherwise.
     *
     */
    public static void setUnitTestingEnabled(boolean isEnabled) {
        sIsUnitTestingEnabled = isEnabled;
    }

    public static boolean isUnitTestingEnabled() {
        return sIsUnitTestingEnabled;
    }

    private static EventManager getEventManager() {
        // Checking for null again outside of synchronization because we only need to synchronize
        // during the lazy loading of the events logger. We don't need to synchronize elsewhere.