diff --git a/README.md b/README.md index 0c834a6..dc1231e 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,8 @@ LED on many modern devices. Additionally, it provides a notification display for when the screen is "off", replacing - or working in conjuction with - the *Always-On Display* -feature. +feature. As this display is not around the camera hole, it is aptly named +the ***Un*holey Light**. While it was originally written for the Samsung Galaxy S10, the latest version at the time of writing supports *all* Samsung devices and @@ -74,17 +75,17 @@ different modes use different amounts. The **Unholey Light** (which as the name implies, is *not* centered around the camera hole) uses least by staying on-screen without the CPU having to be awake. -See [README_tech.md](./README_tech.md) for a more in-depth description. +See [tech.md](./docs/tech.md) for a more in-depth description. ### Rendering -Entire section moved to [README_tech.md](./README_tech.md) +Entire section moved to [tech.md](./docs/tech.md) ### Burn-in Both the app and Android shift pixels around to reduce risk of burn-in. -See [README_tech.md](./README_tech.md) for a more in-depth description. +See [tech.md](./docs/tech.md) for a more in-depth description. ### Freedom! @@ -92,6 +93,10 @@ This app is 100% free, without ads, without tracking, but *with* GPLv3 [sauce](h In-app purchases exist to donate if you are so inclined, this does not unlock additional features, change app behavior, or entitle you to anything. +### Changelogs and release notes + +See the [changelog](./docs/changelogs.md) page. + ### Download You can grab it from [Google Play](https://play.google.com/store/apps/details?id=eu.chainfire.holeylight). diff --git a/docs/changelogs.md b/docs/changelogs.md new file mode 100644 index 0000000..67e6fec --- /dev/null +++ b/docs/changelogs.md @@ -0,0 +1,164 @@ +**2021.03.02 - v1.00** - [RELEASE NOTES](./notes_100.md) +- (c) 2021 +- Compatibility + - Leverage Samsung firmware-specific camera area size, position, and animation: adds basic support for all Samsung devices + - Added support for Google Pixel devices; currently 4A and 5 tested, 4A 5G needs a tester! + - Specific adjustments for Samsung Galaxy Fold 2 +- Donations + - Added In-App Purchase donations - completely optional without nags. These do not unlock any additional features, change functionality in any way, or entitle the user to anything. Note that these only work if the app installed through Google Play. +- Android 11 + - Updated cutout positioning + - Updated scaling math + - Updated targetSdk + - Added newly required permissions + - Fixed accessibility service token error + - Fixed Unholey Light not working at all + - Split several code paths into Android 9, 10 and 11 specific versions +- Unholey Light + - Add option to display icons inside circle (enabled by default) + - Add option to display clock (disabled by default) + - Smoother transitions + - Rework of TSP area detection + - Improved stability/reliability + - Improve update speed on new notification + - Fixed several (rare) internal crashes + - Reduce display jumping around +- Hide AOD + - Improved bottom area detection for partial hide + - Added overlay linger option to reduce AOD flashing when going from screen off to lockscreen +- Notifications + - Colors: Added fast scrolling capability + - Colors: Added (long-press) option to respect or ignore (default) notification color state + - Colors: Added save/load functionality + - Timeouts: Added option to track timeouts separately for screen on and off states + - Timeouts: Seekbars: Show value in title bar to improve UX + - Persist seen state across resolution and density changes + - Added black fill option to hide small misalignments in camera animations + - Added tuning option to increase camera animation thickness + - Rework dp adjustments math + - Disable animation during phone calls to prevent some weird behavior + - Detect and handle "silent" conversations + - Detect and handle bubbles correctly + - Detect and handle groups + - Changed default color for notifications to the app icon's dominant color, with brightness and saturation maxed out +- AOD Helper + - Complete overhaul + - Now directly advertised and integrated into main settings rather than a hidden package deep in the XDA thread + - Samsung: Still quirky and not fully compatible with all options - use with care! + - Pixel: Added AOD brightness improvement; automatic AOD control not implemented (see AOD Helper source for notes) + - Pixel: Automatically fix permissions with root, if available +- Translations + - Many translations are now horribly outdated :( Please help! + - Added German + - Added Greek + - Updated Chinese + - Added option to switch language +- Debugging + - Added master-switch long-press to enable super-secret debug mode + - Added overlay debugging mode + - Added (app-only) logcat dump + - Built state tester (devs only) +- Notices and popups + - Reworked various parts of the setup wizard + - Added notice about location detection needing to be enabled for companion device permission + - Samsung: Added option to preload black image into AOD rather than going the theme route + - Samsung: Added informational notices about fingerprint icon on AOD + - Samsung: Added informational notices about battery status on AOD + - Pixel: Added informational notice about AOD brightness +- Miscellaneous + - Reduced CPU and battery usage + - Improve AOD handling in tap-to-show mode + - Reworked resolution and density change detection and handling + - Several small tweaks in settings display to improve uniformity + - Improve performance of tuning adjustments + - Fix broken dark mode support + - Enabled ProGuard for release builds + - Updated AndroidX dependencies + - Updated graphics and screenshots for Google Play + +**2019.12.27 - v0.67** +- Fixed Unholey Light display on Android 10 +- Fixed build issue +- Translations: updated fr; added cn + +**2019.04.25 - v0.66** - [RELEASE NOTES (XDA)](https://forum.xda-developers.com/showpost.php?p=79406856&postcount=995) +- Adjust screen-off rendering (should fix animation disappearing for some users) +- Adjust AOD schedule handling +- Adjust default tune for S10+/X +- Fix color picker in night mode +- Translations: updated ru, pt, it; addes es; removed fr (outdated) + +**2019.04.20 - v0.65** - [RELEASE NOTES (XDA)](https://forum.xda-developers.com/showpost.php?p=79371779&postcount=866) +- Colors, new long-press options: disable, edit hex value, set color as default for app, apply color to entire app, copy/paste +- AOD hide: pick between full and partial hide, the latter showing charging information +- Seen: option to ignore notifications that arrive while the screen is on +- Seen: timeout options +- Schedule: show AOD schedule +- Do not disturb: option added to not show notifications when DND mode is enabled (default: enabled) +- Added Android night mode support +- Reduce animation jumping around in Unholey Light startup +- Fix some CPU usage issues in odd circumstances + +**2019.04.18 - v0.61 - RELEASE NOTES (non-Play test version)** +- Translation updates: ru, pt +- Improved AOD blackout performance +- Lower CPU use with screen on +- (Experimental) landscape switch prevention + +**2019.04.15 - v0.60** - [RELEASE NOTES (XDA)](https://forum.xda-developers.com/showpost.php?p=79337377&postcount=639) +- Added setup wizards and assistants +- Collapsed several options into single options (less cluttered UI) +- Colors: add notification tickertext to display if available +- Colors: split into currently active and inactive notifications +- Split "Screen On" setting into battery and charging variants +- Added link to GitHub in app +- Show (user)name of translators in app +- Added (Brazilian) Portuguese (already outdated :)) +- Adjusted AOD position size and follow logic +- Various crash fixes + +**2019.04.13 - v0.55 - FULLDOZER** - [RELEASE NOTES (XDA)](https://forum.xda-developers.com/showpost.php?p=79324816&postcount=555) +- Full doze mode "Unholey Light" + +**2019.04.11 - v0.51** - [RELEASE NOTES (XDA)](https://forum.xda-developers.com/showpost.php?p=79317643&postcount=481) +- AOD hiding + +**2019.04.11 - v0.50** - [RELEASE NOTES (XDA)](https://forum.xda-developers.com/showpost.php?p=79317016&postcount=471) +- Support for legacy notifications +- Fix 'phantom' notification +- Reduce Accessibility permissions to minimum +- Independent control of screen on/off modes +- Tuning now has 0.25dp granularity (all previous tuning is lost!), gained reset button +- Colors are now configured by channel rather than by package (all previous color config is lost!), gained refresh button +- Adjusted 'reverse portrait' rendering +- Added Italian and Russian languages +- Support resolution change +- Various efficiency, crash and deadlock fixes + +**2019.04.10 - v0.40** - [RELEASE NOTES (XDA)](https://forum.xda-developers.com/showpost.php?p=79303152&postcount=319) +- Screen off + battery functionality enabled +- Migration from fake lockscreen to AOD-base +- Migration from application to accessibility overlay (Google frowns on this, though) +- Any notification can now be used for LED. The ones that don't ask for LED show up under Colors as black by default. +- Lottie renderer has been replaced by a sprite-sheet based rendered (up to 5x CPU reduction) +- Battery saving animations added (up to 3x CPU reduction), blinking and pie-chart (decided based on full or on-tap AOD) +- Several leaks and crashes have been fixed (and undoubtedly new ones created) + +**2019.04.04 - v0.25** +- Notifications are now ignored if you set their color to black +- Battery optimization exemption permission is now required +- New icon/banner +- Fixed some CPU usage bug where the animation was running even if invisible +- Introduce "mark as seen" functionality, event and movement-based +- Added helper button to turn off overlay notification +- Rewording and repositioning of various UI elements + +**2019.04.03 - v0.20** +- Fix compatibility with Qualcomm devices +- Add animation size/position/speed fine-tuning +- Add notification color override +- Clarify various error messages, popups, descriptions +- Show a test notification while the app's UI is open + +**2019.04.02 - v0.10** +- Initial release \ No newline at end of file diff --git a/docs/notes_100.md b/docs/notes_100.md new file mode 100644 index 0000000..d9d209c --- /dev/null +++ b/docs/notes_100.md @@ -0,0 +1,210 @@ +## Holey Light v1.00 release notes + +This is by far the biggest update to *Holey Light* since its inception +in early 2019. Early February '21 my S10 decided to update itself to +Android 11 and completely broke the app for me. As I use this app myself +every day, it had to be updated. What was supposed to be a small tweak +however quickly became a massive update as testers came in, features +and device-compatibility were requested, and new ways of doing things +were discovered. + +Then full and rather vast changelogs can be found [here](./changelogs.md); these are +the highlights: + +- Android 11 support +- Support for all Samsung devices rather than just the S10 family; +testers have reported success on the S20, Note20, and S21 families, as +well as the Fold2 and various budget models +- Support for Google Pixel devices (4A and 5 completed, 4A 5G still needs +a tester *and feedback*) +- Added options to show app icons and the AOD clock to *Unholy Light* mode +- Thickness of the camera notification animation is now configurable +- Added handling of conversation and bubble notifications +- Initial notification color now based on app icon's dominant color +- Improved stability and reliability, and further reduced CPU and battery usage +- Added completely optional and nag-free donation option +- Dark mode support now actually works +- German and Greek translations were added, and the Chinese translation +was updated; the other translations are unfortunately horribly outdated +now (send help!) +- Moved from *beta* to *production* on Google Play. About time after +two years, though I guess this leaves the app with 0 review and ratings... + +A special thanks to the 100+ testers who gave my works-in-progress a go +over the past month, and in particular the dozen or so truly hardcore +supporters who stuck with me through the entire process and/or updated +translations. You know who you are! + +//TODO DIRECT DOWNLOAD LINKS, GOOGLE PLAY + +Following is a far more in-depth story about the changes, covering some +technical details as well. Perhaps a little long and relatively dry, but +writing it out feels like *finishing* a release to me. + +### Initial update + +The initial update to support Android 11 was done relatively quickly. A +few days fighting Android's API and permission changes and deprecations, +handling Samsung's AOD changes, and that was that (or so I thought at +the time). + +Since Android 10, there was however an issue that the *Unholey Light* +display would stop rendering correctly after a while. I decided to see +once again if I could pin down the cause and fix it. This led me down +a rabbit hole of Samsung firmware internals and I eventually found the +fix (which as to be expected ended up being a one-liner). + +Meanwhile, several testers had come in with newer Samsung devices, and +some Pixels users too; the latter of whom I *rightfully* chastised for +expecting a Samsung S10 specific app to work on a completely different +device by a different manufacturer, this could *never* work... :) + +#### Supporting 'all' Samsungs + +I wasn't planning to hardcode support for all these other Samsung +devices as I had done for the S10, as that sounds suspiciously like +work. However, during my trip down decompiler's lane to fix that +*Unholey* rendering issue, I ran into Samsung's internal API to display +the face detection swirl on the lockscreen again (where *Holey Light*'s +animation originally comes from). + +I had seen this code before, but for whatever reason at the time it +didn't click how to leverage it (camera punch-hole Samsungs were a +relatively new thing then, or insert another excuse here). This time +around I decided to properly investigate. + +I ended up with the solution to load the relevant classes from the +Samsung in-firmware APK into *Holey Light* at runtime, and querying them +for the information the app needs to display the right animation in the +right place. + +This is not without its issues. It relies on reflection (Google no like) +and the relevant code wants to resolve classes and fields that are not +publicly accessible and blocked by Android's newest safeguards. It also +seems for the newest firmwares, Samsung rewrote the relevant code in +Kotlin which changes some handling. + +With some copy/pasting (with minor adjustments) of some decompiled +methods, smart reflection, and creating a few shims (exploiting +Android's runtime class linking) this actually ended up working +remarkably well. + +It should however be noted that this can break at any time and any +Samsung firmware update. Additionally, at this point only the normal +(and by far most used) circular and (S10+) circurectangular (//TODO add +to dictionary) animations have been tested. The decompiled source implies +there are other deviants that have not been tested and may not work well. + +I could not have done this without the army of testers trying this +unstable-by-definition code on many different devices and firmwares and +reporting where it breaks. + +However, Samsung's provided values do not actually cause the animation +to hug the camera with pixel precision: the result was less *tight* +than *Holey Light*'s old hardcoded values. Rather than testing every +single device and firmware and hardcoding adjustments or relying on +every user to manually tune their settings, the *black fill* option was +created (enabled by default) which fills the inside of the circular +animation with black pixels, so you don't actually see if it's off by +a few pixels. So actually, it doesn't work that well, I'm just deceiving +you into believing that it does :) + +Advanced users can of course go into the *Tune* section of the app and +manually improve the situation (*black fill* is automatically disabled +during tuning). + +Honorary mention for tester *Mohamed LastNameCensored*, who armed with a +Fold2 single-handledly discovered such a large number of edge-case +issues in all-Samsung support, that the frustration-induced hair-pulling +during analysis and code adjustment might just have negated the need +for a post-COVID-lockdown de-yeti-fication haircut on my end. + +#### Supporting Pixels + +After relentlessly chastising Pixel users for their entitlement issues +and inability to read my notice about the app being both *Samsung* and +*S10* only, one of them dared ask *but why* the Pixel 5 wasn't +supported. It was quickly determined all my *reasons* were in fact +*excuses* and the challenge was accepted. + +Samsung's *Always-On Display* is of course largely based on Google's +*Ambient Display* feature, so ultimately the amount of code that had to +be adjusted wasn't that large. It mostly came down to testing. + +For Pixels, there is no way (that I know of) to get the *exact* camera +position as there is (now) for Samsung, which means I once again +resorted to hardcoding tuning values. For the Pixel 4A and 5 these +values are included in the app already. Other Pixels (such as the 4A 5G) +will require users to *Tune* manually. If they inform me of the values +that work best for them, I can include them in the next update. + +I tested myself using a Pixel2XL modded to present itself to the app as +a Pixel 4A. Curiously in testing I noticed that the P2XL uses +significantly less power than my S10 to keep AOD running (tested +without *Holey Light* active), even though the Pixels persist the entire +screen in *doze* mode while Samsungs only persist a small area (I'm not +even sure that specific difference should matter for power draw though). +Of course that is just *one* specific observation, it might not hold up +comparing for example an S21 to a Pixel 5. + +#### Supporting other devices + +Now that Pixel support is implemented, supporting other brands - as long +as their *Ambient Display* implementation is close to Google's original - +should not be terribly difficult. This will however require *some* code +changes and thus an active tester. The app as-is will refuse to do its +thing. + +There was also a request to allow *Holey Light* to work in *Unholey +Light* mode even for devices that do not have a camera punch-hole but +this is currently not supported nor on my todo list. + +#### Changes to notification handling + +I thought I was done with my Android 11 fixes, but a number of testers +reported issues with a number of notifications they had. + +This already started on Android 10, but Android 11 changed even more +subtle things in how notifications work. Some apps also changed how +they used the notification light in the past year or two. + +Quite a bit of work went into figuring out how grouping, conversations, +and bubbles operated. Ultimately the fixes were small in lines of code, +but large in testing time. + +Particularly the handling of bubbles (looking at you, Messenger!) took +a number of tries to get right (I hope). As I only have one friend and +he sneers at all social media use, some of these issues were not +apparent in my own tests. Luckily, tester *Thibault +LastNameCensored* (no relation to *Mohamed* as far as I know) and his +vast collection of chatty friends ran into *all of the issues* and +relentlessly slammed my dreams of things actually working for once. + +#### Changes to notification colors + +The initial color for previously unknown notifications has changed. The app +in general already didn't respect notifications' provided LED colors as +an absurdly large amount of apps use the same color (namely, white). In +previous versions of *Holey Light* in a number of situations the +notification's accent color was used instead of the LED color. + +For this release I've taken it a step further and analyze the app's +launcher icon for (averaged) dominant color, then dial up both the +brightness and saturation of that base color to the maximum level. I +feel this generally creates a better looking and somewhat more diverse +palette of initial notification colors. The code is also more aggressive +in applying this color than in previous versions. + +This more or less results in a notification's LED color to be ignored +and replaced by our own calculated color *by far* most of the time. For +the *power* users who customize notification LED colors in (for example) +WhatsApp itself to differentiate between different chats this is +slightly inconvenient as those LED colors are lost (though I still think +this is a better setup for the *average* user). However, these +customized notifications each create their own *notification channel*, +and thus they can be manually overridden again in the *Colors* section +of *Holey Light*. + +### EOF + +Thank you for coming to my TED talk! diff --git a/README_tech.md b/docs/tech.md similarity index 96% rename from README_tech.md rename to docs/tech.md index ec650ba..5ef864c 100644 --- a/README_tech.md +++ b/docs/tech.md @@ -1,6 +1,6 @@ -Notice: the following texts were written with Samsung devices in mind. -While it largely translates to other manufacturers, there are some -differences. +Notice: the following texts were written some time ago with Samsung +devices in mind, and may be somewhat outdated. While things largely +translate to other manufacturers, there are some differences. ### Battery use