File tree Expand file tree Collapse file tree
src/main/java/com/alexk/tvlock Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,8 +15,8 @@ android {
1515 applicationId = " com.alexk.tvlock"
1616 minSdk = 21
1717 targetSdk = 34
18- versionCode = 23
19- versionName = " 1.22 "
18+ versionCode = 24
19+ versionName = " 1.23 "
2020 }
2121
2222 if (! releaseKeystore.isNullOrBlank()) {
Original file line number Diff line number Diff line change @@ -105,6 +105,15 @@ class LockPollService : Service() {
105105 GateOverlay .hide()
106106 }
107107
108+ // Release fuse for the onPause re-blackout: if the gate is down, an
109+ // overlay is up, and NEITHER the gate nor a blocked app is on top
110+ // (parent pressed HOME from the gate → launcher), nothing is being
111+ // guarded — let the screen live again right away.
112+ if (! gateUp && GateOverlay .isShown && t != packageName && t !in blocked) {
113+ FileLogger .log(" overlay release: top=$t , no gate, nothing blocked" )
114+ GateOverlay .hide()
115+ }
116+
108117 // watchdog: a gate we raised must actually be on screen
109118 if (gateUp) {
110119 if (t == packageName) {
@@ -268,7 +277,13 @@ class LockPollService : Service() {
268277 fun onGateDismissed () {
269278 gateUp = false
270279 blackoutHold = false
271- GateOverlay .hide() // never trap a black screen over a non-blocked screen
280+ // The gate was shoved aside (a dedicated-button relaunch lands on top
281+ // of it). onPause fires the same instant the shove happens — far ahead
282+ // of any poll detection — so re-blackout RIGHT NOW instead of exposing
283+ // the app for the 150-300 ms until the next DETECT. show() is a no-op
284+ // when the overlay is already up; the re-raise of the gate then hides
285+ // it again the moment the PIN is confirmed on top.
286+ GateOverlay .show(applicationContext, System .currentTimeMillis())
272287 }
273288
274289 /* * Self-heal if the ROM kills the FGS: re-arm every 5 min via AlarmManager. */
You can’t perform that action at this time.
0 commit comments