Switch to home screen immediately when entering AOD/ambient mode (fixes meta-asteroid#228)#235
Open
NickASanOS wants to merge 1 commit into
Open
Conversation
When AOD activates with an app open, the compositor previously showed the dimmed app for 5 seconds until delayTimer killed the app and switched to the home screen. During that window the watchface's AOD-optimized display was never shown. Now on displayAmbientEntered, the compositor immediately switches to the home window (showing the AOD watchface). The app is preserved for restoration if the display wakes before the 5-second cleanup timer fires. Fixes AsteroidOS/meta-asteroid#228
Member
|
Thank you for working on this! This doesn't seem to work correctly. When the display transitions to AOD mode the app is now correctly hidden, but upon display awake the app does not appear to be restored. Another question, how does this PR relate to https://github.com/AsteroidOS/asteroid-launcher/pull/236/changes and https://github.com/AsteroidOS/lipstick/pull/24/changes? They both appear to attempt to solve the same issue (meta-asteroid#228 and #198 refer to the same issue) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When AOD (Always-On Display) activates while an application is open, the
compositor previously kept showing the dimmed application for 5 seconds
until
delayTimerfired, killed the app, and switched to the home screen.During those 5 seconds the dimmed app was visible instead of the
AOD-optimized watchface. This was reported as
AsteroidOS/meta-asteroid#228.
Changes
onDisplayAmbientEnteredhandler: immediately switches to the homewindow when ambient mode activates, saving a reference to the app
delayTimer: kills the saved app reference instead of thecurrent topmost window (which is now the home window)
onDisplayAboutToBeOn: restores the saved app if the displaywakes before the 5-second cleanup timer fires (but not during periodic
ambient minute updates)
onWindowRemovedsafety check: clears the saved app reference ifthe app is closed externally while in ambient mode
Fixes AsteroidOS/meta-asteroid#228