feat(duo): add subtle battery progress wiggle charging animation - #954
Open
Balajitechlabs wants to merge 8 commits into
Open
feat(duo): add subtle battery progress wiggle charging animation#954Balajitechlabs wants to merge 8 commits into
Balajitechlabs wants to merge 8 commits into
Conversation
- Animate subtle damped spring wiggle on battery progress upon power connection - Render electric bolt glyph in the cutout orbital gap with dynamic charging accent - Settle static immediately after initial wiggle to prevent constant visual distraction - Guard fullscreen detection to preserve Duo rendering in portrait orientation - Add user toggle in Duo settings under What to Show
…lashlight, beta, description fixes, motion blur slider, fix fav feature order, (sameerasw#955) This pull request introduces support for tracking active progress notifications and adds new settings and feature toggles for the "Duo" interface. It also refactors how media session state is handled in the AOD wallpaper overlay and updates the app version. The most significant changes are grouped below: **Progress Notification Tracking:** * Introduced the `ProgressNotificationData` data class to represent active progress notification details (`app/src/main/java/com/sameerasw/essentials/domain/model/ProgressNotificationData.kt`). * Added logic in `NotificationListener` to extract, track, and notify listeners about progress notifications, including registering/unregistering listeners and extracting notification details (`app/src/main/java/com/sameerasw/essentials/services/NotificationListener.kt`). [[1]](diffhunk://#diff-498b28fde1f8658b760f1a339a81eb7f8b84cca34cdfa32fde7f775168ed4d63R42-R45) [[2]](diffhunk://#diff-498b28fde1f8658b760f1a339a81eb7f8b84cca34cdfa32fde7f775168ed4d63R56-R79) [[3]](diffhunk://#diff-498b28fde1f8658b760f1a339a81eb7f8b84cca34cdfa32fde7f775168ed4d63R918-R922) [[4]](diffhunk://#diff-498b28fde1f8658b760f1a339a81eb7f8b84cca34cdfa32fde7f775168ed4d63R1276-R1277) [[5]](diffhunk://#diff-498b28fde1f8658b760f1a339a81eb7f8b84cca34cdfa32fde7f775168ed4d63R1621-R1687) **Duo Feature and Settings Enhancements:** * Added new keys and getter/setter methods in `SettingsRepository` for Duo feature options such as showing media, progress, flashlight, and advanced screen-off behavior (`app/src/main/java/com/sameerasw/essentials/data/repository/SettingsRepository.kt`). [[1]](diffhunk://#diff-3034452163f09f9c5b913dccd6f93b4a3fefaf773460d401d8904f6f151eb1a7R340) [[2]](diffhunk://#diff-3034452163f09f9c5b913dccd6f93b4a3fefaf773460d401d8904f6f151eb1a7R369-R373) [[3]](diffhunk://#diff-3034452163f09f9c5b913dccd6f93b4a3fefaf773460d401d8904f6f151eb1a7R3103-R3117) * Updated the `FeatureRegistry` to register the Duo feature as a beta feature under the "Display" category, and added the necessary permission registration (`app/src/main/java/com/sameerasw/essentials/domain/registry/FeatureRegistry.kt`, `app/src/main/java/com/sameerasw/essentials/domain/registry/PermissionRegistry.kt`). [[1]](diffhunk://#diff-24845de72ed4d362c708778c76734f4c7ebe02be324274ede2d7bfcc2bbfd23dR688-R713) [[2]](diffhunk://#diff-24845de72ed4d362c708778c76734f4c7ebe02be324274ede2d7bfcc2bbfd23dL1364-L1393) [[3]](diffhunk://#diff-b1f1d547c9026cdc9d71b988988d5b536d7b0aad6cabde798889fb8abc00d6c6R114) **AOD Wallpaper Overlay Media Handling Refactor:** * Refactored `AodWallpaperOverlayHandler` to better manage media session controllers, callbacks, and excluded packages, improving maintainability and reliability of media state handling (`app/src/main/java/com/sameerasw/essentials/services/handlers/AodWallpaperOverlayHandler.kt`). [[1]](diffhunk://#diff-52f1cbd34ce4793a643ebc79ea0f84d7522fbebe0ab94916e8dc0985f2f93e25R30) [[2]](diffhunk://#diff-52f1cbd34ce4793a643ebc79ea0f84d7522fbebe0ab94916e8dc0985f2f93e25R42) [[3]](diffhunk://#diff-52f1cbd34ce4793a643ebc79ea0f84d7522fbebe0ab94916e8dc0985f2f93e25R67-R68) [[4]](diffhunk://#diff-52f1cbd34ce4793a643ebc79ea0f84d7522fbebe0ab94916e8dc0985f2f93e25L92-R100) [[5]](diffhunk://#diff-52f1cbd34ce4793a643ebc79ea0f84d7522fbebe0ab94916e8dc0985f2f93e25R109-R117) [[6]](diffhunk://#diff-52f1cbd34ce4793a643ebc79ea0f84d7522fbebe0ab94916e8dc0985f2f93e25L146-L156) **Version Update:** * Updated the app version name to `18.0-beta.4` in the Gradle build configuration (`app/build.gradle.kts`).
Contributor
Author
|
Hey @sameerasw, while syncing with latest main, noticed SettingsActivity was failing to compile due to a missing label_motion_blur_amount string from the recent motion blur slider merge. I've restored it here so the build passes cleanly alongside the charging updates. |
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.
Context
Following maintainer and community feedback on charging indicators, continuous animations while plugged in are visually distracting and waste display cycles. This PR replaces any looping motion with a refined, one-time tactile entrance when a charger is plugged in: a liquid progress sweep from 0% to the current battery level with a gentle elastic breath, settling into a damped spring wiggle. Once the initial 950ms entrance finishes, the ring settles completely static at the current battery percentage with zero ongoing redraws.
What's included
ACTION_POWER_CONNECTEDfires, Duo runs a single-shot 950ms entrance:0.0 -> 1.0) into the cutout gap using an overshoot interpolator on plug-in, and scales it back to 0 on disconnect.#00E5FF) on fast charging (SuperVOOC, PD, QC) or emerald (#00E676) on standard charging.checkFullscreenStateso Duo does not falsely treat edge-to-edge portrait apps as fullscreen media, keeping the cutout overlay visible in portrait orientation.Testing
./gradlew :app:assembleDebug --no-daemonon JDK 21 / Gradle 9.5 (clean build).