Merge "fix log spewing coming from Telecom#LogUtils" into tm-dev am: 424c6c1f13
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18056443 Change-Id: I5cd1f44d87917954f4470864d61c7d567aa4cdb9 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -75,6 +75,11 @@ public class Log {
|
|||||||
*/
|
*/
|
||||||
private static boolean sIsUserExtendedLoggingEnabled = false;
|
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
|
* The time when user-activated extended logging should be ended. Used to determine when
|
||||||
* extended logging should automatically be disabled.
|
* 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() {
|
private static EventManager getEventManager() {
|
||||||
// Checking for null again outside of synchronization because we only need to synchronize
|
// 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.
|
// during the lazy loading of the events logger. We don't need to synchronize elsewhere.
|
||||||
|
|||||||
Reference in New Issue
Block a user