Merge changes from topic "am-135190fb80e84a5ab722798ba75fc2ed" into udc-dev

* changes:
  [automerger skipped] Merge "Allow filtering of services" into rvc-dev am: 9fa258770e -s ours am: 47a0fdbe46 -s ours am: 39043e3884 -s ours am: 78e1c84460 -s ours am: 5b2621ce46 -s ours am: 2f48651667 -s ours am: 72cba2a4aa -s ours
  [automerger skipped] Allow filtering of services am: 44dcb8351e -s ours am: ec28f4a497 -s ours am: ef9e7715cb -s ours am: 74f4f24ea8 -s ours am: 86190e8b6e -s ours am: e486df46a6 -s ours am: c4c1cb4c67 -s ours
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BlurUtils.kt b/packages/SystemUI/src/com/android/systemui/statusbar/BlurUtils.kt
index fbb51ae..07b6869 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/BlurUtils.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/BlurUtils.kt
@@ -19,6 +19,7 @@
 import android.app.ActivityManager
 import android.content.res.Resources
 import android.os.SystemProperties
+import android.os.Trace
 import android.util.IndentingPrintWriter
 import android.util.MathUtils
 import android.view.CrossWindowBlurListeners
@@ -42,7 +43,7 @@
 ) : Dumpable {
     val minBlurRadius = resources.getDimensionPixelSize(R.dimen.min_window_blur_radius)
     val maxBlurRadius = resources.getDimensionPixelSize(R.dimen.max_window_blur_radius)
-
+    private val traceCookie = System.identityHashCode(this)
     private var lastAppliedBlur = 0
 
     init {
@@ -85,10 +86,13 @@
             if (supportsBlursOnWindows()) {
                 it.setBackgroundBlurRadius(viewRootImpl.surfaceControl, radius)
                 if (lastAppliedBlur == 0 && radius != 0) {
+                    Trace.asyncTraceForTrackBegin(Trace.TRACE_TAG_APP, TRACK_NAME,
+                            EARLY_WAKEUP_SLICE_NAME, traceCookie)
                     it.setEarlyWakeupStart()
                 }
                 if (lastAppliedBlur != 0 && radius == 0) {
                     it.setEarlyWakeupEnd()
+                    Trace.asyncTraceForTrackEnd(Trace.TRACE_TAG_APP, TRACK_NAME, traceCookie)
                 }
                 lastAppliedBlur = radius
             }
@@ -125,4 +129,9 @@
             it.println("isHighEndGfx: ${ActivityManager.isHighEndGfx()}")
         }
     }
+
+    companion object {
+        const val TRACK_NAME = "BlurUtils"
+        const val EARLY_WAKEUP_SLICE_NAME = "eEarlyWakeup"
+    }
 }