fix(spoof): serialize concurrent applyToProps calls

applyToProps reaches Runtime.exec("resetprop", name, value) twice
per call, once for system and once for vendor. Boot-time
initialize, BulletinPoller's handler thread, and the PifObserver
inotify thread can all reach applyToProps independently. Two
concurrent invocations for different dates could interleave such
that system and vendor end up with mismatched values. Synchronize
on the singleton so each apply runs to completion before the
next begins.
This commit is contained in:
Enginex0
2026-05-19 05:35:28 +01:00
parent ad1a9b8c32
commit fbe819d6d8
@@ -61,6 +61,7 @@ object PatchLevelManager {
PifObserver.startWatching() PifObserver.startWatching()
} }
@Synchronized
private fun applyToProps(date: String) { private fun applyToProps(date: String) {
if (!DATE_PATTERN.matches(date)) { if (!DATE_PATTERN.matches(date)) {
SystemLogger.warning( SystemLogger.warning(