by Trapier Marshall
Version 2 (June 7, 2024)
Download (92 downloads)
If you're considering an e-ink phone for the cognitive benefits of a less stimulating interface, try this first. Choose your preferred default (color or gray) then use notification actions to set grayscale on a per-app basis. This allows you to have a mostly-gray phone with color where it's essential, like in navigation or calendar apps.
FLICKER AVOIDANCE
=================
The biggest challenge in developing this was preventing flickering for apps that use pop-ups like Youtube, Google Maps navigation, and Automate input dialogs. We can't detect that a particular app is active until after its window has assumed the foreground, but changes to the grayscale setting cause foreground pop-ups to briefly close and re-open. If the grayscale preference for the "popped-up" app differs from the app in the background, this leads to a tight loop of the pop-up closing and re-opening while the screen flickers between color and gray. Based on my experimentation and/or review comments this issue has affected other tools that attempt to manage grayscale [1][2]. This flow uses a couple strategies to avoid flickering:
1. Ignore foregrounding for particular packages (e.g. volume popup ala systemui, "recents" ala nexus launcher)
2. Ignore foregrounding for activity classes matching a regex pattern (e.g. automate input dialogs)
3. Ignore foreground changes if a particular notification is present (e.g. google maps navigation)
4. As a final catch-all, ignore foreground changes for 2 seconds after changing the grayscale mode.
"Variable set" blocks with config for this behavior can be found immediately following flow start block.
[1] https://play.google.com/store/apps/details?id=com.vegardit.grayswitch
[2] https://taskernet.com/shares/?user=AS35m8lP9SzvjBgQUbiUaHBXIfIeZU4S43IMdSjqOkyd%2FAybkKjUB8YsMRBVn3qZxN3YOpL1M%2B0%3D&id=Profile%3Aautomatic+grayscale
CHANGELOG
==========
[v2]
- Automate's VoiceInteractionWindow overlay activity is ignored