diff options
| author | 2024-02-05 11:27:51 +0000 | |
|---|---|---|
| committer | 2024-02-05 11:27:51 +0000 | |
| commit | 2771a2d36e6d76ba28f03dda1943f8dce3cf3f96 (patch) | |
| tree | f66c69523e24dd1df80140eaf3e91f9483e8c44a | |
| parent | 71915dd3b4acb9bf2f24059387a5cfeef935ad50 (diff) | |
| parent | 6ef5813e3265b553d8c27b542b36238128f76e39 (diff) | |
Merge "Always enable tracing of PendingTaskContainer" into main
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/util/concurrency/PendingTasksContainer.kt | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/util/concurrency/PendingTasksContainer.kt b/packages/SystemUI/src/com/android/systemui/util/concurrency/PendingTasksContainer.kt index ceebcb77fde2..e5179dd96742 100644 --- a/packages/SystemUI/src/com/android/systemui/util/concurrency/PendingTasksContainer.kt +++ b/packages/SystemUI/src/com/android/systemui/util/concurrency/PendingTasksContainer.kt @@ -37,19 +37,13 @@ class PendingTasksContainer { */ fun registerTask(name: String): Runnable { pendingTasksCount.incrementAndGet() - - if (ENABLE_TRACE) { - Trace.beginAsyncSection("PendingTasksContainer#$name", 0) - } + Trace.beginAsyncSection("PendingTasksContainer#$name", 0) return Runnable { + Trace.endAsyncSection("PendingTasksContainer#$name", 0) if (pendingTasksCount.decrementAndGet() == 0) { val onComplete = completionCallback.getAndSet(null) onComplete?.run() - - if (ENABLE_TRACE) { - Trace.endAsyncSection("PendingTasksContainer#$name", 0) - } } } } @@ -82,4 +76,3 @@ class PendingTasksContainer { fun getPendingCount(): Int = pendingTasksCount.get() } -private const val ENABLE_TRACE = false |