Loading packages/SystemUI/src/com/android/systemui/util/concurrency/PendingTasksContainer.kt +2 −9 Original line number Diff line number Diff line Loading @@ -37,19 +37,13 @@ class PendingTasksContainer { */ fun registerTask(name: String): Runnable { pendingTasksCount.incrementAndGet() if (ENABLE_TRACE) { 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) } } } } Loading Loading @@ -82,4 +76,3 @@ class PendingTasksContainer { fun getPendingCount(): Int = pendingTasksCount.get() } private const val ENABLE_TRACE = false Loading
packages/SystemUI/src/com/android/systemui/util/concurrency/PendingTasksContainer.kt +2 −9 Original line number Diff line number Diff line Loading @@ -37,19 +37,13 @@ class PendingTasksContainer { */ fun registerTask(name: String): Runnable { pendingTasksCount.incrementAndGet() if (ENABLE_TRACE) { 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) } } } } Loading Loading @@ -82,4 +76,3 @@ class PendingTasksContainer { fun getPendingCount(): Int = pendingTasksCount.get() } private const val ENABLE_TRACE = false