Merge "Change order of arguments to traceAsync" into udc-qpr-dev am: ff651d3a02

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23984487

Change-Id: I8c5cfa0557643f7aaa8636bce4fd96bf5910bbe9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Peter Kalauskas
2023-07-10 22:48:08 +00:00
committed by Automerger Merge Worker
2 changed files with 3 additions and 3 deletions

View File

@@ -67,7 +67,7 @@ class TraceUtils {
* under a single track. * under a single track.
*/ */
inline fun <T> traceAsync(method: String, block: () -> T): T = 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. * Creates an async slice in a track with [trackName] while [block] runs.
@@ -76,7 +76,7 @@ class TraceUtils {
* [trackName] of the track. The track is one of the rows visible in a perfetto trace inside * [trackName] of the track. The track is one of the rows visible in a perfetto trace inside
* SystemUI process. * 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() val cookie = lastCookie.incrementAndGet()
Trace.asyncTraceForTrackBegin(Trace.TRACE_TAG_APP, trackName, method, cookie) Trace.asyncTraceForTrackBegin(Trace.TRACE_TAG_APP, trackName, method, cookie)
try { try {

View File

@@ -414,7 +414,7 @@ constructor(
} }
private suspend fun isFeatureDisabledByDevicePolicy(): Boolean = private suspend fun isFeatureDisabledByDevicePolicy(): Boolean =
traceAsync("isFeatureDisabledByDevicePolicy", TAG) { traceAsync(TAG, "isFeatureDisabledByDevicePolicy") {
withContext(backgroundDispatcher) { withContext(backgroundDispatcher) {
devicePolicyManager.areKeyguardShortcutsDisabled(userId = userTracker.userId) devicePolicyManager.areKeyguardShortcutsDisabled(userId = userTracker.userId)
} }