Change order of arguments to traceAsync

To be consistent with other logging APIs such as android.util.Log and
Trace.asyncTraceForTrackBegin, make the track name the first argument
and the method/section name the second argument.

Test: New track appearing in a perfetto trace
Bug: 289353932
Change-Id: Ib7c88c52397cac0ba229ea525f5d127af400bdc8
diff --git a/packages/SystemUI/shared/src/com/android/systemui/util/TraceUtils.kt b/packages/SystemUI/shared/src/com/android/systemui/util/TraceUtils.kt
index e02e592..96a974d 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/util/TraceUtils.kt
+++ b/packages/SystemUI/shared/src/com/android/systemui/util/TraceUtils.kt
@@ -67,7 +67,7 @@
          * under a single track.
          */
         inline fun <T> traceAsync(method: String, block: () -> T): T =
-            traceAsync(method, "AsyncTraces", block)
+            traceAsync("AsyncTraces", method, block)
 
         /**
          * Creates an async slice in a track with [trackName] while [block] runs.
@@ -76,7 +76,7 @@
          * [trackName] of the track. The track is one of the rows visible in a perfetto trace inside
          * SystemUI process.
          */
-        inline fun <T> traceAsync(method: String, trackName: String, block: () -> T): T {
+        inline fun <T> traceAsync(trackName: String, method: String, block: () -> T): T {
             val cookie = lastCookie.incrementAndGet()
             Trace.asyncTraceForTrackBegin(Trace.TRACE_TAG_APP, trackName, method, cookie)
             try {
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardQuickAffordanceInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardQuickAffordanceInteractor.kt
index f692a39..e07bf0f 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardQuickAffordanceInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardQuickAffordanceInteractor.kt
@@ -443,7 +443,7 @@
     }
 
     private suspend fun isFeatureDisabledByDevicePolicy(): Boolean =
-        traceAsync("isFeatureDisabledByDevicePolicy", TAG) {
+        traceAsync(TAG, "isFeatureDisabledByDevicePolicy") {
             withContext(backgroundDispatcher) {
                 devicePolicyManager.areKeyguardShortcutsDisabled(userId = userTracker.userId)
             }