Skip to content

Commit b60b76e

Browse files
committed
perf: Synchronized updateTopActivity
1 parent 0383df3 commit b60b76e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

app/src/main/kotlin/li/songe/gkd/service/A11yState.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ private val activityLogMutex by lazy { Mutex() }
4646

4747
private var activityLogCount = 0
4848
private var lastActivityChangeTime = 0L
49+
@Synchronized
4950
fun updateTopActivity(topActivity: TopActivity) {
5051
if (topActivity.activityId == null && activityTaskManagerFlow.value != null && topActivity.appId == launcherAppId) {
5152
// 无障碍 appId 改变速度慢于系统 activity 栈变化

0 commit comments

Comments
 (0)