Skip to content

Commit

Permalink
LS Clock: Update clock on device wake up to ensure proper time sync
Browse files Browse the repository at this point in the history
Signed-off-by: DrDisagree <29881338+Mahmud0808@users.noreply.github.com>
  • Loading branch information
Mahmud0808 committed Mar 1, 2025
1 parent d099551 commit 38ebfed
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,16 @@ class LockscreenClock(context: Context) : ModPack(context) {
}
}

val dozeTriggersClass = findClass("$SYSTEMUI_PACKAGE.doze.DozeTriggers")

dozeTriggersClass
.hookMethod("gentleWakeUp")
.runAfter {
if (!showLockscreenClock) return@runAfter

Handler(Looper.getMainLooper()).post { updateClockView() }
}

val ntWidgetContainerControllerClass = findClass(
"com.nothing.systemui.widget.NTWidgetContainerController",
suppressError = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,16 @@ class LockscreenClockA15(context: Context) : ModPack(context) {
}
}

val dozeTriggersClass = findClass("$SYSTEMUI_PACKAGE.doze.DozeTriggers")

dozeTriggersClass
.hookMethod("gentleWakeUp")
.runAfter {
if (!showLockscreenClock) return@runAfter

Handler(Looper.getMainLooper()).post { updateClockView() }
}

fun onDozingChanged(isDozing: Boolean) {
aodBurnInProtection?.setMovementEnabled(isDozing)
}
Expand Down

0 comments on commit 38ebfed

Please sign in to comment.