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

Commit ed840f82 authored by Nicolò Mazzucato's avatar Nicolò Mazzucato
Browse files

Make ShadeTraceLogger methods static

This makes the syntax from java a bit nicer

Bug: 362719719
Bug: 378688537
Test: perfetto trace
Flag: com.android.systemui.shade_window_goes_around
Change-Id: Iea73e405d01634445826c2f8f6cf79ab1eb0168b
parent 87f0e837
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -169,7 +169,7 @@ public class NotificationShadeWindowView extends WindowRootView {
    public void onMovedToDisplay(int displayId, Configuration config) {
        super.onMovedToDisplay(displayId, config);
        ShadeWindowGoesAround.isUnexpectedlyInLegacyMode();
        ShadeTraceLogger.INSTANCE.logOnMovedToDisplay(displayId, config);
        ShadeTraceLogger.logOnMovedToDisplay(displayId, config);
        if (mConfigurationForwarder != null) {
            mConfigurationForwarder.dispatchOnMovedToDisplay(displayId, config);
        }
@@ -181,7 +181,7 @@ public class NotificationShadeWindowView extends WindowRootView {
    @Override
    protected void onConfigurationChanged(Configuration newConfig) {
        super.onConfigurationChanged(newConfig);
        ShadeTraceLogger.INSTANCE.logOnConfigChanged(newConfig);
        ShadeTraceLogger.logOnConfigChanged(newConfig);
        if (mConfigurationForwarder != null) {
            ShadeWindowGoesAround.isUnexpectedlyInLegacyMode();
            mConfigurationForwarder.onConfigurationChanged(newConfig);
+2 −0
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ import com.android.app.tracing.TraceUtils.traceAsync
object ShadeTraceLogger {
    private const val TAG = "ShadeTraceLogger"

    @JvmStatic
    fun logOnMovedToDisplay(displayId: Int, config: Configuration) {
        if (!Trace.isEnabled()) return
        Trace.instantForTrack(
@@ -39,6 +40,7 @@ object ShadeTraceLogger {
        )
    }

    @JvmStatic
    fun logOnConfigChanged(config: Configuration) {
        if (!Trace.isEnabled()) return
        Trace.instantForTrack(