Loading packages/SystemUI/src/com/android/systemui/log/LogBuffer.kt +7 −3 Original line number Diff line number Diff line Loading @@ -66,11 +66,12 @@ import java.util.Locale * @param poolSize The maximum amount that the size of the buffer is allowed to flex in response to * sequential calls to [document] that aren't immediately followed by a matching call to [push]. */ class LogBuffer( class LogBuffer @JvmOverloads constructor( private val name: String, private val maxLogs: Int, private val poolSize: Int, private val logcatEchoTracker: LogcatEchoTracker private val logcatEchoTracker: LogcatEchoTracker, private val systrace: Boolean = true ) { init { if (maxLogs < poolSize) { Loading Loading @@ -175,6 +176,10 @@ class LogBuffer( buffer.removeFirst() } buffer.add(message as LogMessageImpl) if (systrace) { val messageStr = message.printer(message) Trace.instantForTrack(Trace.TRACE_TAG_APP, "UI Events", "$name - $messageStr") } if (logcatEchoTracker.isBufferLoggable(name, message.level) || logcatEchoTracker.isTagLoggable(message.tag, message.level)) { echo(message) Loading Loading @@ -237,7 +242,6 @@ class LogBuffer( LogLevel.ERROR -> Log.e(message.tag, strMessage) LogLevel.WTF -> Log.wtf(message.tag, strMessage) } Trace.instantForTrack(Trace.TRACE_TAG_APP, "UI Events", strMessage) } } Loading packages/SystemUI/src/com/android/systemui/log/LogBufferFactory.kt +7 −2 Original line number Diff line number Diff line Loading @@ -36,8 +36,13 @@ class LogBufferFactory @Inject constructor( } @JvmOverloads fun create(name: String, maxPoolSize: Int, flexSize: Int = 10): LogBuffer { val buffer = LogBuffer(name, poolLimit(maxPoolSize), flexSize, logcatEchoTracker) fun create( name: String, maxPoolSize: Int, flexSize: Int = 10, systrace: Boolean = true ): LogBuffer { val buffer = LogBuffer(name, poolLimit(maxPoolSize), flexSize, logcatEchoTracker, systrace) dumpManager.registerBuffer(name, buffer) return buffer } Loading packages/SystemUI/src/com/android/systemui/log/dagger/LogModule.java +10 −5 Original line number Diff line number Diff line Loading @@ -49,7 +49,8 @@ public class LogModule { @SysUISingleton @NotificationLog public static LogBuffer provideNotificationsLogBuffer(LogBufferFactory factory) { return factory.create("NotifLog", 1000); return factory.create("NotifLog", 1000 /* maxPoolSize */, 10 /* flexSize */, false /* systrace */); } /** Provides a logging buffer for all logs related to the data layer of notifications. */ Loading @@ -65,7 +66,8 @@ public class LogModule { @SysUISingleton @NotificationSectionLog public static LogBuffer provideNotificationSectionLogBuffer(LogBufferFactory factory) { return factory.create("NotifSectionLog", 1000); return factory.create("NotifSectionLog", 1000 /* maxPoolSize */, 10 /* flexSize */, false /* systrace */); } /** Provides a logging buffer for all logs related to the data layer of notifications. */ Loading @@ -81,7 +83,8 @@ public class LogModule { @SysUISingleton @QSLog public static LogBuffer provideQuickSettingsLogBuffer(LogBufferFactory factory) { return factory.create("QSLog", 500); return factory.create("QSLog", 500 /* maxPoolSize */, 10 /* flexSize */, false /* systrace */); } /** Provides a logging buffer for {@link com.android.systemui.broadcast.BroadcastDispatcher} */ Loading @@ -89,7 +92,8 @@ public class LogModule { @SysUISingleton @BroadcastDispatcherLog public static LogBuffer provideBroadcastDispatcherLogBuffer(LogBufferFactory factory) { return factory.create("BroadcastDispatcherLog", 500); return factory.create("BroadcastDispatcherLog", 500 /* maxPoolSize */, 10 /* flexSize */, false /* systrace */); } /** Provides a logging buffer for all logs related to Toasts shown by SystemUI. */ Loading Loading @@ -127,7 +131,8 @@ public class LogModule { @SysUISingleton @QSFragmentDisableLog public static LogBuffer provideQSFragmentDisableLogBuffer(LogBufferFactory factory) { return factory.create("QSFragmentDisableFlagsLog", 10); return factory.create("QSFragmentDisableFlagsLog", 10 /* maxPoolSize */, 10 /* flexSize */, false /* systrace */); } /** Loading packages/SystemUI/src/com/android/systemui/statusbar/StatusBarStateControllerImpl.java +2 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import android.animation.AnimatorListenerAdapter; import android.animation.ObjectAnimator; import android.animation.ValueAnimator; import android.os.SystemProperties; import android.os.Trace; import android.text.format.DateFormat; import android.util.FloatProperty; import android.util.Log; Loading Loading @@ -193,6 +194,7 @@ public class StatusBarStateControllerImpl implements mState = state; mUpcomingState = state; mUiEventLogger.log(StatusBarStateEvent.fromState(mState)); Trace.instantForTrack(Trace.TRACE_TAG_APP, "UI Events", "StatusBarState " + tag); for (RankedListener rl : new ArrayList<>(mListeners)) { rl.mListener.onStateChanged(mState); } Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardStateControllerImpl.java +2 −0 Original line number Diff line number Diff line Loading @@ -171,6 +171,8 @@ public class KeyguardStateControllerImpl implements KeyguardStateController, Dum if (mShowing == showing && mOccluded == occluded) return; mShowing = showing; mOccluded = occluded; Trace.instantForTrack(Trace.TRACE_TAG_APP, "UI Events", "Keyguard showing: " + showing + " occluded: " + occluded); notifyKeyguardChanged(); // Update the dismiss amount to the full 0f/1f if we explicitly show or hide the keyguard. Loading Loading
packages/SystemUI/src/com/android/systemui/log/LogBuffer.kt +7 −3 Original line number Diff line number Diff line Loading @@ -66,11 +66,12 @@ import java.util.Locale * @param poolSize The maximum amount that the size of the buffer is allowed to flex in response to * sequential calls to [document] that aren't immediately followed by a matching call to [push]. */ class LogBuffer( class LogBuffer @JvmOverloads constructor( private val name: String, private val maxLogs: Int, private val poolSize: Int, private val logcatEchoTracker: LogcatEchoTracker private val logcatEchoTracker: LogcatEchoTracker, private val systrace: Boolean = true ) { init { if (maxLogs < poolSize) { Loading Loading @@ -175,6 +176,10 @@ class LogBuffer( buffer.removeFirst() } buffer.add(message as LogMessageImpl) if (systrace) { val messageStr = message.printer(message) Trace.instantForTrack(Trace.TRACE_TAG_APP, "UI Events", "$name - $messageStr") } if (logcatEchoTracker.isBufferLoggable(name, message.level) || logcatEchoTracker.isTagLoggable(message.tag, message.level)) { echo(message) Loading Loading @@ -237,7 +242,6 @@ class LogBuffer( LogLevel.ERROR -> Log.e(message.tag, strMessage) LogLevel.WTF -> Log.wtf(message.tag, strMessage) } Trace.instantForTrack(Trace.TRACE_TAG_APP, "UI Events", strMessage) } } Loading
packages/SystemUI/src/com/android/systemui/log/LogBufferFactory.kt +7 −2 Original line number Diff line number Diff line Loading @@ -36,8 +36,13 @@ class LogBufferFactory @Inject constructor( } @JvmOverloads fun create(name: String, maxPoolSize: Int, flexSize: Int = 10): LogBuffer { val buffer = LogBuffer(name, poolLimit(maxPoolSize), flexSize, logcatEchoTracker) fun create( name: String, maxPoolSize: Int, flexSize: Int = 10, systrace: Boolean = true ): LogBuffer { val buffer = LogBuffer(name, poolLimit(maxPoolSize), flexSize, logcatEchoTracker, systrace) dumpManager.registerBuffer(name, buffer) return buffer } Loading
packages/SystemUI/src/com/android/systemui/log/dagger/LogModule.java +10 −5 Original line number Diff line number Diff line Loading @@ -49,7 +49,8 @@ public class LogModule { @SysUISingleton @NotificationLog public static LogBuffer provideNotificationsLogBuffer(LogBufferFactory factory) { return factory.create("NotifLog", 1000); return factory.create("NotifLog", 1000 /* maxPoolSize */, 10 /* flexSize */, false /* systrace */); } /** Provides a logging buffer for all logs related to the data layer of notifications. */ Loading @@ -65,7 +66,8 @@ public class LogModule { @SysUISingleton @NotificationSectionLog public static LogBuffer provideNotificationSectionLogBuffer(LogBufferFactory factory) { return factory.create("NotifSectionLog", 1000); return factory.create("NotifSectionLog", 1000 /* maxPoolSize */, 10 /* flexSize */, false /* systrace */); } /** Provides a logging buffer for all logs related to the data layer of notifications. */ Loading @@ -81,7 +83,8 @@ public class LogModule { @SysUISingleton @QSLog public static LogBuffer provideQuickSettingsLogBuffer(LogBufferFactory factory) { return factory.create("QSLog", 500); return factory.create("QSLog", 500 /* maxPoolSize */, 10 /* flexSize */, false /* systrace */); } /** Provides a logging buffer for {@link com.android.systemui.broadcast.BroadcastDispatcher} */ Loading @@ -89,7 +92,8 @@ public class LogModule { @SysUISingleton @BroadcastDispatcherLog public static LogBuffer provideBroadcastDispatcherLogBuffer(LogBufferFactory factory) { return factory.create("BroadcastDispatcherLog", 500); return factory.create("BroadcastDispatcherLog", 500 /* maxPoolSize */, 10 /* flexSize */, false /* systrace */); } /** Provides a logging buffer for all logs related to Toasts shown by SystemUI. */ Loading Loading @@ -127,7 +131,8 @@ public class LogModule { @SysUISingleton @QSFragmentDisableLog public static LogBuffer provideQSFragmentDisableLogBuffer(LogBufferFactory factory) { return factory.create("QSFragmentDisableFlagsLog", 10); return factory.create("QSFragmentDisableFlagsLog", 10 /* maxPoolSize */, 10 /* flexSize */, false /* systrace */); } /** Loading
packages/SystemUI/src/com/android/systemui/statusbar/StatusBarStateControllerImpl.java +2 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import android.animation.AnimatorListenerAdapter; import android.animation.ObjectAnimator; import android.animation.ValueAnimator; import android.os.SystemProperties; import android.os.Trace; import android.text.format.DateFormat; import android.util.FloatProperty; import android.util.Log; Loading Loading @@ -193,6 +194,7 @@ public class StatusBarStateControllerImpl implements mState = state; mUpcomingState = state; mUiEventLogger.log(StatusBarStateEvent.fromState(mState)); Trace.instantForTrack(Trace.TRACE_TAG_APP, "UI Events", "StatusBarState " + tag); for (RankedListener rl : new ArrayList<>(mListeners)) { rl.mListener.onStateChanged(mState); } Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardStateControllerImpl.java +2 −0 Original line number Diff line number Diff line Loading @@ -171,6 +171,8 @@ public class KeyguardStateControllerImpl implements KeyguardStateController, Dum if (mShowing == showing && mOccluded == occluded) return; mShowing = showing; mOccluded = occluded; Trace.instantForTrack(Trace.TRACE_TAG_APP, "UI Events", "Keyguard showing: " + showing + " occluded: " + occluded); notifyKeyguardChanged(); // Update the dismiss amount to the full 0f/1f if we explicitly show or hide the keyguard. Loading