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

Commit 6653cecf authored by Kai Li's avatar Kai Li
Browse files

Add systrace for attach and detach

Adding some trace to know when it gets attached and detached in the root.

Bug: 422298347
Flag: com.android.systemui.enable_underlay
Change-Id: Ia23bfd458f0f3bdde8421ca62bc9dab35f30cd85
parent 37a6cc5d
Loading
Loading
Loading
Loading
+9 −4
Original line number Original line Diff line number Diff line
@@ -26,6 +26,7 @@ import android.widget.FrameLayout
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.ui.Modifier
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.ComposeView
import androidx.compose.ui.platform.ComposeView
import androidx.tracing.trace
import com.android.compose.theme.PlatformTheme
import com.android.compose.theme.PlatformTheme
import com.android.systemui.ambientcue.ui.compose.AmbientCueContainer
import com.android.systemui.ambientcue.ui.compose.AmbientCueContainer
import com.android.systemui.ambientcue.ui.viewmodel.AmbientCueViewModel
import com.android.systemui.ambientcue.ui.viewmodel.AmbientCueViewModel
@@ -95,12 +96,16 @@ constructor(
    }
    }


    override fun onAttachedToWindow() {
    override fun onAttachedToWindow() {
        trace("AmbientCue onAttachedToWindow") {
            super.onAttachedToWindow()
            super.onAttachedToWindow()
            ComposeInitializer.onAttachedToWindow(this)
            ComposeInitializer.onAttachedToWindow(this)
        }
        }
    }


    override fun onDetachedFromWindow() {
    override fun onDetachedFromWindow() {
        trace("AmbientCue onDetachedFromWindow") {
            super.onDetachedFromWindow()
            super.onDetachedFromWindow()
            ComposeInitializer.onDetachedFromWindow(this)
            ComposeInitializer.onDetachedFromWindow(this)
        }
        }
    }
    }
}