File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
app/src/main/kotlin/li/songe/gkd/a11y Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import li.songe.gkd.appScope
20
20
import li.songe.gkd.permission.shizukuOkState
21
21
import li.songe.gkd.service.A11yService
22
22
import li.songe.gkd.service.StatusService
23
+ import li.songe.gkd.shizuku.safeGetTopCpn
23
24
import li.songe.gkd.store.storeFlow
24
25
import li.songe.gkd.util.SnapshotExt
25
26
import li.songe.gkd.util.UpdateTimeOption
@@ -36,6 +37,14 @@ fun onA11yFeatInit() = service.run {
36
37
useRuleChangedLog()
37
38
onA11yEvent { onA11yFeatEvent(it) }
38
39
onCreated { StatusService .autoStart() }
40
+ onDestroyed {
41
+ safeGetTopCpn()?.let {
42
+ // com.android.systemui
43
+ if (! topActivityFlow.value.sameAs(it.packageName, it.className)) {
44
+ updateTopActivity(it.packageName, it.className)
45
+ }
46
+ }
47
+ }
39
48
}
40
49
41
50
private fun A11yService.useAttachState () {
You can’t perform that action at this time.
0 commit comments