refactor(service): refine floating behavior for progress notifications#164
Merged
Conversation
- **Notification Logic**:
- Updated `ProgressTranslator` to restrict the floating behavior (`setEnableFloat`) to only the initial appearance of a notification, preventing repeated floats during updates.
- Removed the redundant `setIslandFirstFloat` call from the builder.
close #146
D4vidDf
added a commit
that referenced
this pull request
Jun 2, 2026
* Feat/color picker (#127) * feat(theme): implement HSL color picker and enhanced lightness slider - **New `CustomColorBottomSheet`**: Introduced a dedicated HSL (Hue, Saturation, Lightness) color picker with gradient sliders for precise theme color customization. - **Enhanced `ColorsDetailContent`**: - Overhauled the preset tab with an animated lightness slider that appears when a preset is selected. - Improved the preset selection logic to maintain the "base" hue even when adjusting lightness to extreme white or black. - Redesigned the "Custom" colors section to use the new HSL bottom sheet instead of a simple hex text field. - Switched from simple circular bubbles to a more refined UI with selection rings and rounded-square transitions for active colors. - **Improved Theme Creator State**: - Implemented strict state clearing (nulling `currentEditingThemeId`) when exiting the creator to prevent state leakage between editing sessions. - Updated save/apply dialog logic to ensure the UI resets correctly after persistence. - **Shared Components**: Added `GradientSlider` and `ColorBubble` to `HyperOSColorPicker.kt` for reusable, stylized color selection components. - **Localization**: Added missing string resources for color labels (Hue, Saturation, Lightness) in English and Spanish. * #### feat(theme): implement advanced color modes and redesigned color picker - **Color Modes**: Introduced a `ColorMode` system (`CUSTOM`, `APP_ICON`, `MATERIAL_YOU`) to replace the binary "Use App Colors" toggle. This allows themes to dynamically adapt to Material You system colors or extract colors from app icons globally and per-app. - **Improved Color Picker**: Replaced standard text fields with a new `CustomColorBottomSheet` in the Call Style and Theme Creator screens, featuring a visual HSL-based selection and hex formatting. - **UI & UX Refinement**: - Redesigned `ColorsDetailContent` with a scrollable layout and new sections for dynamic color modes. - Updated the Theme Creator preview to correctly reflect the active color mode. - Standardized "My Theme" and "Share Theme" strings to use localized resources. - **Data Persistence**: Updated `HyperTheme`, `GlobalConfig`, and `AppThemeOverride` models to support the new `ColorMode` enum while maintaining backward compatibility with legacy themes. - **Theme Creator**: Refactored `ThemeViewModel` to handle more robust state initialization and migration when editing or creating new themes. - **Tooling**: Added Crowdin configuration settings for the IDE. * feat(widget): add favorites, recommended filtering, and update notice (#128) - **Widget Picker**: - Implemented a "Recommended" filter to highlight 1x4 and 2x4 layouts compatible with the Island size. - Added a Favorite system for widget apps, allowing users to star apps for top-level sorting. - Added a floating navigation bar to switch between Recommended and All widgets. - Improved dimension display by converting DP to grid cell proportions (e.g., 4x2). - **Saved Widgets**: - Added a persistent "Update Notice" dialog to remind users to check Autostart/Battery permissions after an app update. - Implemented a "Kill Active Widgets" action to instantly dismiss all running widget overlays. - Redesigned the UI with a centered filter toolbar (Favorites vs. All) and a dedicated Add FAB. - Added reactive listening for newly added widgets to ensure the list updates immediately. - **Service & Data**: - Enhanced `WidgetOverlayService` with specific `ACTION_KILL_WIDGET` and `ACTION_KILL_ALL_WIDGETS` handlers for immediate UI cleanup. - Added `favoriteWidgetAppsFlow` to `AppPreferences` to persist starred widget providers. - **Localization**: - Added English and Spanish strings for filters, permission reminders, and widget management. CLOSE #72 * feat(service): implement Native Android 16 Live Updates support - Added `LiveUpdateTranslator` to transform standard notifications into native Android 16 promoted ongoing tasks using `android.requestPromotedOngoing` and `android.shortCriticalText`. - Implemented a toggle in Global Settings to choose between custom Xiaomi Islands and native Android 16 Live Updates. - Created a dedicated `hyper_bridge_live_update_channel` for native updates to manage notifications and visibility independently. - Added `POST_PROMOTED_NOTIFICATIONS` permission to `AndroidManifest.xml` to support Android 16's promoted notification features. - Enhanced `LiveUpdateTranslator` with a `generateCriticalShortText` helper to dynamically extract progress percentages or ETAs for the system status chip. - Fixed Android 16 category filtering by forcing Live Updates into strictly valid categories (`PROGRESS` or `TRANSPORT`) to prevent OS blocking. - Ensured original notification timestamps are preserved for accurate system-wide "time active" calculations. - Updated `NotificationReaderService` to support hot-swapping between custom injection and native updates via shared preferences. * feat(service): enhance Live Update processing and Android 16 compatibility - **NotificationReaderService**: Implemented a more robust content hashing algorithm that tracks Title, Text, Progress (max, current, indeterminate), and Button Action states (e.g., Play to Pause transitions) to ensure accurate UI updates. - **LiveUpdateTranslator**: - Added support for large icons and picture extras in live updates. - Improved media notification handling by suppressing progress bars that often persist in the background. - Optimized category mapping (Progress vs. Transport) to comply with Android 16 ongoing promotion requirements. - Updated `shortCriticalText` generation logic to prioritize media titles, percentages, or time ETAs for the Dynamic Island chip. - Switched to native Android 16 APIs for promoted ongoing requests and short critical text injection. * feat(settings): refactor Global Settings UI and update version - Updated `versionName` to `0.5.0-alpha01`. - Redesigned `GlobalSettingsScreen` to use consistent card-based layouts for all settings items. - Replaced the "Native Live Updates" `ListItem` with a new standardized `SettingsSwitchItem` component. - Improved UI spacing and styling across the settings screen, including unified icon background treatments. - Simplified state management and click behavior for toggleable settings. * Update changelog resource to v0.4.2 * build: update project dependencies and gradle configuration (#134) - **Gradle & AGP**: - Upgraded Android Gradle Plugin (AGP) from `8.13.2` to `9.1.0`. - Upgraded Gradle wrapper from `8.13` to `9.3.1`. - Added `foojay-resolver-convention` plugin to `settings.gradle.kts` for automated toolchain management. - **Dependencies**: - Updated Kotlin to `2.3.20` and KSP to `2.3.2`. - Updated Compose BOM to `2026.03.00` and Material3 to `1.5.0-alpha15`. - Updated various AndroidX libraries: `core-ktx` (`1.18.0`), `datastore-preferences` (`1.2.1`), `activity-compose` (`1.13.0`), and `ui` (`1.10.5`). - Bumped `kotlinx-serialization-json` to `1.10.0`. - **Build Configuration**: - Removed `kotlin-android` plugin in favor of `kotlin-compose` and built-in Kotlin support. - Removed explicit `jvmTarget` configuration in `app/build.gradle.kts`. - Enabled several experimental/new Android Gradle properties in `gradle.properties`, including `android.builtInKotlin` and `android.newDsl`. - **Optimization**: - Updated `proguard-rules.pro` to strip Debug and Info logs in release builds using AGP 9.1+ syntax. * Feature/ux iprovement global configuration (#137) * feat(settings): redesign Global Settings and enhance Theme Engine - **Global Settings UI**: - Refactored `GlobalSettingsScreen` to use a card-based list layout with standardized `ListOptionCard` components. - Split settings into dedicated screens: `EngineSettingsScreen`, `IslandSettingsScreen`, and `NavCustomizationScreen`. - Added an "Engine" section to toggle between "Xiaomi Featured Design" and "Native Android Live Updates". - Implemented a more granular "Island Behavior" configuration including an improved auto-hide timeout slider with snap points (1s to 1h). - **Theme Engine**: - Integrated "Engine", "Island Behavior", and "Notification Types" selection directly into the Theme Creator flow. - Added a real-time `EnginePreview` component to visualize differences between Xiaomi and Native Live Update designs. - Added a "Notification Types" manager to toggle triggers for Standard, Progress, Media, Navigation, Call, and Timer events. - **Functionality & Fixes**: - **Crash Fix**: Resolved a critical issue causing the app to crash when opening settings in Traditional Chinese. - Updated `AppPreferences` to support persistent storage for the native notification engine toggle. - Improved `ThemeViewModel` with a more efficient bitmap scaling method for theme thumbnails. - Updated `StandardTranslator`, `NavTranslator`, and `ProgressTranslator` to better respect global timeout and dismissal configurations. - Set the default notification shade visibility to `false` for a cleaner "Island-only" experience by default. - **Localization**: - Added extensive string resources for version 0.4.2 hotfix and new engine settings across multiple languages (SK, PL, RU, ZH-TW, TR, UK, PT-BR, CS, DE, HU, IN, IT, KO, ES). - Fixed several translation issues in Traditional Chinese and Spanish. * feat(settings): externalize and localize auto-hide island strings - **UI**: Refactored `IslandSettingsControl.kt` to use `stringResource` instead of hardcoded strings for the Auto-hide Island feature. - **Localization**: - Added new string resources (`auto_hide_island`, `hides_after_a_set_time`, `behavior_hide_desc`, `behavior_desc_hide_long`) to multiple locales: Slovak, Polish, Russian, Traditional Chinese, Turkish, Ukrainian, Portuguese (Brazil), Czech, German, Indonesian, Italian, Korean, Spanish, and Hungarian. - Updated Spanish translations for behavior and trigger settings. - Standardized ellipsis usage from `…` to `...` in Portuguese (Brazil) and Korean `strings.xml`. * build: update version and remove redundant material3 dependency - Updated `versionName` to `0.5.0-alpha02`. - Removed explicit `androidx-material3` dependency from `libs.versions.toml` and `app/build.gradle.kts` (now managed via Compose BOM). * feat(localization): add French (France) translation - Added complete French localization (`strings.xml`) for the entire application. - Translated all core UI components, including onboarding, settings, library, and about screens. - Localized complex features such as the Theme Engine, Backup & Restore, and the new Notification Engine settings. - Provided French translations for all historical changelogs (v0.1.0 through v0.4.2). - Included localized string arrays for specific notification keyword matching (navigation, calls, and progress updates). * feat(theme): implement layered app-specific behavior overrides - **Notification Service**: - Implemented a layered resolution system (Theme > App > Global) for notification triggers and engine selection. - Updated `NotificationReaderService` to respect theme-managed app configurations and simplified processing logic. - Enhanced `LiveUpdateTranslator` to support themed colors and icons for the Native Live Update engine, specifically for navigation events. - Improved title and text resolution with smarter fallback mechanisms and content hashing for updates. - **Theme Engine & Editor**: - Added app-specific behavior overrides to the Theme Creator, allowing per-app configuration of notification types and engine selection (Xiaomi vs. Native). - Integrated "Engine", "Island Behavior", and "Notification Types" into the App Theme Editor. - Added `AppNotificationTypesEditor` for granular control over which event types (Standard, Media, Nav, etc.) trigger the island for specific apps. - Refactored `EngineThemeContent` to support an optional "Use Global Default" state. - **UI & Settings**: - Redesigned the "Notification Types" settings using `SettingsToggleCard` for a more consistent card-based look. - Added a theme-managed warning to the App Settings dialog when behaviors are controlled by an active theme. - Externalized and localized several strings related to triggers and engine management. - Added French language support to the locale selector. - **Technical Improvements**: - Introduced `ConfigResolver` for fast, in-memory resolution of effective configurations for translators. - Updated `AppPreferences` and `ThemeRepository` to support persistent storage of per-app engine and trigger overrides. - Standardized navigation layout resolution to respect layered preferences (Global Fallback vs. App-Specific). * feat(localization): add trigger configuration and override strings - **Localization**: Added new string resources for "Active Triggers", "Trigger Override", and "Notification Engine" configuration across multiple locales (SK, PL, RU, FR, ZH-TW, TR, UK, PT-BR, CS, DE, IN, IT, KO, HU). - **Strings**: - Added descriptions for notification types: Standard, Progress, Media, Navigation, Call, and Timer. - Added UI strings for global trigger settings and per-app overrides. - Added `managed_by_theme_desc` and `use_global_default_engine` to support theme-based behavior logic. - **Cleanup**: Removed unused mock engine strings (`engine_mock_charging`, `engine_mock_percentage`, etc.) from all translated `strings.xml` files. * feat(theme): enhance engine resolution and theme-persistent configuration (#147) - **Notification Service**: - Refactored `getEffectiveEngine` in `NotificationReaderService` to implement a 4-tier resolution priority: Theme App Override > User App Override > Theme Global Override > User Global Fallback. - **Theme Engine & Editor**: - **Global Settings**: Added `use_native_live_updates` to `GlobalConfig` model, allowing themes to define a default engine for all apps. - **Persistence**: Fixed an issue where changing the engine via the UI while a custom theme was active would not persist; it now correctly patches the active Theme JSON. - **Theme Creator**: - Updated `ThemeViewModel` to correctly load and save the global engine selection to the Theme JSON. - Fixed a bug where existing call configurations were wiped when updating app-specific live update settings. - Improved state management by making `themeUseNativeLiveUpdates` nullable to support inheritance. - **UI & Settings**: - **Engine Settings**: Refactored `EngineSettingsScreen` to use `AppPreferences` and `ThemeRepository` instead of raw `SharedPreferences`. - Integrated real-time engine updates by sending `ACTION_RELOAD_THEME` to the background service upon configuration changes. - Standardized UI spacing and typography in the Engine selection screen. - **Bug Fixes**: - Fixed a bug in `AppListViewModel` where app-specific engine overrides were not being saved to the active theme if the override didn't already exist. - Corrected `@StringRes` annotation usage in `ShapeOption` enum. * build: update version to 0.5.0-alpha03 and update localizations - **Build**: Bumped `versionCode` to `17` and `versionName` to `0.5.0-alpha03` in `app/build.gradle.kts`. - **Localization**: - **French (FR)**: Completed translations for the "Engine" configuration, "Island Behavior", and "Active Triggers" sections. Updated backup and app configuration strings. - **Italian (IT)**: Translated the v0.4.2 changelog, engine settings, color labels, and navigation arrival keywords. - **Traditional Chinese (ZH-TW)**: Fully localized the new Engine, Behavior, and Trigger settings. Refined onboarding and permission strings (e.g., "HyperIsland" to "超級島"). - **Hungarian (HU)**: Localized engine settings, behavior controls, trigger descriptions, and the v0.4.2 hotfix changelog. Updated call-related keywords. - **Portuguese (Brazil)**: Translated the v0.4.2 changelog, color labels, and UI state strings (Recommended, Favorites, All). Updated navigation arrival keywords. - **Strings**: Standardized engine configuration keys across all modified locales to support the transition between "Xiaomi Featured Design" and "Native Android Live Updates". * loc(fr): fix apostrophe escaping in French strings - Updated `island_behavior_desc` and `engine_timeouts_triggers` in the French (`fr-rFR`) `strings.xml` to properly escape apostrophes, ensuring correct XML parsing and display. * Feature/nav3 migration (#152) * build: integrate Navigation 3 and refactor app routing - **Dependencies**: Added `androidx.navigation3` (runtime and UI) and `androidx-lifecycle-viewmodel-navigation3` to `libs.versions.toml` and `app/build.gradle.kts`. - **Navigation Framework**: - Introduced `NavigationState` to manage persistent back stacks for top-level routes (Onboarding and Home). - Implemented a `Navigator` class to abstract forward and backward navigation logic using Navigation 3 APIs. - Replaced the manual `Screen` enum and `AnimatedContent` router with a `@Serializable` sealed interface and `NavDisplay`. - **Routing & State**: - Refactored `MainActivity` to use `entryProvider` for screen definitions, simplifying navigation calls across the app. - Updated screen transitions to leverage `NavDisplay`'s built-in handling of the back gesture and entry management. - Improved data passing between screens (e.g., `ImportPreview` and `NavCustomization`) by using type-safe classes in the `Screen` sealed interface. - **Models**: Added `@Serializable` annotations to backup-related models (`HyperBridgeBackup`, `BackupMetadata`, `AppSettingBackup`) to support type-safe navigation arguments. - **UI**: Standardized back-button behavior across all settings and configuration screens to use the new `Navigator.goBack()` method. * refactor(navigation): modularize and relocate navigation logic - **Navigation Architecture**: - Created a new `com.d4viddf.hyperbridge.ui.navigation` package to house navigation-related components. - Moved `Screen` definition from `MainActivity.kt` to its own file `Screen.kt`, maintaining `@Serializable` support for all application routes. - Relocated `NavigationState.kt` and `Navigator.kt` to the new navigation package and updated their package declarations accordingly. - **MainActivity**: - Cleaned up imports and removed inline `Screen` interface definition to use the new modularized navigation components. - Updated references to use `toEntries` and other navigation extension functions from the new package. * refactor(navigation): modularize nav graph and enhance back press handling - **Navigation**: - Extracted the main navigation graph from `MainActivity.kt` into a new standalone `mainNavGraph` function in `NavGraph.kt` to improve maintainability. - Updated `Navigator.goBack()` to return a boolean indicating if the back event was handled, allowing for better control over app exit logic. - Integrated `BackHandler` in `MainActivity` to properly handle system back gestures and call `onExit` when at the root of the navigation stack. - **MainActivity**: - Refactored `MainRootNavigation` into smaller, more focused composables (`MainRootNavigation` and `MainNavigationContent`). - Improved the initialization flow to show a `CircularProgressIndicator` while the setup status is being loaded from preferences. - Simplified the logic for switching between `Onboarding` and `Home` routes based on the setup completion state. - **UI**: Standardized back navigation behavior across all screens, ensuring consistent exit behavior from the `Info` screen. * feat(ui): implement custom navigation transitions and predictive back support - **Navigation**: - Added custom `transitionSpec` and `popTransitionSpec` using horizontal slides and fades for smoother screen transitions. - Implemented `predictivePopTransitionSpec` to support Android's predictive back gesture with scaling and transform origin adjustments based on swipe edge. - Dynamically updated `topLevelRoutes` to prevent navigating back to the onboarding flow once setup is complete. - **UI**: - Applied a rounded corner clip (32.dp) to the main `NavDisplay` container. - Optimized transition durations to 400ms for a more fluid user experience. * chore: code cleanup, dependency update, and UI refinements - **UI & UX**: - **Widget Picker**: Refactored `WidgetPickerScreen` and removed `WidgetPickerViewModel.kt` to streamline widget selection logic. Updated layout filtering to consistently use `targetCellWidth` and `targetCellHeight`. - **Theme Creator**: Improved navigation and state management in `ThemeCreatorScreen` and `AppThemeEditorScreen`. Enhanced UI consistency for color and icon selection previews. - **Licenses**: Updated `LicensesScreen` to dynamically load a sorted list of open-source libraries and externalized the screen title string. - **Components**: Standardized `EmptyState` component parameters and improved layout logic in `WidgetConfigScreen` and `SavedAppWidgetsScreen`. - **Localization**: - Added `open_source_licenses` string resource. - Refactored `WidgetConfigScreen` to use localized toast and error messages. - **Translators**: - **Standard**: Cleaned up title resolution logic in `StandardTranslator`. - **Progress**: Updated `ProgressTranslator` to hide redundant percentage text in specific circular progress views. - **Internal Improvements**: - **Compatibility**: Removed redundant SDK version checks for `Parcelable` handling and notification permissions, favoring modern Android APIs. - **Utilities**: Switched to `androidx.core` extension functions for `Bitmap` creation and `Uri` parsing. - **Persistence**: Updated `SavedAppWidgetsScreen` to use the `edit { }` DSL for `SharedPreferences`. - **Data**: Refined theme ID generation in `ThemeRepository` and improved rule engine comments. - **Bug Fixes**: - Fixed a potential nullability issue in `AppListViewModel` when patching theme configurations. - Corrected `IslandConfig` initialization in the App Settings dialog. * Feature/duplication toggle (#153) * feat(settings): enhance island behavior with heads-up timeout and notification management - **Island Configuration**: - Introduced `floatTimeout` to `IslandConfig` to control the duration of heads-up popups. - Added `removeOriginalNotification` toggle to allow automatic dismissal of source notifications when a Live Update is active. - Updated `AppPreferences` and `AppSettings` to support persistent storage for these new global and per-app settings. - **UI & Settings**: - **Island Settings**: Redesigned the "Heads-up Popup" configuration with an animated slider for granular timeout control (1s to 30s). - **Live Updates**: Added a new section in `IslandSettingsControl` to manage the removal of original notifications. - Improved UI scrollability in `IslandSettingsScreen` and added several Compose previews for better development feedback. - Refactored toggle logic to ensure consistency between heads-up and timeout states. - **Translators**: - Updated all translators (`Media`, `Call`, `Progress`, `Standard`, `Nav`, `Timer`) to respect the new `expandedTimeMs` (heads-up timeout) configuration. - Cleaned up redundant theme color application logic in `TimerTranslator`. - **Localization**: - Added string resources for "Live updates", "Remove original notification", and "Heads-up popup" timeout descriptions. * feat(service): implement notification timeout and original notification removal - **Notification Service**: - Introduced a `handlePostNotificationSideEffects` method to manage post-processing logic for translated notifications. - Added support for automatically cancelling the original system notification when `removeOriginalNotification` is enabled in the configuration (excluding Media notifications). fixes #21, fixes #120, fixes #146 - Implemented a timeout mechanism using coroutines to automatically dismiss translated notifications after a configured duration. - Added `intentionallyRemovedKeys` tracking to prevent recursive processing loops when the service cancels a system notification. - Improved cleanup logic in `onNotificationRemoved` and `cleanupCache` to ensure associated timeout jobs are cancelled and resources are freed. - **Bug Fixes**: - Added missing cancellation of existing processing jobs and timeout jobs when a notification is removed or updated. - **Logic Improvements**: - Improved design logic for new notification parameters ( closes #99) and add theme configuration ( closes #107) * fix(service): refine notification timeout logic and dismissal behavior - **Notification Service**: - Modified `onStartCommand` to use non-nullable `Intent` parameters for better type safety. - Updated notification removal logic to ensure the source notification is no longer canceled when the Island notification is dismissed or times out. - Refactored `handlePostNotificationSideEffects` to only apply timeout scheduling to "Live Update" notifications. - Improved cache cleanup and logging during notification dismissal to prevent unintended side effects on source notifications. * Feature/onboarding screen (#155) * feat(ui): redesign onboarding flow and expand configuration options - **Onboarding Experience**: - Significantly expanded the onboarding process from 7 to 11 pages, incorporating new configuration steps for triggers, engine selection, and island behavior. - Redesigned the `OnboardingScreen` layout with improved navigation controls, including a dedicated "Back" button and a more prominent "Get Started" entry point. - Added several new pages: `TriggersConfigPage` (active notification types), `PriorityEducationPage` (island limit behavior), `BehaviorConfigPage` (notification removal and shade visibility), `CustomizationPage` (themes and widgets), and `EngineConfigPage` (Xiaomi vs. Native Live Updates). - Integrated `ModalBottomSheet` for granular settings configuration directly within the onboarding flow. - Added extensive Compose previews for all onboarding pages to improve development feedback. - **Data & Logic**: - **AppPreferences**: Implemented a migration check to force an onboarding reset for users upgrading to version 0.5.0 (versionCode 17). - **MainActivity**: Removed the standalone `PriorityEducationDialog` as its logic is now integrated into the onboarding flow. - **Build Configuration**: Enabled `buildConfig` in `app/build.gradle.kts` and updated the Kotlin serialization plugin version. - **Localization & Resources**: - **Strings**: - Standardized and updated terminology across multiple languages (ES, HU, IT, ZH-TW, SK, CS, TR, DE, PT, KO, FR, UK, RU, ID). - Added new string resources for the expanded onboarding descriptions, "Live updates" management, and "Remove original notification" toggles. - Refined French strings to ensure proper apostrophe escaping and formatting. - Simplified and updated battery optimization instructions ("Allow Autostart", "Disable Restrictions"). - **Icons**: Switched to modern Rounded/Filled icon variants for a more consistent visual style across the setup pages. * feat(onboarding): implement auto-hide configuration page - **Onboarding Flow**: - Expanded the onboarding process from 11 to 13 pages to include more granular behavior settings. - Introduced a dedicated `AutoHideConfigPage` to manage island timeout settings during initial setup. - Updated `BehaviorConfigPage` description to reflect its role in global configuration. - **UI & Components**: - Added an interactive "Auto-hide Island" section with a `Switch` and an `AnimatedVisibility` slider for timeout selection. - Exposed `timeoutSteps` and `formatSeconds` from `IslandSettingsControl.kt` to be reusable across the onboarding flow. - Integrated `Icons.Rounded.Timer` and `Icons.Default.AccessTime` for improved visual cues in behavior settings. - **State Management**: - Updated `OnboardingScreen` to persist `IslandConfig` timeout and `isFloat` preferences directly through `AppPreferences`. - **Localization**: - Added `behavior_desc_glob_config` string resource for better description of island behavior settings. * chore: bump version to 0.5.0-beta01 and refine onboarding navigation - **Build**: - Updated `versionCode` to `18` and `versionName` to `0.5.0-beta01` in `app/build.gradle.kts`. - **Navigation**: - **Navigator**: Introduced `finishOnboarding` to explicitly handle the transition from onboarding to the home screen by ensuring the home stack is initialized before clearing the onboarding route, preventing potential app closure. - **MainActivity**: Refactored `navigationState` initialization to use a persistent set of all possible top-level routes and a fixed initial start route. - **NavGraph**: Updated setup completion logic to use the new `navigator.finishOnboarding` method and removed redundant priority education flags. - **Onboarding**: - Refactored `OnboardingScreen` to dynamically determine the last page using `pagerState.pageCount` instead of a hardcoded index. - **Data & Persistence**: - **AppPreferences**: Updated the onboarding reset logic to target `versionCode 18` for version 0.5.0, forcing a setup reset for users on older builds. * chore: general cleanup, bug fixes, and maintenance - **UI & Components**: - Removed several legacy dialogs and components: `ChangelogDialog`, `PriorityEducationDialog`, and `DeviceCompatibility`. - Simplified `CommonCards.kt` by removing `ExpandableOptimizationCard` and localized logic. - Refactored `HyperOSColorPicker` to remove unused `ColorBubble` component. - Added `verticalScroll` to `ThemeSettingsContent` to improve navigation on smaller screens. - Updated `IslandSettingsControl` and `IslandSettingsScreen` to use explicit `IslandConfig` initialization. - Added a content description for the widget snapshot layout. - **Notification Service & Logic**: - Refactored `NotificationReaderService` and `LiveUpdateTranslator` to improve string handling and reliability when resolving notification titles/text. - Enhanced exception handling across the service and data layers using suppressed exceptions (`catch (_: Exception)`) to reduce log noise. - Improved app label caching and package filtering logic. - **Data & Persistence**: - Cleaned up `AppPreferences` by removing the unused `isPriorityEduShown` flow. - Refactored `ThemeRepository` to use a lowercase tag and improved error logging for theme installation and resource loading. - Updated `AppCacheManager` and `WidgetPickerScreen` for better state management and type safety. - **Resources & Localization**: - **Icons**: Added monochrome support to adaptive launcher icons and moved them to the standard `mipmap-anydpi` directory. - **Strings**: - **PT-BR**: Updated widget ID formatting. - **FR**: Simplified application configuration descriptions. - **General**: Added `widget_layout_snapshot` resource. - **Build & System**: - Updated Gradle wrapper from `9.3.1` to `9.4.1`. - Refactored `DeviceUtils` for cleaner system property checks. - Updated `AndroidManifest` with improved package visibility policy ignores. - Cleaned up `ThemeInstallerActivity` by removing redundant SDK version checks for dynamic color schemes. * chore(manifest): add notification listener permission - **Permissions**: - Added `BIND_NOTIFICATION_LISTENER_SERVICE` to `AndroidManifest.xml` to support notification listener capabilities. - Applied `tools:ignore="ProtectedPermissions"` to acknowledge the use of the protected system permission. * fix(service): refine progress notification behavior and navigation state (#157) - **Notification Service & Translators**: - **ProgressTranslator**: - Modified `translate` to accept an `isUpdate` flag. - Restricted "floating" behavior to the initial notification appearance only, preventing subsequent progress updates from re-triggering the float animation. - Refined `BigIslandInfo` layout for finished progress states by simplifying `ImageTextInfoLeft` and `ImageTextInfoRight` parameters (removing redundant text info). - Removed redundant `setIslandFirstFloat` call. - **NotificationReaderService**: Updated `PROGRESS` type handling to pass the `isUpdate` state to the translator. - **UI & Navigation**: - **MainActivity**: Added `isSetupComplete` as a key to `remember` blocks for `initialStartRoute` and `allPossibleTopLevel` to ensure navigation state correctly reacts to setup completion changes. Closes #156 * feat(boot): add support for Direct Boot (#159) - **Boot Receiver**: - Updated `BootReceiver.kt` to handle `ACTION_LOCKED_BOOT_COMPLETED`, allowing the app to respond to boot events before the first user unlock. - Added `android.intent.action.LOCKED_BOOT_COMPLETED` to the `BootReceiver` intent filter in `AndroidManifest.xml`. fixed #158 * chore(localization): update and expand string resources across multiple languages - **Strings & Localization**: - **General**: Added new string resources `behavior_desc_glob_config` (island behavior description) and `widget_layout_snapshot` (widget preview) across all supported locales. - **Spanish (ES)**: Added translations for floating notification timeouts, open source licenses, live updates, and original notification removal. - **French (FR)**: Fully localized several strings including floating notification settings, live updates, onboarding descriptions, and behavior configurations. - **Traditional Chinese (ZH-TW)**: Localized onboarding descriptions for widgets, themes, and customization options. - **Portuguese (PT-BR)**: Simplified the `widget_id_fmt` string from "Widget #%d" to "Widget". - **New Keys**: Added placeholder or translated entries for `setting_float_timeout_desc`, `open_source_licenses`, `live_updates`, and `remove_original_notification` logic in relevant resource files. * chore(changelog): update for version 0.5.0-beta - **UI & Navigation**: - Updated `ChangelogHistoryScreen` to include version `0.5.0` at the top of the history list. - Updated `MainActivity` to display the `0.5.0-beta` changelog in the main `ChangelogSheet`. - **Resources & Localization**: - Added `changelog_0_5_0_beta` string containing release notes for Native Live Updates, HyperOS CN support, new Theme Engine features (HSL selector, behavior controls), and system fixes. - Added `title_0_5_0` string resource ("The Live Update"). * chore: update version metadata to 0.5.0 - **Changelog**: - Updated `ChangelogHistoryScreen` to mark version `0.5.0` as the latest release and downgraded `0.4.2` to historical status. - **Application Versioning**: - Updated the fallback `currentVersionName` in `MainActivity` from `0.4.2` to `0.5.0`. * refactor(service): refine floating behavior for progress notifications (#164) - **Notification Logic**: - Updated `ProgressTranslator` to restrict the floating behavior (`setEnableFloat`) to only the initial appearance of a notification, preventing repeated floats during updates. - Removed the redundant `setIslandFirstFloat` call from the builder. close #163 * Fix/162 bug crash unable to start service with null (#165) * fix(service): handle nullable intent in onStartCommand - **Notification Service**: - Updated `onStartCommand` signature to accept a nullable `Intent` to prevent potential crashes when the service is restarted by the system. - Implemented null-safe checks for `intent.action` when processing test widgets and theme reloads. fixed #162 * feat(service): implement localized error messages for persistent notifications - **Notification Service**: - Updated `NotificationReaderService` to use localized string resources for fallback content text in both standard and widget notifications. - Replaced the hardcoded "Active Island" text with `R.string.notification_went_wrong`. - Replaced the hardcoded "Active" widget text with `R.string.widget_went_wrong`. - **Resources**: - Added `notification_went_wrong` and `widget_went_wrong` string resources to provide clearer feedback when notifications or widgets fail to render correctly. * chore: update changelog string formatting - **Resources**: - Refactored `changelog_0_5_0_beta` in `strings.xml` to use HTML `<b>` tags instead of markdown-style bolding for better compatibility with Android string rendering. - Improved indentation and formatting of the changelog text within the resource file. * chore: bump version to 0.5.0-beta02 and refine changelog trigger logic - **Build**: - Updated `versionCode` to `19` and `versionName` to `0.5.0-beta02` in `app/build.gradle.kts`. - **Navigation & Lifecycle**: - **NavGraph**: Removed redundant `setLastSeenVersion` call during onboarding completion to centralize version tracking. - **MainActivity**: - Refined the changelog display logic to prevent it from appearing immediately after initial onboarding. - Improved `lastSeenVersion` state handling by using a more reliable initial value (`-1`) to ensure version comparisons only trigger after the preference is properly loaded. - Introduced `isInitiallySetup` check to distinguish between fresh installations and application updates. * chore: update localizations and refine progress translation logic - **Localization & Resources**: - **Spanish (ES)**: Translated several core strings, including "Live updates," "Open source licenses," and "Island behavior" descriptions. - **Indonesian (ID)**: Extensively updated translations for UI controls, navigation keywords (arrival, destination), and system permission descriptions. - **Italian (IT)** and **Traditional Chinese (ZH-TW)**: Completed translations for onboarding descriptions and behavior settings. - **General**: Added the `0.5.0-beta` changelog, version title, and error fallback strings (`notification_went_wrong`, `widget_went_wrong`) across all supported languages (ES, HU, IT, ZH-TW, SK, CS, TR, DE, PT, KO, FR, UK, PL, RU, ID). - **Notification Service**: - **ProgressTranslator**: Refactored `setIslandConfig` in the progress update logic to only apply `expandedTimeMs` (float timeout) if the floating notification setting is explicitly enabled, improving consistency with user preferences. * chore(manifest): remove redundant notification listener permission - **Permissions**: - Removed the `BIND_NOTIFICATION_LISTENER_SERVICE` permission from `AndroidManifest.xml`. - Removed the associated `tools:ignore="ProtectedPermissions"` attribute. * Fix WidgetManager initialization and Shizuku implementation Closes #97 Closes #119 Closes #141 Closes #177 * chore(manifest): remove redundant notification listener permission - **Permissions**: - Removed the `BIND_NOTIFICATION_LISTENER_SERVICE` permission from `AndroidManifest.xml`. - Removed the associated `tools:ignore="ProtectedPermissions"` attribute. * chore: bump version to 0.5.0-beta04 and refine Shizuku workaround - **Build**: - Updated `versionCode` to `21` and `versionName` to `0.5.0-beta04` in `app/build.gradle.kts`. - **Shizuku & Notifications**: - **ShizukuManager**: Refactored the `notify` logic to improve the reliability of the XMSF network workaround on MIUI/HyperOS. - Introduced a `Mutex` to prevent race conditions during concurrent notification dispatches. - Added a 50ms delay after disabling XMSF to ensure the network state change takes effect. - Implemented a 1-second delayed restoration of XMSF network, which is reset by subsequent notifications to prevent premature re-enabling. - Added `@RequiresPermission` annotation for `POST_NOTIFICATIONS`. - **Resources & Localization**: - **Changelog**: Updated `changelog_0_5_0_beta` to include information regarding CN Support and the new Shizuku workaround. - **Traditional Chinese (ZH-TW)**: Refined the `enable_autostart` string for better clarity ("開啟後台啟動管理"). * Feature/permanent island (#179) * feat: implement Permanent Island feature and enhance Shizuku notification handling - **Permanent Island**: - Introduced a "Permanent Island" feature that keeps a placeholder Dynamic Island visible when no active notifications are present. - Added `PermanentIslandManager` to coordinate visibility based on the `activeIslands` count within `NotificationReaderService`. - Added `isPermanentIslandEnabledFlow` and `permanentIslandWidthFlow` to `AppPreferences` to persist user configuration. - Implemented `PermanentIslandConfigPage` in the onboarding flow and a dedicated settings screen. Closes #94 - **Shizuku & Notifications**: - **ShizukuManager**: Added a `cancel` function that applies the XMSF network workaround (disabling/enabling XMSF network with a delay) when programmatically removing notifications to ensure consistency on MIUI/HyperOS. - **NotificationReaderService**: Integrated `PermanentIslandManager` to trigger updates whenever notifications are posted or removed. - **Lifecycle & System**: - **BootReceiver**: Added `ACTION_MY_PACKAGE_REPLACED` to the intent filter in `AndroidManifest.xml` and handled it in the receiver to ensure the service restarts correctly after app updates. - **UI & Navigation**: - **GlobalSettingsScreen**: Added an entry point for Permanent Island settings and updated the expressive shape logic to accommodate the additional list item. - **NavGraph**: Defined the route and destination for `PermanentIslandConfig`. - **Previews**: Updated `@Preview` annotations across onboarding components to use `apiLevel = 36`. - **Resources & Localization**: - Added strings for "Permanent Island" titles, descriptions, and width controls in English and Spanish (ES, ES-rEM). - Refined the `shizuku_workaround_title` string for better clarity. * feat: implement Permanent Island feature and configuration UI - **Permanent Island Logic**: - Introduced `PermanentIslandManager` to manage a persistent, "empty" island state when no other active notifications are present. - Implemented logic to automatically show/hide the permanent island based on the current notification count and user preferences. - Utilizes `ShizukuManager` to dispatch a non-dismissible, low-priority notification that uses non-breaking spaces (`\u00A0`) to simulate variable island widths. - **Settings UI**: - Created `PermanentIslandConfigScreen` providing users with a toggle to enable the feature and a slider to adjust the island's width. - Integrated `AppPreferences` flows to reactively update the UI and service state. - **Components**: - Developed `PermanentIslandPreview`, a Compose component that provides a real-time visual mock-up of the island's appearance on a status bar, featuring smooth width animations via `animateDpAsState`. * docs: Add permanent island feature to changelog * chore: Update .gitignore to exclude build artifacts and IDE configs * chore: Update .gitignore to standard Android Jetpack Compose template * chore: initialize project configuration, dependency versions, and ignore rules * feat: introduce dedicated Download notification type and refine progress parsing (#184) - **Notifications & Services**: - **NotificationType**: Added a new `DOWNLOAD` type to separate file transfers from general `PROGRESS` tasks. Close #174 - **NotificationReaderService**: - Integrated `DownloadTranslator` to handle download-specific notification logic. - Implemented `isDownloadNotification` and `hasProgressNotification` to smarter distinguish between types based on package names, channel IDs, and keywords. - Added logic to implicitly enable `DOWNLOAD` if `PROGRESS` is active for a specific app to ensure backward compatibility. - **Translators**: - **BaseTranslator**: Introduced `extractTextPercentage` to parse progress values (e.g., "12%") from notification titles or text. - **ProgressTranslator**: Updated to support text-based percentages and refined indeterminate state handling. - **LiveUpdateTranslator**: Added fallback to text-based percentage parsing for system-native animations. - **CallTranslator**: Switched to `getCharSequence` for retrieving notification titles for better compatibility. - **Data & Migration**: - **AppPreferences**: Implemented a migration routine (`download_type_migration_complete`) that automatically adds the `DOWNLOAD` type to global and app-specific settings if `PROGRESS` was previously enabled. - **UI & Resources**: - **Theme & Onboarding**: - Updated `ThemeSettingsContent` and `OnboardingScreen` to reflect the split between Progress and Downloads. - Updated icons: `HourglassEmpty` for Progress and `CloudDownload` for Downloads. - **Localization**: - Refined strings in English and Spanish to distinguish between "Progress & Tasks" and "Downloads." - **Changelog**: Updated `changelog_0_5_0_beta` with details regarding CN support, the new Download type, text-based progress support, and smart filtering. * feat: implement DownloadTranslator and expand configuration resources - **Translators**: - Introduced `DownloadTranslator` to provide specialized handling for file transfer notifications, separating them from general progress tasks. - Implemented logic in `DownloadTranslator` to handle indeterminate states, percentage-based progress, and completion detection via keywords or 100% threshold. - Added support for custom completion icons ("tick_icon") and automated timeout/dismissible configurations for finished downloads. - **Resources & Localization**: - **Permanent Island**: Added strings for titles, descriptions, and width adjustment controls across multiple locales (ID, FR, TR, CS, IT, UK, DE, ZH-TW, PT-BR, RU, SK, ES, PL, KO, HU). - **Shizuku Workaround**: Added localized strings to guide users through enabling the Shizuku workaround, specifically for improved notification triggering on CN ROMs. - **Do Not Disturb (DND)**: Introduced strings for managing island visibility during DND, including manual pause and auto-detection of system DND status. - **Type Refinement**: Updated `type_progress` and `type_download` strings to clearly distinguish between "Progress & Tasks" (ongoing operations) and "Downloads" (file transfers). - **Changelog**: Updated `changelog_0_5_0_beta` in all languages to detail CN support, native live updates, theme engine improvements (HSL selector), and the new Permanent Island feature. * Feature/sui permission (#185) * feat(shizuku): implement support for Sui permissions and detection * chore(i18n): extract hardcoded onboarding text and add Spanish translations for Shizuku and DND strings * chore(i18n): translate permanent island strings to Spanish * Fix/widget permanent island (#186) * fix(permanent-island): hide permanent island when a widget is active * feat(ui): add shizuku workaround toggle to engine theme page * Feature/better icons (#187) * fix(notifications): tint dark icons, extract messaging avatars, fix update popups * fix(notifications): allow group summaries with text to trigger islands * fix(notifications): completely remove GROUP_ALERT_CHILDREN check for summaries * fix(notifications): ensure sequential execution of cancel and notify to prevent race conditions dropping islands * fix(notifications): use sender_person key for MessagingStyle avatar extraction * chore: bump version to 0.5.0-beta05 and update dependencies - **Build Configuration**: - Updated `versionCode` to 22 and `versionName` to `0.5.0-beta05`. - Updated Kotlin serialization plugin to 2.3.21. - **Dependencies**: - **Kotlin & Serialization**: Updated Kotlin to 2.3.21 and `kotlinxSerializationJson` to 1.11.0. - **Compose**: Updated `composeBom` to 2026.05.01 and Compose UI to 1.11.2. - **Libraries**: - Updated `gson` to 2.14.0. - Updated `nav3` to 1.1.2. --------- Co-authored-by: David Df <abdldaviddom@gmail.com>
D4vidDf
added a commit
that referenced
this pull request
Jun 2, 2026
* Feat/color picker (#127) * feat(theme): implement HSL color picker and enhanced lightness slider - **New `CustomColorBottomSheet`**: Introduced a dedicated HSL (Hue, Saturation, Lightness) color picker with gradient sliders for precise theme color customization. - **Enhanced `ColorsDetailContent`**: - Overhauled the preset tab with an animated lightness slider that appears when a preset is selected. - Improved the preset selection logic to maintain the "base" hue even when adjusting lightness to extreme white or black. - Redesigned the "Custom" colors section to use the new HSL bottom sheet instead of a simple hex text field. - Switched from simple circular bubbles to a more refined UI with selection rings and rounded-square transitions for active colors. - **Improved Theme Creator State**: - Implemented strict state clearing (nulling `currentEditingThemeId`) when exiting the creator to prevent state leakage between editing sessions. - Updated save/apply dialog logic to ensure the UI resets correctly after persistence. - **Shared Components**: Added `GradientSlider` and `ColorBubble` to `HyperOSColorPicker.kt` for reusable, stylized color selection components. - **Localization**: Added missing string resources for color labels (Hue, Saturation, Lightness) in English and Spanish. * #### feat(theme): implement advanced color modes and redesigned color picker - **Color Modes**: Introduced a `ColorMode` system (`CUSTOM`, `APP_ICON`, `MATERIAL_YOU`) to replace the binary "Use App Colors" toggle. This allows themes to dynamically adapt to Material You system colors or extract colors from app icons globally and per-app. - **Improved Color Picker**: Replaced standard text fields with a new `CustomColorBottomSheet` in the Call Style and Theme Creator screens, featuring a visual HSL-based selection and hex formatting. - **UI & UX Refinement**: - Redesigned `ColorsDetailContent` with a scrollable layout and new sections for dynamic color modes. - Updated the Theme Creator preview to correctly reflect the active color mode. - Standardized "My Theme" and "Share Theme" strings to use localized resources. - **Data Persistence**: Updated `HyperTheme`, `GlobalConfig`, and `AppThemeOverride` models to support the new `ColorMode` enum while maintaining backward compatibility with legacy themes. - **Theme Creator**: Refactored `ThemeViewModel` to handle more robust state initialization and migration when editing or creating new themes. - **Tooling**: Added Crowdin configuration settings for the IDE. * feat(widget): add favorites, recommended filtering, and update notice (#128) - **Widget Picker**: - Implemented a "Recommended" filter to highlight 1x4 and 2x4 layouts compatible with the Island size. - Added a Favorite system for widget apps, allowing users to star apps for top-level sorting. - Added a floating navigation bar to switch between Recommended and All widgets. - Improved dimension display by converting DP to grid cell proportions (e.g., 4x2). - **Saved Widgets**: - Added a persistent "Update Notice" dialog to remind users to check Autostart/Battery permissions after an app update. - Implemented a "Kill Active Widgets" action to instantly dismiss all running widget overlays. - Redesigned the UI with a centered filter toolbar (Favorites vs. All) and a dedicated Add FAB. - Added reactive listening for newly added widgets to ensure the list updates immediately. - **Service & Data**: - Enhanced `WidgetOverlayService` with specific `ACTION_KILL_WIDGET` and `ACTION_KILL_ALL_WIDGETS` handlers for immediate UI cleanup. - Added `favoriteWidgetAppsFlow` to `AppPreferences` to persist starred widget providers. - **Localization**: - Added English and Spanish strings for filters, permission reminders, and widget management. CLOSE #72 * feat(service): implement Native Android 16 Live Updates support - Added `LiveUpdateTranslator` to transform standard notifications into native Android 16 promoted ongoing tasks using `android.requestPromotedOngoing` and `android.shortCriticalText`. - Implemented a toggle in Global Settings to choose between custom Xiaomi Islands and native Android 16 Live Updates. - Created a dedicated `hyper_bridge_live_update_channel` for native updates to manage notifications and visibility independently. - Added `POST_PROMOTED_NOTIFICATIONS` permission to `AndroidManifest.xml` to support Android 16's promoted notification features. - Enhanced `LiveUpdateTranslator` with a `generateCriticalShortText` helper to dynamically extract progress percentages or ETAs for the system status chip. - Fixed Android 16 category filtering by forcing Live Updates into strictly valid categories (`PROGRESS` or `TRANSPORT`) to prevent OS blocking. - Ensured original notification timestamps are preserved for accurate system-wide "time active" calculations. - Updated `NotificationReaderService` to support hot-swapping between custom injection and native updates via shared preferences. * feat(service): enhance Live Update processing and Android 16 compatibility - **NotificationReaderService**: Implemented a more robust content hashing algorithm that tracks Title, Text, Progress (max, current, indeterminate), and Button Action states (e.g., Play to Pause transitions) to ensure accurate UI updates. - **LiveUpdateTranslator**: - Added support for large icons and picture extras in live updates. - Improved media notification handling by suppressing progress bars that often persist in the background. - Optimized category mapping (Progress vs. Transport) to comply with Android 16 ongoing promotion requirements. - Updated `shortCriticalText` generation logic to prioritize media titles, percentages, or time ETAs for the Dynamic Island chip. - Switched to native Android 16 APIs for promoted ongoing requests and short critical text injection. * feat(settings): refactor Global Settings UI and update version - Updated `versionName` to `0.5.0-alpha01`. - Redesigned `GlobalSettingsScreen` to use consistent card-based layouts for all settings items. - Replaced the "Native Live Updates" `ListItem` with a new standardized `SettingsSwitchItem` component. - Improved UI spacing and styling across the settings screen, including unified icon background treatments. - Simplified state management and click behavior for toggleable settings. * Update changelog resource to v0.4.2 * build: update project dependencies and gradle configuration (#134) - **Gradle & AGP**: - Upgraded Android Gradle Plugin (AGP) from `8.13.2` to `9.1.0`. - Upgraded Gradle wrapper from `8.13` to `9.3.1`. - Added `foojay-resolver-convention` plugin to `settings.gradle.kts` for automated toolchain management. - **Dependencies**: - Updated Kotlin to `2.3.20` and KSP to `2.3.2`. - Updated Compose BOM to `2026.03.00` and Material3 to `1.5.0-alpha15`. - Updated various AndroidX libraries: `core-ktx` (`1.18.0`), `datastore-preferences` (`1.2.1`), `activity-compose` (`1.13.0`), and `ui` (`1.10.5`). - Bumped `kotlinx-serialization-json` to `1.10.0`. - **Build Configuration**: - Removed `kotlin-android` plugin in favor of `kotlin-compose` and built-in Kotlin support. - Removed explicit `jvmTarget` configuration in `app/build.gradle.kts`. - Enabled several experimental/new Android Gradle properties in `gradle.properties`, including `android.builtInKotlin` and `android.newDsl`. - **Optimization**: - Updated `proguard-rules.pro` to strip Debug and Info logs in release builds using AGP 9.1+ syntax. * Feature/ux iprovement global configuration (#137) * feat(settings): redesign Global Settings and enhance Theme Engine - **Global Settings UI**: - Refactored `GlobalSettingsScreen` to use a card-based list layout with standardized `ListOptionCard` components. - Split settings into dedicated screens: `EngineSettingsScreen`, `IslandSettingsScreen`, and `NavCustomizationScreen`. - Added an "Engine" section to toggle between "Xiaomi Featured Design" and "Native Android Live Updates". - Implemented a more granular "Island Behavior" configuration including an improved auto-hide timeout slider with snap points (1s to 1h). - **Theme Engine**: - Integrated "Engine", "Island Behavior", and "Notification Types" selection directly into the Theme Creator flow. - Added a real-time `EnginePreview` component to visualize differences between Xiaomi and Native Live Update designs. - Added a "Notification Types" manager to toggle triggers for Standard, Progress, Media, Navigation, Call, and Timer events. - **Functionality & Fixes**: - **Crash Fix**: Resolved a critical issue causing the app to crash when opening settings in Traditional Chinese. - Updated `AppPreferences` to support persistent storage for the native notification engine toggle. - Improved `ThemeViewModel` with a more efficient bitmap scaling method for theme thumbnails. - Updated `StandardTranslator`, `NavTranslator`, and `ProgressTranslator` to better respect global timeout and dismissal configurations. - Set the default notification shade visibility to `false` for a cleaner "Island-only" experience by default. - **Localization**: - Added extensive string resources for version 0.4.2 hotfix and new engine settings across multiple languages (SK, PL, RU, ZH-TW, TR, UK, PT-BR, CS, DE, HU, IN, IT, KO, ES). - Fixed several translation issues in Traditional Chinese and Spanish. * feat(settings): externalize and localize auto-hide island strings - **UI**: Refactored `IslandSettingsControl.kt` to use `stringResource` instead of hardcoded strings for the Auto-hide Island feature. - **Localization**: - Added new string resources (`auto_hide_island`, `hides_after_a_set_time`, `behavior_hide_desc`, `behavior_desc_hide_long`) to multiple locales: Slovak, Polish, Russian, Traditional Chinese, Turkish, Ukrainian, Portuguese (Brazil), Czech, German, Indonesian, Italian, Korean, Spanish, and Hungarian. - Updated Spanish translations for behavior and trigger settings. - Standardized ellipsis usage from `…` to `...` in Portuguese (Brazil) and Korean `strings.xml`. * build: update version and remove redundant material3 dependency - Updated `versionName` to `0.5.0-alpha02`. - Removed explicit `androidx-material3` dependency from `libs.versions.toml` and `app/build.gradle.kts` (now managed via Compose BOM). * feat(localization): add French (France) translation - Added complete French localization (`strings.xml`) for the entire application. - Translated all core UI components, including onboarding, settings, library, and about screens. - Localized complex features such as the Theme Engine, Backup & Restore, and the new Notification Engine settings. - Provided French translations for all historical changelogs (v0.1.0 through v0.4.2). - Included localized string arrays for specific notification keyword matching (navigation, calls, and progress updates). * feat(theme): implement layered app-specific behavior overrides - **Notification Service**: - Implemented a layered resolution system (Theme > App > Global) for notification triggers and engine selection. - Updated `NotificationReaderService` to respect theme-managed app configurations and simplified processing logic. - Enhanced `LiveUpdateTranslator` to support themed colors and icons for the Native Live Update engine, specifically for navigation events. - Improved title and text resolution with smarter fallback mechanisms and content hashing for updates. - **Theme Engine & Editor**: - Added app-specific behavior overrides to the Theme Creator, allowing per-app configuration of notification types and engine selection (Xiaomi vs. Native). - Integrated "Engine", "Island Behavior", and "Notification Types" into the App Theme Editor. - Added `AppNotificationTypesEditor` for granular control over which event types (Standard, Media, Nav, etc.) trigger the island for specific apps. - Refactored `EngineThemeContent` to support an optional "Use Global Default" state. - **UI & Settings**: - Redesigned the "Notification Types" settings using `SettingsToggleCard` for a more consistent card-based look. - Added a theme-managed warning to the App Settings dialog when behaviors are controlled by an active theme. - Externalized and localized several strings related to triggers and engine management. - Added French language support to the locale selector. - **Technical Improvements**: - Introduced `ConfigResolver` for fast, in-memory resolution of effective configurations for translators. - Updated `AppPreferences` and `ThemeRepository` to support persistent storage of per-app engine and trigger overrides. - Standardized navigation layout resolution to respect layered preferences (Global Fallback vs. App-Specific). * feat(localization): add trigger configuration and override strings - **Localization**: Added new string resources for "Active Triggers", "Trigger Override", and "Notification Engine" configuration across multiple locales (SK, PL, RU, FR, ZH-TW, TR, UK, PT-BR, CS, DE, IN, IT, KO, HU). - **Strings**: - Added descriptions for notification types: Standard, Progress, Media, Navigation, Call, and Timer. - Added UI strings for global trigger settings and per-app overrides. - Added `managed_by_theme_desc` and `use_global_default_engine` to support theme-based behavior logic. - **Cleanup**: Removed unused mock engine strings (`engine_mock_charging`, `engine_mock_percentage`, etc.) from all translated `strings.xml` files. * feat(theme): enhance engine resolution and theme-persistent configuration (#147) - **Notification Service**: - Refactored `getEffectiveEngine` in `NotificationReaderService` to implement a 4-tier resolution priority: Theme App Override > User App Override > Theme Global Override > User Global Fallback. - **Theme Engine & Editor**: - **Global Settings**: Added `use_native_live_updates` to `GlobalConfig` model, allowing themes to define a default engine for all apps. - **Persistence**: Fixed an issue where changing the engine via the UI while a custom theme was active would not persist; it now correctly patches the active Theme JSON. - **Theme Creator**: - Updated `ThemeViewModel` to correctly load and save the global engine selection to the Theme JSON. - Fixed a bug where existing call configurations were wiped when updating app-specific live update settings. - Improved state management by making `themeUseNativeLiveUpdates` nullable to support inheritance. - **UI & Settings**: - **Engine Settings**: Refactored `EngineSettingsScreen` to use `AppPreferences` and `ThemeRepository` instead of raw `SharedPreferences`. - Integrated real-time engine updates by sending `ACTION_RELOAD_THEME` to the background service upon configuration changes. - Standardized UI spacing and typography in the Engine selection screen. - **Bug Fixes**: - Fixed a bug in `AppListViewModel` where app-specific engine overrides were not being saved to the active theme if the override didn't already exist. - Corrected `@StringRes` annotation usage in `ShapeOption` enum. * build: update version to 0.5.0-alpha03 and update localizations - **Build**: Bumped `versionCode` to `17` and `versionName` to `0.5.0-alpha03` in `app/build.gradle.kts`. - **Localization**: - **French (FR)**: Completed translations for the "Engine" configuration, "Island Behavior", and "Active Triggers" sections. Updated backup and app configuration strings. - **Italian (IT)**: Translated the v0.4.2 changelog, engine settings, color labels, and navigation arrival keywords. - **Traditional Chinese (ZH-TW)**: Fully localized the new Engine, Behavior, and Trigger settings. Refined onboarding and permission strings (e.g., "HyperIsland" to "超級島"). - **Hungarian (HU)**: Localized engine settings, behavior controls, trigger descriptions, and the v0.4.2 hotfix changelog. Updated call-related keywords. - **Portuguese (Brazil)**: Translated the v0.4.2 changelog, color labels, and UI state strings (Recommended, Favorites, All). Updated navigation arrival keywords. - **Strings**: Standardized engine configuration keys across all modified locales to support the transition between "Xiaomi Featured Design" and "Native Android Live Updates". * loc(fr): fix apostrophe escaping in French strings - Updated `island_behavior_desc` and `engine_timeouts_triggers` in the French (`fr-rFR`) `strings.xml` to properly escape apostrophes, ensuring correct XML parsing and display. * Feature/nav3 migration (#152) * build: integrate Navigation 3 and refactor app routing - **Dependencies**: Added `androidx.navigation3` (runtime and UI) and `androidx-lifecycle-viewmodel-navigation3` to `libs.versions.toml` and `app/build.gradle.kts`. - **Navigation Framework**: - Introduced `NavigationState` to manage persistent back stacks for top-level routes (Onboarding and Home). - Implemented a `Navigator` class to abstract forward and backward navigation logic using Navigation 3 APIs. - Replaced the manual `Screen` enum and `AnimatedContent` router with a `@Serializable` sealed interface and `NavDisplay`. - **Routing & State**: - Refactored `MainActivity` to use `entryProvider` for screen definitions, simplifying navigation calls across the app. - Updated screen transitions to leverage `NavDisplay`'s built-in handling of the back gesture and entry management. - Improved data passing between screens (e.g., `ImportPreview` and `NavCustomization`) by using type-safe classes in the `Screen` sealed interface. - **Models**: Added `@Serializable` annotations to backup-related models (`HyperBridgeBackup`, `BackupMetadata`, `AppSettingBackup`) to support type-safe navigation arguments. - **UI**: Standardized back-button behavior across all settings and configuration screens to use the new `Navigator.goBack()` method. * refactor(navigation): modularize and relocate navigation logic - **Navigation Architecture**: - Created a new `com.d4viddf.hyperbridge.ui.navigation` package to house navigation-related components. - Moved `Screen` definition from `MainActivity.kt` to its own file `Screen.kt`, maintaining `@Serializable` support for all application routes. - Relocated `NavigationState.kt` and `Navigator.kt` to the new navigation package and updated their package declarations accordingly. - **MainActivity**: - Cleaned up imports and removed inline `Screen` interface definition to use the new modularized navigation components. - Updated references to use `toEntries` and other navigation extension functions from the new package. * refactor(navigation): modularize nav graph and enhance back press handling - **Navigation**: - Extracted the main navigation graph from `MainActivity.kt` into a new standalone `mainNavGraph` function in `NavGraph.kt` to improve maintainability. - Updated `Navigator.goBack()` to return a boolean indicating if the back event was handled, allowing for better control over app exit logic. - Integrated `BackHandler` in `MainActivity` to properly handle system back gestures and call `onExit` when at the root of the navigation stack. - **MainActivity**: - Refactored `MainRootNavigation` into smaller, more focused composables (`MainRootNavigation` and `MainNavigationContent`). - Improved the initialization flow to show a `CircularProgressIndicator` while the setup status is being loaded from preferences. - Simplified the logic for switching between `Onboarding` and `Home` routes based on the setup completion state. - **UI**: Standardized back navigation behavior across all screens, ensuring consistent exit behavior from the `Info` screen. * feat(ui): implement custom navigation transitions and predictive back support - **Navigation**: - Added custom `transitionSpec` and `popTransitionSpec` using horizontal slides and fades for smoother screen transitions. - Implemented `predictivePopTransitionSpec` to support Android's predictive back gesture with scaling and transform origin adjustments based on swipe edge. - Dynamically updated `topLevelRoutes` to prevent navigating back to the onboarding flow once setup is complete. - **UI**: - Applied a rounded corner clip (32.dp) to the main `NavDisplay` container. - Optimized transition durations to 400ms for a more fluid user experience. * chore: code cleanup, dependency update, and UI refinements - **UI & UX**: - **Widget Picker**: Refactored `WidgetPickerScreen` and removed `WidgetPickerViewModel.kt` to streamline widget selection logic. Updated layout filtering to consistently use `targetCellWidth` and `targetCellHeight`. - **Theme Creator**: Improved navigation and state management in `ThemeCreatorScreen` and `AppThemeEditorScreen`. Enhanced UI consistency for color and icon selection previews. - **Licenses**: Updated `LicensesScreen` to dynamically load a sorted list of open-source libraries and externalized the screen title string. - **Components**: Standardized `EmptyState` component parameters and improved layout logic in `WidgetConfigScreen` and `SavedAppWidgetsScreen`. - **Localization**: - Added `open_source_licenses` string resource. - Refactored `WidgetConfigScreen` to use localized toast and error messages. - **Translators**: - **Standard**: Cleaned up title resolution logic in `StandardTranslator`. - **Progress**: Updated `ProgressTranslator` to hide redundant percentage text in specific circular progress views. - **Internal Improvements**: - **Compatibility**: Removed redundant SDK version checks for `Parcelable` handling and notification permissions, favoring modern Android APIs. - **Utilities**: Switched to `androidx.core` extension functions for `Bitmap` creation and `Uri` parsing. - **Persistence**: Updated `SavedAppWidgetsScreen` to use the `edit { }` DSL for `SharedPreferences`. - **Data**: Refined theme ID generation in `ThemeRepository` and improved rule engine comments. - **Bug Fixes**: - Fixed a potential nullability issue in `AppListViewModel` when patching theme configurations. - Corrected `IslandConfig` initialization in the App Settings dialog. * Feature/duplication toggle (#153) * feat(settings): enhance island behavior with heads-up timeout and notification management - **Island Configuration**: - Introduced `floatTimeout` to `IslandConfig` to control the duration of heads-up popups. - Added `removeOriginalNotification` toggle to allow automatic dismissal of source notifications when a Live Update is active. - Updated `AppPreferences` and `AppSettings` to support persistent storage for these new global and per-app settings. - **UI & Settings**: - **Island Settings**: Redesigned the "Heads-up Popup" configuration with an animated slider for granular timeout control (1s to 30s). - **Live Updates**: Added a new section in `IslandSettingsControl` to manage the removal of original notifications. - Improved UI scrollability in `IslandSettingsScreen` and added several Compose previews for better development feedback. - Refactored toggle logic to ensure consistency between heads-up and timeout states. - **Translators**: - Updated all translators (`Media`, `Call`, `Progress`, `Standard`, `Nav`, `Timer`) to respect the new `expandedTimeMs` (heads-up timeout) configuration. - Cleaned up redundant theme color application logic in `TimerTranslator`. - **Localization**: - Added string resources for "Live updates", "Remove original notification", and "Heads-up popup" timeout descriptions. * feat(service): implement notification timeout and original notification removal - **Notification Service**: - Introduced a `handlePostNotificationSideEffects` method to manage post-processing logic for translated notifications. - Added support for automatically cancelling the original system notification when `removeOriginalNotification` is enabled in the configuration (excluding Media notifications). fixes #21, fixes #120, fixes #146 - Implemented a timeout mechanism using coroutines to automatically dismiss translated notifications after a configured duration. - Added `intentionallyRemovedKeys` tracking to prevent recursive processing loops when the service cancels a system notification. - Improved cleanup logic in `onNotificationRemoved` and `cleanupCache` to ensure associated timeout jobs are cancelled and resources are freed. - **Bug Fixes**: - Added missing cancellation of existing processing jobs and timeout jobs when a notification is removed or updated. - **Logic Improvements**: - Improved design logic for new notification parameters ( closes #99) and add theme configuration ( closes #107) * fix(service): refine notification timeout logic and dismissal behavior - **Notification Service**: - Modified `onStartCommand` to use non-nullable `Intent` parameters for better type safety. - Updated notification removal logic to ensure the source notification is no longer canceled when the Island notification is dismissed or times out. - Refactored `handlePostNotificationSideEffects` to only apply timeout scheduling to "Live Update" notifications. - Improved cache cleanup and logging during notification dismissal to prevent unintended side effects on source notifications. * Feature/onboarding screen (#155) * feat(ui): redesign onboarding flow and expand configuration options - **Onboarding Experience**: - Significantly expanded the onboarding process from 7 to 11 pages, incorporating new configuration steps for triggers, engine selection, and island behavior. - Redesigned the `OnboardingScreen` layout with improved navigation controls, including a dedicated "Back" button and a more prominent "Get Started" entry point. - Added several new pages: `TriggersConfigPage` (active notification types), `PriorityEducationPage` (island limit behavior), `BehaviorConfigPage` (notification removal and shade visibility), `CustomizationPage` (themes and widgets), and `EngineConfigPage` (Xiaomi vs. Native Live Updates). - Integrated `ModalBottomSheet` for granular settings configuration directly within the onboarding flow. - Added extensive Compose previews for all onboarding pages to improve development feedback. - **Data & Logic**: - **AppPreferences**: Implemented a migration check to force an onboarding reset for users upgrading to version 0.5.0 (versionCode 17). - **MainActivity**: Removed the standalone `PriorityEducationDialog` as its logic is now integrated into the onboarding flow. - **Build Configuration**: Enabled `buildConfig` in `app/build.gradle.kts` and updated the Kotlin serialization plugin version. - **Localization & Resources**: - **Strings**: - Standardized and updated terminology across multiple languages (ES, HU, IT, ZH-TW, SK, CS, TR, DE, PT, KO, FR, UK, RU, ID). - Added new string resources for the expanded onboarding descriptions, "Live updates" management, and "Remove original notification" toggles. - Refined French strings to ensure proper apostrophe escaping and formatting. - Simplified and updated battery optimization instructions ("Allow Autostart", "Disable Restrictions"). - **Icons**: Switched to modern Rounded/Filled icon variants for a more consistent visual style across the setup pages. * feat(onboarding): implement auto-hide configuration page - **Onboarding Flow**: - Expanded the onboarding process from 11 to 13 pages to include more granular behavior settings. - Introduced a dedicated `AutoHideConfigPage` to manage island timeout settings during initial setup. - Updated `BehaviorConfigPage` description to reflect its role in global configuration. - **UI & Components**: - Added an interactive "Auto-hide Island" section with a `Switch` and an `AnimatedVisibility` slider for timeout selection. - Exposed `timeoutSteps` and `formatSeconds` from `IslandSettingsControl.kt` to be reusable across the onboarding flow. - Integrated `Icons.Rounded.Timer` and `Icons.Default.AccessTime` for improved visual cues in behavior settings. - **State Management**: - Updated `OnboardingScreen` to persist `IslandConfig` timeout and `isFloat` preferences directly through `AppPreferences`. - **Localization**: - Added `behavior_desc_glob_config` string resource for better description of island behavior settings. * chore: bump version to 0.5.0-beta01 and refine onboarding navigation - **Build**: - Updated `versionCode` to `18` and `versionName` to `0.5.0-beta01` in `app/build.gradle.kts`. - **Navigation**: - **Navigator**: Introduced `finishOnboarding` to explicitly handle the transition from onboarding to the home screen by ensuring the home stack is initialized before clearing the onboarding route, preventing potential app closure. - **MainActivity**: Refactored `navigationState` initialization to use a persistent set of all possible top-level routes and a fixed initial start route. - **NavGraph**: Updated setup completion logic to use the new `navigator.finishOnboarding` method and removed redundant priority education flags. - **Onboarding**: - Refactored `OnboardingScreen` to dynamically determine the last page using `pagerState.pageCount` instead of a hardcoded index. - **Data & Persistence**: - **AppPreferences**: Updated the onboarding reset logic to target `versionCode 18` for version 0.5.0, forcing a setup reset for users on older builds. * chore: general cleanup, bug fixes, and maintenance - **UI & Components**: - Removed several legacy dialogs and components: `ChangelogDialog`, `PriorityEducationDialog`, and `DeviceCompatibility`. - Simplified `CommonCards.kt` by removing `ExpandableOptimizationCard` and localized logic. - Refactored `HyperOSColorPicker` to remove unused `ColorBubble` component. - Added `verticalScroll` to `ThemeSettingsContent` to improve navigation on smaller screens. - Updated `IslandSettingsControl` and `IslandSettingsScreen` to use explicit `IslandConfig` initialization. - Added a content description for the widget snapshot layout. - **Notification Service & Logic**: - Refactored `NotificationReaderService` and `LiveUpdateTranslator` to improve string handling and reliability when resolving notification titles/text. - Enhanced exception handling across the service and data layers using suppressed exceptions (`catch (_: Exception)`) to reduce log noise. - Improved app label caching and package filtering logic. - **Data & Persistence**: - Cleaned up `AppPreferences` by removing the unused `isPriorityEduShown` flow. - Refactored `ThemeRepository` to use a lowercase tag and improved error logging for theme installation and resource loading. - Updated `AppCacheManager` and `WidgetPickerScreen` for better state management and type safety. - **Resources & Localization**: - **Icons**: Added monochrome support to adaptive launcher icons and moved them to the standard `mipmap-anydpi` directory. - **Strings**: - **PT-BR**: Updated widget ID formatting. - **FR**: Simplified application configuration descriptions. - **General**: Added `widget_layout_snapshot` resource. - **Build & System**: - Updated Gradle wrapper from `9.3.1` to `9.4.1`. - Refactored `DeviceUtils` for cleaner system property checks. - Updated `AndroidManifest` with improved package visibility policy ignores. - Cleaned up `ThemeInstallerActivity` by removing redundant SDK version checks for dynamic color schemes. * chore(manifest): add notification listener permission - **Permissions**: - Added `BIND_NOTIFICATION_LISTENER_SERVICE` to `AndroidManifest.xml` to support notification listener capabilities. - Applied `tools:ignore="ProtectedPermissions"` to acknowledge the use of the protected system permission. * fix(service): refine progress notification behavior and navigation state (#157) - **Notification Service & Translators**: - **ProgressTranslator**: - Modified `translate` to accept an `isUpdate` flag. - Restricted "floating" behavior to the initial notification appearance only, preventing subsequent progress updates from re-triggering the float animation. - Refined `BigIslandInfo` layout for finished progress states by simplifying `ImageTextInfoLeft` and `ImageTextInfoRight` parameters (removing redundant text info). - Removed redundant `setIslandFirstFloat` call. - **NotificationReaderService**: Updated `PROGRESS` type handling to pass the `isUpdate` state to the translator. - **UI & Navigation**: - **MainActivity**: Added `isSetupComplete` as a key to `remember` blocks for `initialStartRoute` and `allPossibleTopLevel` to ensure navigation state correctly reacts to setup completion changes. Closes #156 * feat(boot): add support for Direct Boot (#159) - **Boot Receiver**: - Updated `BootReceiver.kt` to handle `ACTION_LOCKED_BOOT_COMPLETED`, allowing the app to respond to boot events before the first user unlock. - Added `android.intent.action.LOCKED_BOOT_COMPLETED` to the `BootReceiver` intent filter in `AndroidManifest.xml`. fixed #158 * chore(localization): update and expand string resources across multiple languages - **Strings & Localization**: - **General**: Added new string resources `behavior_desc_glob_config` (island behavior description) and `widget_layout_snapshot` (widget preview) across all supported locales. - **Spanish (ES)**: Added translations for floating notification timeouts, open source licenses, live updates, and original notification removal. - **French (FR)**: Fully localized several strings including floating notification settings, live updates, onboarding descriptions, and behavior configurations. - **Traditional Chinese (ZH-TW)**: Localized onboarding descriptions for widgets, themes, and customization options. - **Portuguese (PT-BR)**: Simplified the `widget_id_fmt` string from "Widget #%d" to "Widget". - **New Keys**: Added placeholder or translated entries for `setting_float_timeout_desc`, `open_source_licenses`, `live_updates`, and `remove_original_notification` logic in relevant resource files. * chore(changelog): update for version 0.5.0-beta - **UI & Navigation**: - Updated `ChangelogHistoryScreen` to include version `0.5.0` at the top of the history list. - Updated `MainActivity` to display the `0.5.0-beta` changelog in the main `ChangelogSheet`. - **Resources & Localization**: - Added `changelog_0_5_0_beta` string containing release notes for Native Live Updates, HyperOS CN support, new Theme Engine features (HSL selector, behavior controls), and system fixes. - Added `title_0_5_0` string resource ("The Live Update"). * chore: update version metadata to 0.5.0 - **Changelog**: - Updated `ChangelogHistoryScreen` to mark version `0.5.0` as the latest release and downgraded `0.4.2` to historical status. - **Application Versioning**: - Updated the fallback `currentVersionName` in `MainActivity` from `0.4.2` to `0.5.0`. * refactor(service): refine floating behavior for progress notifications (#164) - **Notification Logic**: - Updated `ProgressTranslator` to restrict the floating behavior (`setEnableFloat`) to only the initial appearance of a notification, preventing repeated floats during updates. - Removed the redundant `setIslandFirstFloat` call from the builder. close #163 * Fix/162 bug crash unable to start service with null (#165) * fix(service): handle nullable intent in onStartCommand - **Notification Service**: - Updated `onStartCommand` signature to accept a nullable `Intent` to prevent potential crashes when the service is restarted by the system. - Implemented null-safe checks for `intent.action` when processing test widgets and theme reloads. fixed #162 * feat(service): implement localized error messages for persistent notifications - **Notification Service**: - Updated `NotificationReaderService` to use localized string resources for fallback content text in both standard and widget notifications. - Replaced the hardcoded "Active Island" text with `R.string.notification_went_wrong`. - Replaced the hardcoded "Active" widget text with `R.string.widget_went_wrong`. - **Resources**: - Added `notification_went_wrong` and `widget_went_wrong` string resources to provide clearer feedback when notifications or widgets fail to render correctly. * chore: update changelog string formatting - **Resources**: - Refactored `changelog_0_5_0_beta` in `strings.xml` to use HTML `<b>` tags instead of markdown-style bolding for better compatibility with Android string rendering. - Improved indentation and formatting of the changelog text within the resource file. * chore: bump version to 0.5.0-beta02 and refine changelog trigger logic - **Build**: - Updated `versionCode` to `19` and `versionName` to `0.5.0-beta02` in `app/build.gradle.kts`. - **Navigation & Lifecycle**: - **NavGraph**: Removed redundant `setLastSeenVersion` call during onboarding completion to centralize version tracking. - **MainActivity**: - Refined the changelog display logic to prevent it from appearing immediately after initial onboarding. - Improved `lastSeenVersion` state handling by using a more reliable initial value (`-1`) to ensure version comparisons only trigger after the preference is properly loaded. - Introduced `isInitiallySetup` check to distinguish between fresh installations and application updates. * chore: update localizations and refine progress translation logic - **Localization & Resources**: - **Spanish (ES)**: Translated several core strings, including "Live updates," "Open source licenses," and "Island behavior" descriptions. - **Indonesian (ID)**: Extensively updated translations for UI controls, navigation keywords (arrival, destination), and system permission descriptions. - **Italian (IT)** and **Traditional Chinese (ZH-TW)**: Completed translations for onboarding descriptions and behavior settings. - **General**: Added the `0.5.0-beta` changelog, version title, and error fallback strings (`notification_went_wrong`, `widget_went_wrong`) across all supported languages (ES, HU, IT, ZH-TW, SK, CS, TR, DE, PT, KO, FR, UK, PL, RU, ID). - **Notification Service**: - **ProgressTranslator**: Refactored `setIslandConfig` in the progress update logic to only apply `expandedTimeMs` (float timeout) if the floating notification setting is explicitly enabled, improving consistency with user preferences. * chore(manifest): remove redundant notification listener permission - **Permissions**: - Removed the `BIND_NOTIFICATION_LISTENER_SERVICE` permission from `AndroidManifest.xml`. - Removed the associated `tools:ignore="ProtectedPermissions"` attribute. * Fix WidgetManager initialization and Shizuku implementation Closes #97 Closes #119 Closes #141 Closes #177 * chore(manifest): remove redundant notification listener permission - **Permissions**: - Removed the `BIND_NOTIFICATION_LISTENER_SERVICE` permission from `AndroidManifest.xml`. - Removed the associated `tools:ignore="ProtectedPermissions"` attribute. * chore: bump version to 0.5.0-beta04 and refine Shizuku workaround - **Build**: - Updated `versionCode` to `21` and `versionName` to `0.5.0-beta04` in `app/build.gradle.kts`. - **Shizuku & Notifications**: - **ShizukuManager**: Refactored the `notify` logic to improve the reliability of the XMSF network workaround on MIUI/HyperOS. - Introduced a `Mutex` to prevent race conditions during concurrent notification dispatches. - Added a 50ms delay after disabling XMSF to ensure the network state change takes effect. - Implemented a 1-second delayed restoration of XMSF network, which is reset by subsequent notifications to prevent premature re-enabling. - Added `@RequiresPermission` annotation for `POST_NOTIFICATIONS`. - **Resources & Localization**: - **Changelog**: Updated `changelog_0_5_0_beta` to include information regarding CN Support and the new Shizuku workaround. - **Traditional Chinese (ZH-TW)**: Refined the `enable_autostart` string for better clarity ("開啟後台啟動管理"). * Feature/permanent island (#179) * feat: implement Permanent Island feature and enhance Shizuku notification handling - **Permanent Island**: - Introduced a "Permanent Island" feature that keeps a placeholder Dynamic Island visible when no active notifications are present. - Added `PermanentIslandManager` to coordinate visibility based on the `activeIslands` count within `NotificationReaderService`. - Added `isPermanentIslandEnabledFlow` and `permanentIslandWidthFlow` to `AppPreferences` to persist user configuration. - Implemented `PermanentIslandConfigPage` in the onboarding flow and a dedicated settings screen. Closes #94 - **Shizuku & Notifications**: - **ShizukuManager**: Added a `cancel` function that applies the XMSF network workaround (disabling/enabling XMSF network with a delay) when programmatically removing notifications to ensure consistency on MIUI/HyperOS. - **NotificationReaderService**: Integrated `PermanentIslandManager` to trigger updates whenever notifications are posted or removed. - **Lifecycle & System**: - **BootReceiver**: Added `ACTION_MY_PACKAGE_REPLACED` to the intent filter in `AndroidManifest.xml` and handled it in the receiver to ensure the service restarts correctly after app updates. - **UI & Navigation**: - **GlobalSettingsScreen**: Added an entry point for Permanent Island settings and updated the expressive shape logic to accommodate the additional list item. - **NavGraph**: Defined the route and destination for `PermanentIslandConfig`. - **Previews**: Updated `@Preview` annotations across onboarding components to use `apiLevel = 36`. - **Resources & Localization**: - Added strings for "Permanent Island" titles, descriptions, and width controls in English and Spanish (ES, ES-rEM). - Refined the `shizuku_workaround_title` string for better clarity. * feat: implement Permanent Island feature and configuration UI - **Permanent Island Logic**: - Introduced `PermanentIslandManager` to manage a persistent, "empty" island state when no other active notifications are present. - Implemented logic to automatically show/hide the permanent island based on the current notification count and user preferences. - Utilizes `ShizukuManager` to dispatch a non-dismissible, low-priority notification that uses non-breaking spaces (`\u00A0`) to simulate variable island widths. - **Settings UI**: - Created `PermanentIslandConfigScreen` providing users with a toggle to enable the feature and a slider to adjust the island's width. - Integrated `AppPreferences` flows to reactively update the UI and service state. - **Components**: - Developed `PermanentIslandPreview`, a Compose component that provides a real-time visual mock-up of the island's appearance on a status bar, featuring smooth width animations via `animateDpAsState`. * docs: Add permanent island feature to changelog * chore: Update .gitignore to exclude build artifacts and IDE configs * chore: Update .gitignore to standard Android Jetpack Compose template * chore: initialize project configuration, dependency versions, and ignore rules * feat: introduce dedicated Download notification type and refine progress parsing (#184) - **Notifications & Services**: - **NotificationType**: Added a new `DOWNLOAD` type to separate file transfers from general `PROGRESS` tasks. Close #174 - **NotificationReaderService**: - Integrated `DownloadTranslator` to handle download-specific notification logic. - Implemented `isDownloadNotification` and `hasProgressNotification` to smarter distinguish between types based on package names, channel IDs, and keywords. - Added logic to implicitly enable `DOWNLOAD` if `PROGRESS` is active for a specific app to ensure backward compatibility. - **Translators**: - **BaseTranslator**: Introduced `extractTextPercentage` to parse progress values (e.g., "12%") from notification titles or text. - **ProgressTranslator**: Updated to support text-based percentages and refined indeterminate state handling. - **LiveUpdateTranslator**: Added fallback to text-based percentage parsing for system-native animations. - **CallTranslator**: Switched to `getCharSequence` for retrieving notification titles for better compatibility. - **Data & Migration**: - **AppPreferences**: Implemented a migration routine (`download_type_migration_complete`) that automatically adds the `DOWNLOAD` type to global and app-specific settings if `PROGRESS` was previously enabled. - **UI & Resources**: - **Theme & Onboarding**: - Updated `ThemeSettingsContent` and `OnboardingScreen` to reflect the split between Progress and Downloads. - Updated icons: `HourglassEmpty` for Progress and `CloudDownload` for Downloads. - **Localization**: - Refined strings in English and Spanish to distinguish between "Progress & Tasks" and "Downloads." - **Changelog**: Updated `changelog_0_5_0_beta` with details regarding CN support, the new Download type, text-based progress support, and smart filtering. * feat: implement DownloadTranslator and expand configuration resources - **Translators**: - Introduced `DownloadTranslator` to provide specialized handling for file transfer notifications, separating them from general progress tasks. - Implemented logic in `DownloadTranslator` to handle indeterminate states, percentage-based progress, and completion detection via keywords or 100% threshold. - Added support for custom completion icons ("tick_icon") and automated timeout/dismissible configurations for finished downloads. - **Resources & Localization**: - **Permanent Island**: Added strings for titles, descriptions, and width adjustment controls across multiple locales (ID, FR, TR, CS, IT, UK, DE, ZH-TW, PT-BR, RU, SK, ES, PL, KO, HU). - **Shizuku Workaround**: Added localized strings to guide users through enabling the Shizuku workaround, specifically for improved notification triggering on CN ROMs. - **Do Not Disturb (DND)**: Introduced strings for managing island visibility during DND, including manual pause and auto-detection of system DND status. - **Type Refinement**: Updated `type_progress` and `type_download` strings to clearly distinguish between "Progress & Tasks" (ongoing operations) and "Downloads" (file transfers). - **Changelog**: Updated `changelog_0_5_0_beta` in all languages to detail CN support, native live updates, theme engine improvements (HSL selector), and the new Permanent Island feature. * Feature/sui permission (#185) * feat(shizuku): implement support for Sui permissions and detection * chore(i18n): extract hardcoded onboarding text and add Spanish translations for Shizuku and DND strings * chore(i18n): translate permanent island strings to Spanish * Fix/widget permanent island (#186) * fix(permanent-island): hide permanent island when a widget is active * feat(ui): add shizuku workaround toggle to engine theme page * Feature/better icons (#187) * fix(notifications): tint dark icons, extract messaging avatars, fix update popups * fix(notifications): allow group summaries with text to trigger islands * fix(notifications): completely remove GROUP_ALERT_CHILDREN check for summaries * fix(notifications): ensure sequential execution of cancel and notify to prevent race conditions dropping islands * fix(notifications): use sender_person key for MessagingStyle avatar extraction * chore: bump version to 0.5.0-beta05 and update dependencies - **Build Configuration**: - Updated `versionCode` to 22 and `versionName` to `0.5.0-beta05`. - Updated Kotlin serialization plugin to 2.3.21. - **Dependencies**: - **Kotlin & Serialization**: Updated Kotlin to 2.3.21 and `kotlinxSerializationJson` to 1.11.0. - **Compose**: Updated `composeBom` to 2026.05.01 and Compose UI to 1.11.2. - **Libraries**: - Updated `gson` to 2.14.0. - Updated `nav3` to 1.1.2. * chore: bump version to 0.5.0 and update settings UI components - **Build & Versioning**: - Incremented `versionCode` to 23 and updated `versionName` to `0.5.0` in `build.gradle.kts`. - **UI & Layout**: - **GlobalSettingsScreen**: Added imports for `Switch`, `Row`, `Box`, and other Compose components to support interactive setting elements and layout refinements. - **Documentation**: - Updated the version badge in `README.md` to reflect the `0.5.0` release. * docs: update README features for 0.5.0 and finalize changelog strings * docs: add CN Support, Theme Engine Improvements, and Onboarding to the 0.5.0 changelog string --------- Co-authored-by: David Df <abdldaviddom@gmail.com>
D4vidDf
added a commit
that referenced
this pull request
Jun 2, 2026
* Feat/color picker (#127) * feat(theme): implement HSL color picker and enhanced lightness slider - **New `CustomColorBottomSheet`**: Introduced a dedicated HSL (Hue, Saturation, Lightness) color picker with gradient sliders for precise theme color customization. - **Enhanced `ColorsDetailContent`**: - Overhauled the preset tab with an animated lightness slider that appears when a preset is selected. - Improved the preset selection logic to maintain the "base" hue even when adjusting lightness to extreme white or black. - Redesigned the "Custom" colors section to use the new HSL bottom sheet instead of a simple hex text field. - Switched from simple circular bubbles to a more refined UI with selection rings and rounded-square transitions for active colors. - **Improved Theme Creator State**: - Implemented strict state clearing (nulling `currentEditingThemeId`) when exiting the creator to prevent state leakage between editing sessions. - Updated save/apply dialog logic to ensure the UI resets correctly after persistence. - **Shared Components**: Added `GradientSlider` and `ColorBubble` to `HyperOSColorPicker.kt` for reusable, stylized color selection components. - **Localization**: Added missing string resources for color labels (Hue, Saturation, Lightness) in English and Spanish. * #### feat(theme): implement advanced color modes and redesigned color picker - **Color Modes**: Introduced a `ColorMode` system (`CUSTOM`, `APP_ICON`, `MATERIAL_YOU`) to replace the binary "Use App Colors" toggle. This allows themes to dynamically adapt to Material You system colors or extract colors from app icons globally and per-app. - **Improved Color Picker**: Replaced standard text fields with a new `CustomColorBottomSheet` in the Call Style and Theme Creator screens, featuring a visual HSL-based selection and hex formatting. - **UI & UX Refinement**: - Redesigned `ColorsDetailContent` with a scrollable layout and new sections for dynamic color modes. - Updated the Theme Creator preview to correctly reflect the active color mode. - Standardized "My Theme" and "Share Theme" strings to use localized resources. - **Data Persistence**: Updated `HyperTheme`, `GlobalConfig`, and `AppThemeOverride` models to support the new `ColorMode` enum while maintaining backward compatibility with legacy themes. - **Theme Creator**: Refactored `ThemeViewModel` to handle more robust state initialization and migration when editing or creating new themes. - **Tooling**: Added Crowdin configuration settings for the IDE. * feat(widget): add favorites, recommended filtering, and update notice (#128) - **Widget Picker**: - Implemented a "Recommended" filter to highlight 1x4 and 2x4 layouts compatible with the Island size. - Added a Favorite system for widget apps, allowing users to star apps for top-level sorting. - Added a floating navigation bar to switch between Recommended and All widgets. - Improved dimension display by converting DP to grid cell proportions (e.g., 4x2). - **Saved Widgets**: - Added a persistent "Update Notice" dialog to remind users to check Autostart/Battery permissions after an app update. - Implemented a "Kill Active Widgets" action to instantly dismiss all running widget overlays. - Redesigned the UI with a centered filter toolbar (Favorites vs. All) and a dedicated Add FAB. - Added reactive listening for newly added widgets to ensure the list updates immediately. - **Service & Data**: - Enhanced `WidgetOverlayService` with specific `ACTION_KILL_WIDGET` and `ACTION_KILL_ALL_WIDGETS` handlers for immediate UI cleanup. - Added `favoriteWidgetAppsFlow` to `AppPreferences` to persist starred widget providers. - **Localization**: - Added English and Spanish strings for filters, permission reminders, and widget management. CLOSE #72 * feat(service): implement Native Android 16 Live Updates support - Added `LiveUpdateTranslator` to transform standard notifications into native Android 16 promoted ongoing tasks using `android.requestPromotedOngoing` and `android.shortCriticalText`. - Implemented a toggle in Global Settings to choose between custom Xiaomi Islands and native Android 16 Live Updates. - Created a dedicated `hyper_bridge_live_update_channel` for native updates to manage notifications and visibility independently. - Added `POST_PROMOTED_NOTIFICATIONS` permission to `AndroidManifest.xml` to support Android 16's promoted notification features. - Enhanced `LiveUpdateTranslator` with a `generateCriticalShortText` helper to dynamically extract progress percentages or ETAs for the system status chip. - Fixed Android 16 category filtering by forcing Live Updates into strictly valid categories (`PROGRESS` or `TRANSPORT`) to prevent OS blocking. - Ensured original notification timestamps are preserved for accurate system-wide "time active" calculations. - Updated `NotificationReaderService` to support hot-swapping between custom injection and native updates via shared preferences. * feat(service): enhance Live Update processing and Android 16 compatibility - **NotificationReaderService**: Implemented a more robust content hashing algorithm that tracks Title, Text, Progress (max, current, indeterminate), and Button Action states (e.g., Play to Pause transitions) to ensure accurate UI updates. - **LiveUpdateTranslator**: - Added support for large icons and picture extras in live updates. - Improved media notification handling by suppressing progress bars that often persist in the background. - Optimized category mapping (Progress vs. Transport) to comply with Android 16 ongoing promotion requirements. - Updated `shortCriticalText` generation logic to prioritize media titles, percentages, or time ETAs for the Dynamic Island chip. - Switched to native Android 16 APIs for promoted ongoing requests and short critical text injection. * feat(settings): refactor Global Settings UI and update version - Updated `versionName` to `0.5.0-alpha01`. - Redesigned `GlobalSettingsScreen` to use consistent card-based layouts for all settings items. - Replaced the "Native Live Updates" `ListItem` with a new standardized `SettingsSwitchItem` component. - Improved UI spacing and styling across the settings screen, including unified icon background treatments. - Simplified state management and click behavior for toggleable settings. * Update changelog resource to v0.4.2 * build: update project dependencies and gradle configuration (#134) - **Gradle & AGP**: - Upgraded Android Gradle Plugin (AGP) from `8.13.2` to `9.1.0`. - Upgraded Gradle wrapper from `8.13` to `9.3.1`. - Added `foojay-resolver-convention` plugin to `settings.gradle.kts` for automated toolchain management. - **Dependencies**: - Updated Kotlin to `2.3.20` and KSP to `2.3.2`. - Updated Compose BOM to `2026.03.00` and Material3 to `1.5.0-alpha15`. - Updated various AndroidX libraries: `core-ktx` (`1.18.0`), `datastore-preferences` (`1.2.1`), `activity-compose` (`1.13.0`), and `ui` (`1.10.5`). - Bumped `kotlinx-serialization-json` to `1.10.0`. - **Build Configuration**: - Removed `kotlin-android` plugin in favor of `kotlin-compose` and built-in Kotlin support. - Removed explicit `jvmTarget` configuration in `app/build.gradle.kts`. - Enabled several experimental/new Android Gradle properties in `gradle.properties`, including `android.builtInKotlin` and `android.newDsl`. - **Optimization**: - Updated `proguard-rules.pro` to strip Debug and Info logs in release builds using AGP 9.1+ syntax. * Feature/ux iprovement global configuration (#137) * feat(settings): redesign Global Settings and enhance Theme Engine - **Global Settings UI**: - Refactored `GlobalSettingsScreen` to use a card-based list layout with standardized `ListOptionCard` components. - Split settings into dedicated screens: `EngineSettingsScreen`, `IslandSettingsScreen`, and `NavCustomizationScreen`. - Added an "Engine" section to toggle between "Xiaomi Featured Design" and "Native Android Live Updates". - Implemented a more granular "Island Behavior" configuration including an improved auto-hide timeout slider with snap points (1s to 1h). - **Theme Engine**: - Integrated "Engine", "Island Behavior", and "Notification Types" selection directly into the Theme Creator flow. - Added a real-time `EnginePreview` component to visualize differences between Xiaomi and Native Live Update designs. - Added a "Notification Types" manager to toggle triggers for Standard, Progress, Media, Navigation, Call, and Timer events. - **Functionality & Fixes**: - **Crash Fix**: Resolved a critical issue causing the app to crash when opening settings in Traditional Chinese. - Updated `AppPreferences` to support persistent storage for the native notification engine toggle. - Improved `ThemeViewModel` with a more efficient bitmap scaling method for theme thumbnails. - Updated `StandardTranslator`, `NavTranslator`, and `ProgressTranslator` to better respect global timeout and dismissal configurations. - Set the default notification shade visibility to `false` for a cleaner "Island-only" experience by default. - **Localization**: - Added extensive string resources for version 0.4.2 hotfix and new engine settings across multiple languages (SK, PL, RU, ZH-TW, TR, UK, PT-BR, CS, DE, HU, IN, IT, KO, ES). - Fixed several translation issues in Traditional Chinese and Spanish. * feat(settings): externalize and localize auto-hide island strings - **UI**: Refactored `IslandSettingsControl.kt` to use `stringResource` instead of hardcoded strings for the Auto-hide Island feature. - **Localization**: - Added new string resources (`auto_hide_island`, `hides_after_a_set_time`, `behavior_hide_desc`, `behavior_desc_hide_long`) to multiple locales: Slovak, Polish, Russian, Traditional Chinese, Turkish, Ukrainian, Portuguese (Brazil), Czech, German, Indonesian, Italian, Korean, Spanish, and Hungarian. - Updated Spanish translations for behavior and trigger settings. - Standardized ellipsis usage from `…` to `...` in Portuguese (Brazil) and Korean `strings.xml`. * build: update version and remove redundant material3 dependency - Updated `versionName` to `0.5.0-alpha02`. - Removed explicit `androidx-material3` dependency from `libs.versions.toml` and `app/build.gradle.kts` (now managed via Compose BOM). * feat(localization): add French (France) translation - Added complete French localization (`strings.xml`) for the entire application. - Translated all core UI components, including onboarding, settings, library, and about screens. - Localized complex features such as the Theme Engine, Backup & Restore, and the new Notification Engine settings. - Provided French translations for all historical changelogs (v0.1.0 through v0.4.2). - Included localized string arrays for specific notification keyword matching (navigation, calls, and progress updates). * feat(theme): implement layered app-specific behavior overrides - **Notification Service**: - Implemented a layered resolution system (Theme > App > Global) for notification triggers and engine selection. - Updated `NotificationReaderService` to respect theme-managed app configurations and simplified processing logic. - Enhanced `LiveUpdateTranslator` to support themed colors and icons for the Native Live Update engine, specifically for navigation events. - Improved title and text resolution with smarter fallback mechanisms and content hashing for updates. - **Theme Engine & Editor**: - Added app-specific behavior overrides to the Theme Creator, allowing per-app configuration of notification types and engine selection (Xiaomi vs. Native). - Integrated "Engine", "Island Behavior", and "Notification Types" into the App Theme Editor. - Added `AppNotificationTypesEditor` for granular control over which event types (Standard, Media, Nav, etc.) trigger the island for specific apps. - Refactored `EngineThemeContent` to support an optional "Use Global Default" state. - **UI & Settings**: - Redesigned the "Notification Types" settings using `SettingsToggleCard` for a more consistent card-based look. - Added a theme-managed warning to the App Settings dialog when behaviors are controlled by an active theme. - Externalized and localized several strings related to triggers and engine management. - Added French language support to the locale selector. - **Technical Improvements**: - Introduced `ConfigResolver` for fast, in-memory resolution of effective configurations for translators. - Updated `AppPreferences` and `ThemeRepository` to support persistent storage of per-app engine and trigger overrides. - Standardized navigation layout resolution to respect layered preferences (Global Fallback vs. App-Specific). * feat(localization): add trigger configuration and override strings - **Localization**: Added new string resources for "Active Triggers", "Trigger Override", and "Notification Engine" configuration across multiple locales (SK, PL, RU, FR, ZH-TW, TR, UK, PT-BR, CS, DE, IN, IT, KO, HU). - **Strings**: - Added descriptions for notification types: Standard, Progress, Media, Navigation, Call, and Timer. - Added UI strings for global trigger settings and per-app overrides. - Added `managed_by_theme_desc` and `use_global_default_engine` to support theme-based behavior logic. - **Cleanup**: Removed unused mock engine strings (`engine_mock_charging`, `engine_mock_percentage`, etc.) from all translated `strings.xml` files. * feat(theme): enhance engine resolution and theme-persistent configuration (#147) - **Notification Service**: - Refactored `getEffectiveEngine` in `NotificationReaderService` to implement a 4-tier resolution priority: Theme App Override > User App Override > Theme Global Override > User Global Fallback. - **Theme Engine & Editor**: - **Global Settings**: Added `use_native_live_updates` to `GlobalConfig` model, allowing themes to define a default engine for all apps. - **Persistence**: Fixed an issue where changing the engine via the UI while a custom theme was active would not persist; it now correctly patches the active Theme JSON. - **Theme Creator**: - Updated `ThemeViewModel` to correctly load and save the global engine selection to the Theme JSON. - Fixed a bug where existing call configurations were wiped when updating app-specific live update settings. - Improved state management by making `themeUseNativeLiveUpdates` nullable to support inheritance. - **UI & Settings**: - **Engine Settings**: Refactored `EngineSettingsScreen` to use `AppPreferences` and `ThemeRepository` instead of raw `SharedPreferences`. - Integrated real-time engine updates by sending `ACTION_RELOAD_THEME` to the background service upon configuration changes. - Standardized UI spacing and typography in the Engine selection screen. - **Bug Fixes**: - Fixed a bug in `AppListViewModel` where app-specific engine overrides were not being saved to the active theme if the override didn't already exist. - Corrected `@StringRes` annotation usage in `ShapeOption` enum. * build: update version to 0.5.0-alpha03 and update localizations - **Build**: Bumped `versionCode` to `17` and `versionName` to `0.5.0-alpha03` in `app/build.gradle.kts`. - **Localization**: - **French (FR)**: Completed translations for the "Engine" configuration, "Island Behavior", and "Active Triggers" sections. Updated backup and app configuration strings. - **Italian (IT)**: Translated the v0.4.2 changelog, engine settings, color labels, and navigation arrival keywords. - **Traditional Chinese (ZH-TW)**: Fully localized the new Engine, Behavior, and Trigger settings. Refined onboarding and permission strings (e.g., "HyperIsland" to "超級島"). - **Hungarian (HU)**: Localized engine settings, behavior controls, trigger descriptions, and the v0.4.2 hotfix changelog. Updated call-related keywords. - **Portuguese (Brazil)**: Translated the v0.4.2 changelog, color labels, and UI state strings (Recommended, Favorites, All). Updated navigation arrival keywords. - **Strings**: Standardized engine configuration keys across all modified locales to support the transition between "Xiaomi Featured Design" and "Native Android Live Updates". * loc(fr): fix apostrophe escaping in French strings - Updated `island_behavior_desc` and `engine_timeouts_triggers` in the French (`fr-rFR`) `strings.xml` to properly escape apostrophes, ensuring correct XML parsing and display. * Feature/nav3 migration (#152) * build: integrate Navigation 3 and refactor app routing - **Dependencies**: Added `androidx.navigation3` (runtime and UI) and `androidx-lifecycle-viewmodel-navigation3` to `libs.versions.toml` and `app/build.gradle.kts`. - **Navigation Framework**: - Introduced `NavigationState` to manage persistent back stacks for top-level routes (Onboarding and Home). - Implemented a `Navigator` class to abstract forward and backward navigation logic using Navigation 3 APIs. - Replaced the manual `Screen` enum and `AnimatedContent` router with a `@Serializable` sealed interface and `NavDisplay`. - **Routing & State**: - Refactored `MainActivity` to use `entryProvider` for screen definitions, simplifying navigation calls across the app. - Updated screen transitions to leverage `NavDisplay`'s built-in handling of the back gesture and entry management. - Improved data passing between screens (e.g., `ImportPreview` and `NavCustomization`) by using type-safe classes in the `Screen` sealed interface. - **Models**: Added `@Serializable` annotations to backup-related models (`HyperBridgeBackup`, `BackupMetadata`, `AppSettingBackup`) to support type-safe navigation arguments. - **UI**: Standardized back-button behavior across all settings and configuration screens to use the new `Navigator.goBack()` method. * refactor(navigation): modularize and relocate navigation logic - **Navigation Architecture**: - Created a new `com.d4viddf.hyperbridge.ui.navigation` package to house navigation-related components. - Moved `Screen` definition from `MainActivity.kt` to its own file `Screen.kt`, maintaining `@Serializable` support for all application routes. - Relocated `NavigationState.kt` and `Navigator.kt` to the new navigation package and updated their package declarations accordingly. - **MainActivity**: - Cleaned up imports and removed inline `Screen` interface definition to use the new modularized navigation components. - Updated references to use `toEntries` and other navigation extension functions from the new package. * refactor(navigation): modularize nav graph and enhance back press handling - **Navigation**: - Extracted the main navigation graph from `MainActivity.kt` into a new standalone `mainNavGraph` function in `NavGraph.kt` to improve maintainability. - Updated `Navigator.goBack()` to return a boolean indicating if the back event was handled, allowing for better control over app exit logic. - Integrated `BackHandler` in `MainActivity` to properly handle system back gestures and call `onExit` when at the root of the navigation stack. - **MainActivity**: - Refactored `MainRootNavigation` into smaller, more focused composables (`MainRootNavigation` and `MainNavigationContent`). - Improved the initialization flow to show a `CircularProgressIndicator` while the setup status is being loaded from preferences. - Simplified the logic for switching between `Onboarding` and `Home` routes based on the setup completion state. - **UI**: Standardized back navigation behavior across all screens, ensuring consistent exit behavior from the `Info` screen. * feat(ui): implement custom navigation transitions and predictive back support - **Navigation**: - Added custom `transitionSpec` and `popTransitionSpec` using horizontal slides and fades for smoother screen transitions. - Implemented `predictivePopTransitionSpec` to support Android's predictive back gesture with scaling and transform origin adjustments based on swipe edge. - Dynamically updated `topLevelRoutes` to prevent navigating back to the onboarding flow once setup is complete. - **UI**: - Applied a rounded corner clip (32.dp) to the main `NavDisplay` container. - Optimized transition durations to 400ms for a more fluid user experience. * chore: code cleanup, dependency update, and UI refinements - **UI & UX**: - **Widget Picker**: Refactored `WidgetPickerScreen` and removed `WidgetPickerViewModel.kt` to streamline widget selection logic. Updated layout filtering to consistently use `targetCellWidth` and `targetCellHeight`. - **Theme Creator**: Improved navigation and state management in `ThemeCreatorScreen` and `AppThemeEditorScreen`. Enhanced UI consistency for color and icon selection previews. - **Licenses**: Updated `LicensesScreen` to dynamically load a sorted list of open-source libraries and externalized the screen title string. - **Components**: Standardized `EmptyState` component parameters and improved layout logic in `WidgetConfigScreen` and `SavedAppWidgetsScreen`. - **Localization**: - Added `open_source_licenses` string resource. - Refactored `WidgetConfigScreen` to use localized toast and error messages. - **Translators**: - **Standard**: Cleaned up title resolution logic in `StandardTranslator`. - **Progress**: Updated `ProgressTranslator` to hide redundant percentage text in specific circular progress views. - **Internal Improvements**: - **Compatibility**: Removed redundant SDK version checks for `Parcelable` handling and notification permissions, favoring modern Android APIs. - **Utilities**: Switched to `androidx.core` extension functions for `Bitmap` creation and `Uri` parsing. - **Persistence**: Updated `SavedAppWidgetsScreen` to use the `edit { }` DSL for `SharedPreferences`. - **Data**: Refined theme ID generation in `ThemeRepository` and improved rule engine comments. - **Bug Fixes**: - Fixed a potential nullability issue in `AppListViewModel` when patching theme configurations. - Corrected `IslandConfig` initialization in the App Settings dialog. * Feature/duplication toggle (#153) * feat(settings): enhance island behavior with heads-up timeout and notification management - **Island Configuration**: - Introduced `floatTimeout` to `IslandConfig` to control the duration of heads-up popups. - Added `removeOriginalNotification` toggle to allow automatic dismissal of source notifications when a Live Update is active. - Updated `AppPreferences` and `AppSettings` to support persistent storage for these new global and per-app settings. - **UI & Settings**: - **Island Settings**: Redesigned the "Heads-up Popup" configuration with an animated slider for granular timeout control (1s to 30s). - **Live Updates**: Added a new section in `IslandSettingsControl` to manage the removal of original notifications. - Improved UI scrollability in `IslandSettingsScreen` and added several Compose previews for better development feedback. - Refactored toggle logic to ensure consistency between heads-up and timeout states. - **Translators**: - Updated all translators (`Media`, `Call`, `Progress`, `Standard`, `Nav`, `Timer`) to respect the new `expandedTimeMs` (heads-up timeout) configuration. - Cleaned up redundant theme color application logic in `TimerTranslator`. - **Localization**: - Added string resources for "Live updates", "Remove original notification", and "Heads-up popup" timeout descriptions. * feat(service): implement notification timeout and original notification removal - **Notification Service**: - Introduced a `handlePostNotificationSideEffects` method to manage post-processing logic for translated notifications. - Added support for automatically cancelling the original system notification when `removeOriginalNotification` is enabled in the configuration (excluding Media notifications). fixes #21, fixes #120, fixes #146 - Implemented a timeout mechanism using coroutines to automatically dismiss translated notifications after a configured duration. - Added `intentionallyRemovedKeys` tracking to prevent recursive processing loops when the service cancels a system notification. - Improved cleanup logic in `onNotificationRemoved` and `cleanupCache` to ensure associated timeout jobs are cancelled and resources are freed. - **Bug Fixes**: - Added missing cancellation of existing processing jobs and timeout jobs when a notification is removed or updated. - **Logic Improvements**: - Improved design logic for new notification parameters ( closes #99) and add theme configuration ( closes #107) * fix(service): refine notification timeout logic and dismissal behavior - **Notification Service**: - Modified `onStartCommand` to use non-nullable `Intent` parameters for better type safety. - Updated notification removal logic to ensure the source notification is no longer canceled when the Island notification is dismissed or times out. - Refactored `handlePostNotificationSideEffects` to only apply timeout scheduling to "Live Update" notifications. - Improved cache cleanup and logging during notification dismissal to prevent unintended side effects on source notifications. * Feature/onboarding screen (#155) * feat(ui): redesign onboarding flow and expand configuration options - **Onboarding Experience**: - Significantly expanded the onboarding process from 7 to 11 pages, incorporating new configuration steps for triggers, engine selection, and island behavior. - Redesigned the `OnboardingScreen` layout with improved navigation controls, including a dedicated "Back" button and a more prominent "Get Started" entry point. - Added several new pages: `TriggersConfigPage` (active notification types), `PriorityEducationPage` (island limit behavior), `BehaviorConfigPage` (notification removal and shade visibility), `CustomizationPage` (themes and widgets), and `EngineConfigPage` (Xiaomi vs. Native Live Updates). - Integrated `ModalBottomSheet` for granular settings configuration directly within the onboarding flow. - Added extensive Compose previews for all onboarding pages to improve development feedback. - **Data & Logic**: - **AppPreferences**: Implemented a migration check to force an onboarding reset for users upgrading to version 0.5.0 (versionCode 17). - **MainActivity**: Removed the standalone `PriorityEducationDialog` as its logic is now integrated into the onboarding flow. - **Build Configuration**: Enabled `buildConfig` in `app/build.gradle.kts` and updated the Kotlin serialization plugin version. - **Localization & Resources**: - **Strings**: - Standardized and updated terminology across multiple languages (ES, HU, IT, ZH-TW, SK, CS, TR, DE, PT, KO, FR, UK, RU, ID). - Added new string resources for the expanded onboarding descriptions, "Live updates" management, and "Remove original notification" toggles. - Refined French strings to ensure proper apostrophe escaping and formatting. - Simplified and updated battery optimization instructions ("Allow Autostart", "Disable Restrictions"). - **Icons**: Switched to modern Rounded/Filled icon variants for a more consistent visual style across the setup pages. * feat(onboarding): implement auto-hide configuration page - **Onboarding Flow**: - Expanded the onboarding process from 11 to 13 pages to include more granular behavior settings. - Introduced a dedicated `AutoHideConfigPage` to manage island timeout settings during initial setup. - Updated `BehaviorConfigPage` description to reflect its role in global configuration. - **UI & Components**: - Added an interactive "Auto-hide Island" section with a `Switch` and an `AnimatedVisibility` slider for timeout selection. - Exposed `timeoutSteps` and `formatSeconds` from `IslandSettingsControl.kt` to be reusable across the onboarding flow. - Integrated `Icons.Rounded.Timer` and `Icons.Default.AccessTime` for improved visual cues in behavior settings. - **State Management**: - Updated `OnboardingScreen` to persist `IslandConfig` timeout and `isFloat` preferences directly through `AppPreferences`. - **Localization**: - Added `behavior_desc_glob_config` string resource for better description of island behavior settings. * chore: bump version to 0.5.0-beta01 and refine onboarding navigation - **Build**: - Updated `versionCode` to `18` and `versionName` to `0.5.0-beta01` in `app/build.gradle.kts`. - **Navigation**: - **Navigator**: Introduced `finishOnboarding` to explicitly handle the transition from onboarding to the home screen by ensuring the home stack is initialized before clearing the onboarding route, preventing potential app closure. - **MainActivity**: Refactored `navigationState` initialization to use a persistent set of all possible top-level routes and a fixed initial start route. - **NavGraph**: Updated setup completion logic to use the new `navigator.finishOnboarding` method and removed redundant priority education flags. - **Onboarding**: - Refactored `OnboardingScreen` to dynamically determine the last page using `pagerState.pageCount` instead of a hardcoded index. - **Data & Persistence**: - **AppPreferences**: Updated the onboarding reset logic to target `versionCode 18` for version 0.5.0, forcing a setup reset for users on older builds. * chore: general cleanup, bug fixes, and maintenance - **UI & Components**: - Removed several legacy dialogs and components: `ChangelogDialog`, `PriorityEducationDialog`, and `DeviceCompatibility`. - Simplified `CommonCards.kt` by removing `ExpandableOptimizationCard` and localized logic. - Refactored `HyperOSColorPicker` to remove unused `ColorBubble` component. - Added `verticalScroll` to `ThemeSettingsContent` to improve navigation on smaller screens. - Updated `IslandSettingsControl` and `IslandSettingsScreen` to use explicit `IslandConfig` initialization. - Added a content description for the widget snapshot layout. - **Notification Service & Logic**: - Refactored `NotificationReaderService` and `LiveUpdateTranslator` to improve string handling and reliability when resolving notification titles/text. - Enhanced exception handling across the service and data layers using suppressed exceptions (`catch (_: Exception)`) to reduce log noise. - Improved app label caching and package filtering logic. - **Data & Persistence**: - Cleaned up `AppPreferences` by removing the unused `isPriorityEduShown` flow. - Refactored `ThemeRepository` to use a lowercase tag and improved error logging for theme installation and resource loading. - Updated `AppCacheManager` and `WidgetPickerScreen` for better state management and type safety. - **Resources & Localization**: - **Icons**: Added monochrome support to adaptive launcher icons and moved them to the standard `mipmap-anydpi` directory. - **Strings**: - **PT-BR**: Updated widget ID formatting. - **FR**: Simplified application configuration descriptions. - **General**: Added `widget_layout_snapshot` resource. - **Build & System**: - Updated Gradle wrapper from `9.3.1` to `9.4.1`. - Refactored `DeviceUtils` for cleaner system property checks. - Updated `AndroidManifest` with improved package visibility policy ignores. - Cleaned up `ThemeInstallerActivity` by removing redundant SDK version checks for dynamic color schemes. * chore(manifest): add notification listener permission - **Permissions**: - Added `BIND_NOTIFICATION_LISTENER_SERVICE` to `AndroidManifest.xml` to support notification listener capabilities. - Applied `tools:ignore="ProtectedPermissions"` to acknowledge the use of the protected system permission. * fix(service): refine progress notification behavior and navigation state (#157) - **Notification Service & Translators**: - **ProgressTranslator**: - Modified `translate` to accept an `isUpdate` flag. - Restricted "floating" behavior to the initial notification appearance only, preventing subsequent progress updates from re-triggering the float animation. - Refined `BigIslandInfo` layout for finished progress states by simplifying `ImageTextInfoLeft` and `ImageTextInfoRight` parameters (removing redundant text info). - Removed redundant `setIslandFirstFloat` call. - **NotificationReaderService**: Updated `PROGRESS` type handling to pass the `isUpdate` state to the translator. - **UI & Navigation**: - **MainActivity**: Added `isSetupComplete` as a key to `remember` blocks for `initialStartRoute` and `allPossibleTopLevel` to ensure navigation state correctly reacts to setup completion changes. Closes #156 * feat(boot): add support for Direct Boot (#159) - **Boot Receiver**: - Updated `BootReceiver.kt` to handle `ACTION_LOCKED_BOOT_COMPLETED`, allowing the app to respond to boot events before the first user unlock. - Added `android.intent.action.LOCKED_BOOT_COMPLETED` to the `BootReceiver` intent filter in `AndroidManifest.xml`. fixed #158 * chore(localization): update and expand string resources across multiple languages - **Strings & Localization**: - **General**: Added new string resources `behavior_desc_glob_config` (island behavior description) and `widget_layout_snapshot` (widget preview) across all supported locales. - **Spanish (ES)**: Added translations for floating notification timeouts, open source licenses, live updates, and original notification removal. - **French (FR)**: Fully localized several strings including floating notification settings, live updates, onboarding descriptions, and behavior configurations. - **Traditional Chinese (ZH-TW)**: Localized onboarding descriptions for widgets, themes, and customization options. - **Portuguese (PT-BR)**: Simplified the `widget_id_fmt` string from "Widget #%d" to "Widget". - **New Keys**: Added placeholder or translated entries for `setting_float_timeout_desc`, `open_source_licenses`, `live_updates`, and `remove_original_notification` logic in relevant resource files. * chore(changelog): update for version 0.5.0-beta - **UI & Navigation**: - Updated `ChangelogHistoryScreen` to include version `0.5.0` at the top of the history list. - Updated `MainActivity` to display the `0.5.0-beta` changelog in the main `ChangelogSheet`. - **Resources & Localization**: - Added `changelog_0_5_0_beta` string containing release notes for Native Live Updates, HyperOS CN support, new Theme Engine features (HSL selector, behavior controls), and system fixes. - Added `title_0_5_0` string resource ("The Live Update"). * chore: update version metadata to 0.5.0 - **Changelog**: - Updated `ChangelogHistoryScreen` to mark version `0.5.0` as the latest release and downgraded `0.4.2` to historical status. - **Application Versioning**: - Updated the fallback `currentVersionName` in `MainActivity` from `0.4.2` to `0.5.0`. * refactor(service): refine floating behavior for progress notifications (#164) - **Notification Logic**: - Updated `ProgressTranslator` to restrict the floating behavior (`setEnableFloat`) to only the initial appearance of a notification, preventing repeated floats during updates. - Removed the redundant `setIslandFirstFloat` call from the builder. close #163 * Fix/162 bug crash unable to start service with null (#165) * fix(service): handle nullable intent in onStartCommand - **Notification Service**: - Updated `onStartCommand` signature to accept a nullable `Intent` to prevent potential crashes when the service is restarted by the system. - Implemented null-safe checks for `intent.action` when processing test widgets and theme reloads. fixed #162 * feat(service): implement localized error messages for persistent notifications - **Notification Service**: - Updated `NotificationReaderService` to use localized string resources for fallback content text in both standard and widget notifications. - Replaced the hardcoded "Active Island" text with `R.string.notification_went_wrong`. - Replaced the hardcoded "Active" widget text with `R.string.widget_went_wrong`. - **Resources**: - Added `notification_went_wrong` and `widget_went_wrong` string resources to provide clearer feedback when notifications or widgets fail to render correctly. * chore: update changelog string formatting - **Resources**: - Refactored `changelog_0_5_0_beta` in `strings.xml` to use HTML `<b>` tags instead of markdown-style bolding for better compatibility with Android string rendering. - Improved indentation and formatting of the changelog text within the resource file. * chore: bump version to 0.5.0-beta02 and refine changelog trigger logic - **Build**: - Updated `versionCode` to `19` and `versionName` to `0.5.0-beta02` in `app/build.gradle.kts`. - **Navigation & Lifecycle**: - **NavGraph**: Removed redundant `setLastSeenVersion` call during onboarding completion to centralize version tracking. - **MainActivity**: - Refined the changelog display logic to prevent it from appearing immediately after initial onboarding. - Improved `lastSeenVersion` state handling by using a more reliable initial value (`-1`) to ensure version comparisons only trigger after the preference is properly loaded. - Introduced `isInitiallySetup` check to distinguish between fresh installations and application updates. * chore: update localizations and refine progress translation logic - **Localization & Resources**: - **Spanish (ES)**: Translated several core strings, including "Live updates," "Open source licenses," and "Island behavior" descriptions. - **Indonesian (ID)**: Extensively updated translations for UI controls, navigation keywords (arrival, destination), and system permission descriptions. - **Italian (IT)** and **Traditional Chinese (ZH-TW)**: Completed translations for onboarding descriptions and behavior settings. - **General**: Added the `0.5.0-beta` changelog, version title, and error fallback strings (`notification_went_wrong`, `widget_went_wrong`) across all supported languages (ES, HU, IT, ZH-TW, SK, CS, TR, DE, PT, KO, FR, UK, PL, RU, ID). - **Notification Service**: - **ProgressTranslator**: Refactored `setIslandConfig` in the progress update logic to only apply `expandedTimeMs` (float timeout) if the floating notification setting is explicitly enabled, improving consistency with user preferences. * chore(manifest): remove redundant notification listener permission - **Permissions**: - Removed the `BIND_NOTIFICATION_LISTENER_SERVICE` permission from `AndroidManifest.xml`. - Removed the associated `tools:ignore="ProtectedPermissions"` attribute. * Fix WidgetManager initialization and Shizuku implementation Closes #97 Closes #119 Closes #141 Closes #177 * chore(manifest): remove redundant notification listener permission - **Permissions**: - Removed the `BIND_NOTIFICATION_LISTENER_SERVICE` permission from `AndroidManifest.xml`. - Removed the associated `tools:ignore="ProtectedPermissions"` attribute. * chore: bump version to 0.5.0-beta04 and refine Shizuku workaround - **Build**: - Updated `versionCode` to `21` and `versionName` to `0.5.0-beta04` in `app/build.gradle.kts`. - **Shizuku & Notifications**: - **ShizukuManager**: Refactored the `notify` logic to improve the reliability of the XMSF network workaround on MIUI/HyperOS. - Introduced a `Mutex` to prevent race conditions during concurrent notification dispatches. - Added a 50ms delay after disabling XMSF to ensure the network state change takes effect. - Implemented a 1-second delayed restoration of XMSF network, which is reset by subsequent notifications to prevent premature re-enabling. - Added `@RequiresPermission` annotation for `POST_NOTIFICATIONS`. - **Resources & Localization**: - **Changelog**: Updated `changelog_0_5_0_beta` to include information regarding CN Support and the new Shizuku workaround. - **Traditional Chinese (ZH-TW)**: Refined the `enable_autostart` string for better clarity ("開啟後台啟動管理"). * Feature/permanent island (#179) * feat: implement Permanent Island feature and enhance Shizuku notification handling - **Permanent Island**: - Introduced a "Permanent Island" feature that keeps a placeholder Dynamic Island visible when no active notifications are present. - Added `PermanentIslandManager` to coordinate visibility based on the `activeIslands` count within `NotificationReaderService`. - Added `isPermanentIslandEnabledFlow` and `permanentIslandWidthFlow` to `AppPreferences` to persist user configuration. - Implemented `PermanentIslandConfigPage` in the onboarding flow and a dedicated settings screen. Closes #94 - **Shizuku & Notifications**: - **ShizukuManager**: Added a `cancel` function that applies the XMSF network workaround (disabling/enabling XMSF network with a delay) when programmatically removing notifications to ensure consistency on MIUI/HyperOS. - **NotificationReaderService**: Integrated `PermanentIslandManager` to trigger updates whenever notifications are posted or removed. - **Lifecycle & System**: - **BootReceiver**: Added `ACTION_MY_PACKAGE_REPLACED` to the intent filter in `AndroidManifest.xml` and handled it in the receiver to ensure the service restarts correctly after app updates. - **UI & Navigation**: - **GlobalSettingsScreen**: Added an entry point for Permanent Island settings and updated the expressive shape logic to accommodate the additional list item. - **NavGraph**: Defined the route and destination for `PermanentIslandConfig`. - **Previews**: Updated `@Preview` annotations across onboarding components to use `apiLevel = 36`. - **Resources & Localization**: - Added strings for "Permanent Island" titles, descriptions, and width controls in English and Spanish (ES, ES-rEM). - Refined the `shizuku_workaround_title` string for better clarity. * feat: implement Permanent Island feature and configuration UI - **Permanent Island Logic**: - Introduced `PermanentIslandManager` to manage a persistent, "empty" island state when no other active notifications are present. - Implemented logic to automatically show/hide the permanent island based on the current notification count and user preferences. - Utilizes `ShizukuManager` to dispatch a non-dismissible, low-priority notification that uses non-breaking spaces (`\u00A0`) to simulate variable island widths. - **Settings UI**: - Created `PermanentIslandConfigScreen` providing users with a toggle to enable the feature and a slider to adjust the island's width. - Integrated `AppPreferences` flows to reactively update the UI and service state. - **Components**: - Developed `PermanentIslandPreview`, a Compose component that provides a real-time visual mock-up of the island's appearance on a status bar, featuring smooth width animations via `animateDpAsState`. * docs: Add permanent island feature to changelog * chore: Update .gitignore to exclude build artifacts and IDE configs * chore: Update .gitignore to standard Android Jetpack Compose template * chore: initialize project configuration, dependency versions, and ignore rules * feat: introduce dedicated Download notification type and refine progress parsing (#184) - **Notifications & Services**: - **NotificationType**: Added a new `DOWNLOAD` type to separate file transfers from general `PROGRESS` tasks. Close #174 - **NotificationReaderService**: - Integrated `DownloadTranslator` to handle download-specific notification logic. - Implemented `isDownloadNotification` and `hasProgressNotification` to smarter distinguish between types based on package names, channel IDs, and keywords. - Added logic to implicitly enable `DOWNLOAD` if `PROGRESS` is active for a specific app to ensure backward compatibility. - **Translators**: - **BaseTranslator**: Introduced `extractTextPercentage` to parse progress values (e.g., "12%") from notification titles or text. - **ProgressTranslator**: Updated to support text-based percentages and refined indeterminate state handling. - **LiveUpdateTranslator**: Added fallback to text-based percentage parsing for system-native animations. - **CallTranslator**: Switched to `getCharSequence` for retrieving notification titles for better compatibility. - **Data & Migration**: - **AppPreferences**: Implemented a migration routine (`download_type_migration_complete`) that automatically adds the `DOWNLOAD` type to global and app-specific settings if `PROGRESS` was previously enabled. - **UI & Resources**: - **Theme & Onboarding**: - Updated `ThemeSettingsContent` and `OnboardingScreen` to reflect the split between Progress and Downloads. - Updated icons: `HourglassEmpty` for Progress and `CloudDownload` for Downloads. - **Localization**: - Refined strings in English and Spanish to distinguish between "Progress & Tasks" and "Downloads." - **Changelog**: Updated `changelog_0_5_0_beta` with details regarding CN support, the new Download type, text-based progress support, and smart filtering. * feat: implement DownloadTranslator and expand configuration resources - **Translators**: - Introduced `DownloadTranslator` to provide specialized handling for file transfer notifications, separating them from general progress tasks. - Implemented logic in `DownloadTranslator` to handle indeterminate states, percentage-based progress, and completion detection via keywords or 100% threshold. - Added support for custom completion icons ("tick_icon") and automated timeout/dismissible configurations for finished downloads. - **Resources & Localization**: - **Permanent Island**: Added strings for titles, descriptions, and width adjustment controls across multiple locales (ID, FR, TR, CS, IT, UK, DE, ZH-TW, PT-BR, RU, SK, ES, PL, KO, HU). - **Shizuku Workaround**: Added localized strings to guide users through enabling the Shizuku workaround, specifically for improved notification triggering on CN ROMs. - **Do Not Disturb (DND)**: Introduced strings for managing island visibility during DND, including manual pause and auto-detection of system DND status. - **Type Refinement**: Updated `type_progress` and `type_download` strings to clearly distinguish between "Progress & Tasks" (ongoing operations) and "Downloads" (file transfers). - **Changelog**: Updated `changelog_0_5_0_beta` in all languages to detail CN support, native live updates, theme engine improvements (HSL selector), and the new Permanent Island feature. * Feature/sui permission (#185) * feat(shizuku): implement support for Sui permissions and detection * chore(i18n): extract hardcoded onboarding text and add Spanish translations for Shizuku and DND strings * chore(i18n): translate permanent island strings to Spanish * Fix/widget permanent island (#186) * fix(permanent-island): hide permanent island when a widget is active * feat(ui): add shizuku workaround toggle to engine theme page * Feature/better icons (#187) * fix(notifications): tint dark icons, extract messaging avatars, fix update popups * fix(notifications): allow group summaries with text to trigger islands * fix(notifications): completely remove GROUP_ALERT_CHILDREN check for summaries * fix(notifications): ensure sequential execution of cancel and notify to prevent race conditions dropping islands * fix(notifications): use sender_person key for MessagingStyle avatar extraction * chore: bump version to 0.5.0-beta05 and update dependencies - **Build Configuration**: - Updated `versionCode` to 22 and `versionName` to `0.5.0-beta05`. - Updated Kotlin serialization plugin to 2.3.21. - **Dependencies**: - **Kotlin & Serialization**: Updated Kotlin to 2.3.21 and `kotlinxSerializationJson` to 1.11.0. - **Compose**: Updated `composeBom` to 2026.05.01 and Compose UI to 1.11.2. - **Libraries**: - Updated `gson` to 2.14.0. - Updated `nav3` to 1.1.2. * chore: bump version to 0.5.0 and update settings UI components - **Build & Versioning**: - Incremented `versionCode` to 23 and updated `versionName` to `0.5.0` in `build.gradle.kts`. - **UI & Layout**: - **GlobalSettingsScreen**: Added imports for `Switch`, `Row`, `Box`, and other Compose components to support interactive setting elements and layout refinements. - **Documentation**: - Updated the version badge in `README.md` to reflect the `0.5.0` release. * docs: update README features for 0.5.0 and finalize changelog strings * docs: add CN Support, Theme Engine Improvements, and Onboarding to the 0.5.0 changelog string * chore: update changelog reference to version 0.5.0 - **MainActivity**: - Updated `ChangelogSheet` to use the stable `0.5.0` changelog string resource instead of the beta version. - **UI & Settings**: - Added `FontWeight` import to `GlobalSettingsScreen` to support text styling refinements. * i18n: translate 0.5.0 changelog to spanish --------- Co-authored-by: David Df <abdldaviddom@gmail.com>
D4vidDf
added a commit
that referenced
this pull request
Jun 2, 2026
* master (#126)
* Update version badge in README.md to 0.4.4
* Update version badge in README.md
* Feat/live updates (#129)
* Feat/color picker (#127)
* feat(theme): implement HSL color picker and enhanced lightness slider
- **New `CustomColorBottomSheet`**: Introduced a dedicated HSL (Hue, Saturation, Lightness) color picker with gradient sliders for precise theme color customization.
- **Enhanced `ColorsDetailContent`**:
- Overhauled the preset tab with an animated lightness slider that appears when a preset is selected.
- Improved the preset selection logic to maintain the "base" hue even when adjusting lightness to extreme white or black.
- Redesigned the "Custom" colors section to use the new HSL bottom sheet instead of a simple hex text field.
- Switched from simple circular bubbles to a more refined UI with selection rings and rounded-square transitions for active colors.
- **Improved Theme Creator State**:
- Implemented strict state clearing (nulling `currentEditingThemeId`) when exiting the creator to prevent state leakage between editing sessions.
- Updated save/apply dialog logic to ensure the UI resets correctly after persistence.
- **Shared Components**: Added `GradientSlider` and `ColorBubble` to `HyperOSColorPicker.kt` for reusable, stylized color selection components.
- **Localization**: Added missing string resources for color labels (Hue, Saturation, Lightness) in English and Spanish.
* #### feat(theme): implement advanced color modes and redesigned color picker
- **Color Modes**: Introduced a `ColorMode` system (`CUSTOM`, `APP_ICON`, `MATERIAL_YOU`) to replace the binary "Use App Colors" toggle. This allows themes to dynamically adapt to Material You system colors or extract colors from app icons globally and per-app.
- **Improved Color Picker**: Replaced standard text fields with a new `CustomColorBottomSheet` in the Call Style and Theme Creator screens, featuring a visual HSL-based selection and hex formatting.
- **UI & UX Refinement**:
- Redesigned `ColorsDetailContent` with a scrollable layout and new sections for dynamic color modes.
- Updated the Theme Creator preview to correctly reflect the active color mode.
- Standardized "My Theme" and "Share Theme" strings to use localized resources.
- **Data Persistence**: Updated `HyperTheme`, `GlobalConfig`, and `AppThemeOverride` models to support the new `ColorMode` enum while maintaining backward compatibility with legacy themes.
- **Theme Creator**: Refactored `ThemeViewModel` to handle more robust state initialization and migration when editing or creating new themes.
- **Tooling**: Added Crowdin configuration settings for the IDE.
* feat(widget): add favorites, recommended filtering, and update notice (#128)
- **Widget Picker**:
- Implemented a "Recommended" filter to highlight 1x4 and 2x4 layouts compatible with the Island size.
- Added a Favorite system for widget apps, allowing users to star apps for top-level sorting.
- Added a floating navigation bar to switch between Recommended and All widgets.
- Improved dimension display by converting DP to grid cell proportions (e.g., 4x2).
- **Saved Widgets**:
- Added a persistent "Update Notice" dialog to remind users to check Autostart/Battery permissions after an app update.
- Implemented a "Kill Active Widgets" action to instantly dismiss all running widget overlays.
- Redesigned the UI with a centered filter toolbar (Favorites vs. All) and a dedicated Add FAB.
- Added reactive listening for newly added widgets to ensure the list updates immediately.
- **Service & Data**:
- Enhanced `WidgetOverlayService` with specific `ACTION_KILL_WIDGET` and `ACTION_KILL_ALL_WIDGETS` handlers for immediate UI cleanup.
- Added `favoriteWidgetAppsFlow` to `AppPreferences` to persist starred widget providers.
- **Localization**:
- Added English and Spanish strings for filters, permission reminders, and widget management.
CLOSE #72
* feat(service): implement Native Android 16 Live Updates support
- Added `LiveUpdateTranslator` to transform standard notifications into native Android 16 promoted ongoing tasks using `android.requestPromotedOngoing` and `android.shortCriticalText`.
- Implemented a toggle in Global Settings to choose between custom Xiaomi Islands and native Android 16 Live Updates.
- Created a dedicated `hyper_bridge_live_update_channel` for native updates to manage notifications and visibility independently.
- Added `POST_PROMOTED_NOTIFICATIONS` permission to `AndroidManifest.xml` to support Android 16's promoted notification features.
- Enhanced `LiveUpdateTranslator` with a `generateCriticalShortText` helper to dynamically extract progress percentages or ETAs for the system status chip.
- Fixed Android 16 category filtering by forcing Live Updates into strictly valid categories (`PROGRESS` or `TRANSPORT`) to prevent OS blocking.
- Ensured original notification timestamps are preserved for accurate system-wide "time active" calculations.
- Updated `NotificationReaderService` to support hot-swapping between custom injection and native updates via shared preferences.
* feat(service): enhance Live Update processing and Android 16 compatibility
- **NotificationReaderService**: Implemented a more robust content hashing algorithm that tracks Title, Text, Progress (max, current, indeterminate), and Button Action states (e.g., Play to Pause transitions) to ensure accurate UI updates.
- **LiveUpdateTranslator**:
- Added support for large icons and picture extras in live updates.
- Improved media notification handling by suppressing progress bars that often persist in the background.
- Optimized category mapping (Progress vs. Transport) to comply with Android 16 ongoing promotion requirements.
- Updated `shortCriticalText` generation logic to prioritize media titles, percentages, or time ETAs for the Dynamic Island chip.
- Switched to native Android 16 APIs for promoted ongoing requests and short critical text injection.
* feat(settings): refactor Global Settings UI and update version
- Updated `versionName` to `0.5.0-alpha01`.
- Redesigned `GlobalSettingsScreen` to use consistent card-based layouts for all settings items.
- Replaced the "Native Live Updates" `ListItem` with a new standardized `SettingsSwitchItem` component.
- Improved UI spacing and styling across the settings screen, including unified icon background treatments.
- Simplified state management and click behavior for toggleable settings.
* Beta/0 5 0 (#190)
* Feat/color picker (#127)
* feat(theme): implement HSL color picker and enhanced lightness slider
- **New `CustomColorBottomSheet`**: Introduced a dedicated HSL (Hue, Saturation, Lightness) color picker with gradient sliders for precise theme color customization.
- **Enhanced `ColorsDetailContent`**:
- Overhauled the preset tab with an animated lightness slider that appears when a preset is selected.
- Improved the preset selection logic to maintain the "base" hue even when adjusting lightness to extreme white or black.
- Redesigned the "Custom" colors section to use the new HSL bottom sheet instead of a simple hex text field.
- Switched from simple circular bubbles to a more refined UI with selection rings and rounded-square transitions for active colors.
- **Improved Theme Creator State**:
- Implemented strict state clearing (nulling `currentEditingThemeId`) when exiting the creator to prevent state leakage between editing sessions.
- Updated save/apply dialog logic to ensure the UI resets correctly after persistence.
- **Shared Components**: Added `GradientSlider` and `ColorBubble` to `HyperOSColorPicker.kt` for reusable, stylized color selection components.
- **Localization**: Added missing string resources for color labels (Hue, Saturation, Lightness) in English and Spanish.
* #### feat(theme): implement advanced color modes and redesigned color picker
- **Color Modes**: Introduced a `ColorMode` system (`CUSTOM`, `APP_ICON`, `MATERIAL_YOU`) to replace the binary "Use App Colors" toggle. This allows themes to dynamically adapt to Material You system colors or extract colors from app icons globally and per-app.
- **Improved Color Picker**: Replaced standard text fields with a new `CustomColorBottomSheet` in the Call Style and Theme Creator screens, featuring a visual HSL-based selection and hex formatting.
- **UI & UX Refinement**:
- Redesigned `ColorsDetailContent` with a scrollable layout and new sections for dynamic color modes.
- Updated the Theme Creator preview to correctly reflect the active color mode.
- Standardized "My Theme" and "Share Theme" strings to use localized resources.
- **Data Persistence**: Updated `HyperTheme`, `GlobalConfig`, and `AppThemeOverride` models to support the new `ColorMode` enum while maintaining backward compatibility with legacy themes.
- **Theme Creator**: Refactored `ThemeViewModel` to handle more robust state initialization and migration when editing or creating new themes.
- **Tooling**: Added Crowdin configuration settings for the IDE.
* feat(widget): add favorites, recommended filtering, and update notice (#128)
- **Widget Picker**:
- Implemented a "Recommended" filter to highlight 1x4 and 2x4 layouts compatible with the Island size.
- Added a Favorite system for widget apps, allowing users to star apps for top-level sorting.
- Added a floating navigation bar to switch between Recommended and All widgets.
- Improved dimension display by converting DP to grid cell proportions (e.g., 4x2).
- **Saved Widgets**:
- Added a persistent "Update Notice" dialog to remind users to check Autostart/Battery permissions after an app update.
- Implemented a "Kill Active Widgets" action to instantly dismiss all running widget overlays.
- Redesigned the UI with a centered filter toolbar (Favorites vs. All) and a dedicated Add FAB.
- Added reactive listening for newly added widgets to ensure the list updates immediately.
- **Service & Data**:
- Enhanced `WidgetOverlayService` with specific `ACTION_KILL_WIDGET` and `ACTION_KILL_ALL_WIDGETS` handlers for immediate UI cleanup.
- Added `favoriteWidgetAppsFlow` to `AppPreferences` to persist starred widget providers.
- **Localization**:
- Added English and Spanish strings for filters, permission reminders, and widget management.
CLOSE #72
* feat(service): implement Native Android 16 Live Updates support
- Added `LiveUpdateTranslator` to transform standard notifications into native Android 16 promoted ongoing tasks using `android.requestPromotedOngoing` and `android.shortCriticalText`.
- Implemented a toggle in Global Settings to choose between custom Xiaomi Islands and native Android 16 Live Updates.
- Created a dedicated `hyper_bridge_live_update_channel` for native updates to manage notifications and visibility independently.
- Added `POST_PROMOTED_NOTIFICATIONS` permission to `AndroidManifest.xml` to support Android 16's promoted notification features.
- Enhanced `LiveUpdateTranslator` with a `generateCriticalShortText` helper to dynamically extract progress percentages or ETAs for the system status chip.
- Fixed Android 16 category filtering by forcing Live Updates into strictly valid categories (`PROGRESS` or `TRANSPORT`) to prevent OS blocking.
- Ensured original notification timestamps are preserved for accurate system-wide "time active" calculations.
- Updated `NotificationReaderService` to support hot-swapping between custom injection and native updates via shared preferences.
* feat(service): enhance Live Update processing and Android 16 compatibility
- **NotificationReaderService**: Implemented a more robust content hashing algorithm that tracks Title, Text, Progress (max, current, indeterminate), and Button Action states (e.g., Play to Pause transitions) to ensure accurate UI updates.
- **LiveUpdateTranslator**:
- Added support for large icons and picture extras in live updates.
- Improved media notification handling by suppressing progress bars that often persist in the background.
- Optimized category mapping (Progress vs. Transport) to comply with Android 16 ongoing promotion requirements.
- Updated `shortCriticalText` generation logic to prioritize media titles, percentages, or time ETAs for the Dynamic Island chip.
- Switched to native Android 16 APIs for promoted ongoing requests and short critical text injection.
* feat(settings): refactor Global Settings UI and update version
- Updated `versionName` to `0.5.0-alpha01`.
- Redesigned `GlobalSettingsScreen` to use consistent card-based layouts for all settings items.
- Replaced the "Native Live Updates" `ListItem` with a new standardized `SettingsSwitchItem` component.
- Improved UI spacing and styling across the settings screen, including unified icon background treatments.
- Simplified state management and click behavior for toggleable settings.
* Update changelog resource to v0.4.2
* build: update project dependencies and gradle configuration (#134)
- **Gradle & AGP**:
- Upgraded Android Gradle Plugin (AGP) from `8.13.2` to `9.1.0`.
- Upgraded Gradle wrapper from `8.13` to `9.3.1`.
- Added `foojay-resolver-convention` plugin to `settings.gradle.kts` for automated toolchain management.
- **Dependencies**:
- Updated Kotlin to `2.3.20` and KSP to `2.3.2`.
- Updated Compose BOM to `2026.03.00` and Material3 to `1.5.0-alpha15`.
- Updated various AndroidX libraries: `core-ktx` (`1.18.0`), `datastore-preferences` (`1.2.1`), `activity-compose` (`1.13.0`), and `ui` (`1.10.5`).
- Bumped `kotlinx-serialization-json` to `1.10.0`.
- **Build Configuration**:
- Removed `kotlin-android` plugin in favor of `kotlin-compose` and built-in Kotlin support.
- Removed explicit `jvmTarget` configuration in `app/build.gradle.kts`.
- Enabled several experimental/new Android Gradle properties in `gradle.properties`, including `android.builtInKotlin` and `android.newDsl`.
- **Optimization**:
- Updated `proguard-rules.pro` to strip Debug and Info logs in release builds using AGP 9.1+ syntax.
* Feature/ux iprovement global configuration (#137)
* feat(settings): redesign Global Settings and enhance Theme Engine
- **Global Settings UI**:
- Refactored `GlobalSettingsScreen` to use a card-based list layout with standardized `ListOptionCard` components.
- Split settings into dedicated screens: `EngineSettingsScreen`, `IslandSettingsScreen`, and `NavCustomizationScreen`.
- Added an "Engine" section to toggle between "Xiaomi Featured Design" and "Native Android Live Updates".
- Implemented a more granular "Island Behavior" configuration including an improved auto-hide timeout slider with snap points (1s to 1h).
- **Theme Engine**:
- Integrated "Engine", "Island Behavior", and "Notification Types" selection directly into the Theme Creator flow.
- Added a real-time `EnginePreview` component to visualize differences between Xiaomi and Native Live Update designs.
- Added a "Notification Types" manager to toggle triggers for Standard, Progress, Media, Navigation, Call, and Timer events.
- **Functionality & Fixes**:
- **Crash Fix**: Resolved a critical issue causing the app to crash when opening settings in Traditional Chinese.
- Updated `AppPreferences` to support persistent storage for the native notification engine toggle.
- Improved `ThemeViewModel` with a more efficient bitmap scaling method for theme thumbnails.
- Updated `StandardTranslator`, `NavTranslator`, and `ProgressTranslator` to better respect global timeout and dismissal configurations.
- Set the default notification shade visibility to `false` for a cleaner "Island-only" experience by default.
- **Localization**:
- Added extensive string resources for version 0.4.2 hotfix and new engine settings across multiple languages (SK, PL, RU, ZH-TW, TR, UK, PT-BR, CS, DE, HU, IN, IT, KO, ES).
- Fixed several translation issues in Traditional Chinese and Spanish.
* feat(settings): externalize and localize auto-hide island strings
- **UI**: Refactored `IslandSettingsControl.kt` to use `stringResource` instead of hardcoded strings for the Auto-hide Island feature.
- **Localization**:
- Added new string resources (`auto_hide_island`, `hides_after_a_set_time`, `behavior_hide_desc`, `behavior_desc_hide_long`) to multiple locales: Slovak, Polish, Russian, Traditional Chinese, Turkish, Ukrainian, Portuguese (Brazil), Czech, German, Indonesian, Italian, Korean, Spanish, and Hungarian.
- Updated Spanish translations for behavior and trigger settings.
- Standardized ellipsis usage from `…` to `...` in Portuguese (Brazil) and Korean `strings.xml`.
* build: update version and remove redundant material3 dependency
- Updated `versionName` to `0.5.0-alpha02`.
- Removed explicit `androidx-material3` dependency from `libs.versions.toml` and `app/build.gradle.kts` (now managed via Compose BOM).
* feat(localization): add French (France) translation
- Added complete French localization (`strings.xml`) for the entire application.
- Translated all core UI components, including onboarding, settings, library, and about screens.
- Localized complex features such as the Theme Engine, Backup & Restore, and the new Notification Engine settings.
- Provided French translations for all historical changelogs (v0.1.0 through v0.4.2).
- Included localized string arrays for specific notification keyword matching (navigation, calls, and progress updates).
* feat(theme): implement layered app-specific behavior overrides
- **Notification Service**:
- Implemented a layered resolution system (Theme > App > Global) for notification triggers and engine selection.
- Updated `NotificationReaderService` to respect theme-managed app configurations and simplified processing logic.
- Enhanced `LiveUpdateTranslator` to support themed colors and icons for the Native Live Update engine, specifically for navigation events.
- Improved title and text resolution with smarter fallback mechanisms and content hashing for updates.
- **Theme Engine & Editor**:
- Added app-specific behavior overrides to the Theme Creator, allowing per-app configuration of notification types and engine selection (Xiaomi vs. Native).
- Integrated "Engine", "Island Behavior", and "Notification Types" into the App Theme Editor.
- Added `AppNotificationTypesEditor` for granular control over which event types (Standard, Media, Nav, etc.) trigger the island for specific apps.
- Refactored `EngineThemeContent` to support an optional "Use Global Default" state.
- **UI & Settings**:
- Redesigned the "Notification Types" settings using `SettingsToggleCard` for a more consistent card-based look.
- Added a theme-managed warning to the App Settings dialog when behaviors are controlled by an active theme.
- Externalized and localized several strings related to triggers and engine management.
- Added French language support to the locale selector.
- **Technical Improvements**:
- Introduced `ConfigResolver` for fast, in-memory resolution of effective configurations for translators.
- Updated `AppPreferences` and `ThemeRepository` to support persistent storage of per-app engine and trigger overrides.
- Standardized navigation layout resolution to respect layered preferences (Global Fallback vs. App-Specific).
* feat(localization): add trigger configuration and override strings
- **Localization**: Added new string resources for "Active Triggers", "Trigger Override", and "Notification Engine" configuration across multiple locales (SK, PL, RU, FR, ZH-TW, TR, UK, PT-BR, CS, DE, IN, IT, KO, HU).
- **Strings**:
- Added descriptions for notification types: Standard, Progress, Media, Navigation, Call, and Timer.
- Added UI strings for global trigger settings and per-app overrides.
- Added `managed_by_theme_desc` and `use_global_default_engine` to support theme-based behavior logic.
- **Cleanup**: Removed unused mock engine strings (`engine_mock_charging`, `engine_mock_percentage`, etc.) from all translated `strings.xml` files.
* feat(theme): enhance engine resolution and theme-persistent configuration (#147)
- **Notification Service**:
- Refactored `getEffectiveEngine` in `NotificationReaderService` to implement a 4-tier resolution priority: Theme App Override > User App Override > Theme Global Override > User Global Fallback.
- **Theme Engine & Editor**:
- **Global Settings**: Added `use_native_live_updates` to `GlobalConfig` model, allowing themes to define a default engine for all apps.
- **Persistence**: Fixed an issue where changing the engine via the UI while a custom theme was active would not persist; it now correctly patches the active Theme JSON.
- **Theme Creator**:
- Updated `ThemeViewModel` to correctly load and save the global engine selection to the Theme JSON.
- Fixed a bug where existing call configurations were wiped when updating app-specific live update settings.
- Improved state management by making `themeUseNativeLiveUpdates` nullable to support inheritance.
- **UI & Settings**:
- **Engine Settings**: Refactored `EngineSettingsScreen` to use `AppPreferences` and `ThemeRepository` instead of raw `SharedPreferences`.
- Integrated real-time engine updates by sending `ACTION_RELOAD_THEME` to the background service upon configuration changes.
- Standardized UI spacing and typography in the Engine selection screen.
- **Bug Fixes**:
- Fixed a bug in `AppListViewModel` where app-specific engine overrides were not being saved to the active theme if the override didn't already exist.
- Corrected `@StringRes` annotation usage in `ShapeOption` enum.
* build: update version to 0.5.0-alpha03 and update localizations
- **Build**: Bumped `versionCode` to `17` and `versionName` to `0.5.0-alpha03` in `app/build.gradle.kts`.
- **Localization**:
- **French (FR)**: Completed translations for the "Engine" configuration, "Island Behavior", and "Active Triggers" sections. Updated backup and app configuration strings.
- **Italian (IT)**: Translated the v0.4.2 changelog, engine settings, color labels, and navigation arrival keywords.
- **Traditional Chinese (ZH-TW)**: Fully localized the new Engine, Behavior, and Trigger settings. Refined onboarding and permission strings (e.g., "HyperIsland" to "超級島").
- **Hungarian (HU)**: Localized engine settings, behavior controls, trigger descriptions, and the v0.4.2 hotfix changelog. Updated call-related keywords.
- **Portuguese (Brazil)**: Translated the v0.4.2 changelog, color labels, and UI state strings (Recommended, Favorites, All). Updated navigation arrival keywords.
- **Strings**: Standardized engine configuration keys across all modified locales to support the transition between "Xiaomi Featured Design" and "Native Android Live Updates".
* loc(fr): fix apostrophe escaping in French strings
- Updated `island_behavior_desc` and `engine_timeouts_triggers` in the French (`fr-rFR`) `strings.xml` to properly escape apostrophes, ensuring correct XML parsing and display.
* Feature/nav3 migration (#152)
* build: integrate Navigation 3 and refactor app routing
- **Dependencies**: Added `androidx.navigation3` (runtime and UI) and `androidx-lifecycle-viewmodel-navigation3` to `libs.versions.toml` and `app/build.gradle.kts`.
- **Navigation Framework**:
- Introduced `NavigationState` to manage persistent back stacks for top-level routes (Onboarding and Home).
- Implemented a `Navigator` class to abstract forward and backward navigation logic using Navigation 3 APIs.
- Replaced the manual `Screen` enum and `AnimatedContent` router with a `@Serializable` sealed interface and `NavDisplay`.
- **Routing & State**:
- Refactored `MainActivity` to use `entryProvider` for screen definitions, simplifying navigation calls across the app.
- Updated screen transitions to leverage `NavDisplay`'s built-in handling of the back gesture and entry management.
- Improved data passing between screens (e.g., `ImportPreview` and `NavCustomization`) by using type-safe classes in the `Screen` sealed interface.
- **Models**: Added `@Serializable` annotations to backup-related models (`HyperBridgeBackup`, `BackupMetadata`, `AppSettingBackup`) to support type-safe navigation arguments.
- **UI**: Standardized back-button behavior across all settings and configuration screens to use the new `Navigator.goBack()` method.
* refactor(navigation): modularize and relocate navigation logic
- **Navigation Architecture**:
- Created a new `com.d4viddf.hyperbridge.ui.navigation` package to house navigation-related components.
- Moved `Screen` definition from `MainActivity.kt` to its own file `Screen.kt`, maintaining `@Serializable` support for all application routes.
- Relocated `NavigationState.kt` and `Navigator.kt` to the new navigation package and updated their package declarations accordingly.
- **MainActivity**:
- Cleaned up imports and removed inline `Screen` interface definition to use the new modularized navigation components.
- Updated references to use `toEntries` and other navigation extension functions from the new package.
* refactor(navigation): modularize nav graph and enhance back press handling
- **Navigation**:
- Extracted the main navigation graph from `MainActivity.kt` into a new standalone `mainNavGraph` function in `NavGraph.kt` to improve maintainability.
- Updated `Navigator.goBack()` to return a boolean indicating if the back event was handled, allowing for better control over app exit logic.
- Integrated `BackHandler` in `MainActivity` to properly handle system back gestures and call `onExit` when at the root of the navigation stack.
- **MainActivity**:
- Refactored `MainRootNavigation` into smaller, more focused composables (`MainRootNavigation` and `MainNavigationContent`).
- Improved the initialization flow to show a `CircularProgressIndicator` while the setup status is being loaded from preferences.
- Simplified the logic for switching between `Onboarding` and `Home` routes based on the setup completion state.
- **UI**: Standardized back navigation behavior across all screens, ensuring consistent exit behavior from the `Info` screen.
* feat(ui): implement custom navigation transitions and predictive back support
- **Navigation**:
- Added custom `transitionSpec` and `popTransitionSpec` using horizontal slides and fades for smoother screen transitions.
- Implemented `predictivePopTransitionSpec` to support Android's predictive back gesture with scaling and transform origin adjustments based on swipe edge.
- Dynamically updated `topLevelRoutes` to prevent navigating back to the onboarding flow once setup is complete.
- **UI**:
- Applied a rounded corner clip (32.dp) to the main `NavDisplay` container.
- Optimized transition durations to 400ms for a more fluid user experience.
* chore: code cleanup, dependency update, and UI refinements
- **UI & UX**:
- **Widget Picker**: Refactored `WidgetPickerScreen` and removed `WidgetPickerViewModel.kt` to streamline widget selection logic. Updated layout filtering to consistently use `targetCellWidth` and `targetCellHeight`.
- **Theme Creator**: Improved navigation and state management in `ThemeCreatorScreen` and `AppThemeEditorScreen`. Enhanced UI consistency for color and icon selection previews.
- **Licenses**: Updated `LicensesScreen` to dynamically load a sorted list of open-source libraries and externalized the screen title string.
- **Components**: Standardized `EmptyState` component parameters and improved layout logic in `WidgetConfigScreen` and `SavedAppWidgetsScreen`.
- **Localization**:
- Added `open_source_licenses` string resource.
- Refactored `WidgetConfigScreen` to use localized toast and error messages.
- **Translators**:
- **Standard**: Cleaned up title resolution logic in `StandardTranslator`.
- **Progress**: Updated `ProgressTranslator` to hide redundant percentage text in specific circular progress views.
- **Internal Improvements**:
- **Compatibility**: Removed redundant SDK version checks for `Parcelable` handling and notification permissions, favoring modern Android APIs.
- **Utilities**: Switched to `androidx.core` extension functions for `Bitmap` creation and `Uri` parsing.
- **Persistence**: Updated `SavedAppWidgetsScreen` to use the `edit { }` DSL for `SharedPreferences`.
- **Data**: Refined theme ID generation in `ThemeRepository` and improved rule engine comments.
- **Bug Fixes**:
- Fixed a potential nullability issue in `AppListViewModel` when patching theme configurations.
- Corrected `IslandConfig` initialization in the App Settings dialog.
* Feature/duplication toggle (#153)
* feat(settings): enhance island behavior with heads-up timeout and notification management
- **Island Configuration**:
- Introduced `floatTimeout` to `IslandConfig` to control the duration of heads-up popups.
- Added `removeOriginalNotification` toggle to allow automatic dismissal of source notifications when a Live Update is active.
- Updated `AppPreferences` and `AppSettings` to support persistent storage for these new global and per-app settings.
- **UI & Settings**:
- **Island Settings**: Redesigned the "Heads-up Popup" configuration with an animated slider for granular timeout control (1s to 30s).
- **Live Updates**: Added a new section in `IslandSettingsControl` to manage the removal of original notifications.
- Improved UI scrollability in `IslandSettingsScreen` and added several Compose previews for better development feedback.
- Refactored toggle logic to ensure consistency between heads-up and timeout states.
- **Translators**:
- Updated all translators (`Media`, `Call`, `Progress`, `Standard`, `Nav`, `Timer`) to respect the new `expandedTimeMs` (heads-up timeout) configuration.
- Cleaned up redundant theme color application logic in `TimerTranslator`.
- **Localization**:
- Added string resources for "Live updates", "Remove original notification", and "Heads-up popup" timeout descriptions.
* feat(service): implement notification timeout and original notification removal
- **Notification Service**:
- Introduced a `handlePostNotificationSideEffects` method to manage post-processing logic for translated notifications.
- Added support for automatically cancelling the original system notification when `removeOriginalNotification` is enabled in the configuration (excluding Media notifications). fixes #21, fixes #120, fixes #146
- Implemented a timeout mechanism using coroutines to automatically dismiss translated notifications after a configured duration.
- Added `intentionallyRemovedKeys` tracking to prevent recursive processing loops when the service cancels a system notification.
- Improved cleanup logic in `onNotificationRemoved` and `cleanupCache` to ensure associated timeout jobs are cancelled and resources are freed.
- **Bug Fixes**:
- Added missing cancellation of existing processing jobs and timeout jobs when a notification is removed or updated.
- **Logic Improvements**:
- Improved design logic for new notification parameters ( closes #99) and add theme configuration ( closes #107)
* fix(service): refine notification timeout logic and dismissal behavior
- **Notification Service**:
- Modified `onStartCommand` to use non-nullable `Intent` parameters for better type safety.
- Updated notification removal logic to ensure the source notification is no longer canceled when the Island notification is dismissed or times out.
- Refactored `handlePostNotificationSideEffects` to only apply timeout scheduling to "Live Update" notifications.
- Improved cache cleanup and logging during notification dismissal to prevent unintended side effects on source notifications.
* Feature/onboarding screen (#155)
* feat(ui): redesign onboarding flow and expand configuration options
- **Onboarding Experience**:
- Significantly expanded the onboarding process from 7 to 11 pages, incorporating new configuration steps for triggers, engine selection, and island behavior.
- Redesigned the `OnboardingScreen` layout with improved navigation controls, including a dedicated "Back" button and a more prominent "Get Started" entry point.
- Added several new pages: `TriggersConfigPage` (active notification types), `PriorityEducationPage` (island limit behavior), `BehaviorConfigPage` (notification removal and shade visibility), `CustomizationPage` (themes and widgets), and `EngineConfigPage` (Xiaomi vs. Native Live Updates).
- Integrated `ModalBottomSheet` for granular settings configuration directly within the onboarding flow.
- Added extensive Compose previews for all onboarding pages to improve development feedback.
- **Data & Logic**:
- **AppPreferences**: Implemented a migration check to force an onboarding reset for users upgrading to version 0.5.0 (versionCode 17).
- **MainActivity**: Removed the standalone `PriorityEducationDialog` as its logic is now integrated into the onboarding flow.
- **Build Configuration**: Enabled `buildConfig` in `app/build.gradle.kts` and updated the Kotlin serialization plugin version.
- **Localization & Resources**:
- **Strings**:
- Standardized and updated terminology across multiple languages (ES, HU, IT, ZH-TW, SK, CS, TR, DE, PT, KO, FR, UK, RU, ID).
- Added new string resources for the expanded onboarding descriptions, "Live updates" management, and "Remove original notification" toggles.
- Refined French strings to ensure proper apostrophe escaping and formatting.
- Simplified and updated battery optimization instructions ("Allow Autostart", "Disable Restrictions").
- **Icons**: Switched to modern Rounded/Filled icon variants for a more consistent visual style across the setup pages.
* feat(onboarding): implement auto-hide configuration page
- **Onboarding Flow**:
- Expanded the onboarding process from 11 to 13 pages to include more granular behavior settings.
- Introduced a dedicated `AutoHideConfigPage` to manage island timeout settings during initial setup.
- Updated `BehaviorConfigPage` description to reflect its role in global configuration.
- **UI & Components**:
- Added an interactive "Auto-hide Island" section with a `Switch` and an `AnimatedVisibility` slider for timeout selection.
- Exposed `timeoutSteps` and `formatSeconds` from `IslandSettingsControl.kt` to be reusable across the onboarding flow.
- Integrated `Icons.Rounded.Timer` and `Icons.Default.AccessTime` for improved visual cues in behavior settings.
- **State Management**:
- Updated `OnboardingScreen` to persist `IslandConfig` timeout and `isFloat` preferences directly through `AppPreferences`.
- **Localization**:
- Added `behavior_desc_glob_config` string resource for better description of island behavior settings.
* chore: bump version to 0.5.0-beta01 and refine onboarding navigation
- **Build**:
- Updated `versionCode` to `18` and `versionName` to `0.5.0-beta01` in `app/build.gradle.kts`.
- **Navigation**:
- **Navigator**: Introduced `finishOnboarding` to explicitly handle the transition from onboarding to the home screen by ensuring the home stack is initialized before clearing the onboarding route, preventing potential app closure.
- **MainActivity**: Refactored `navigationState` initialization to use a persistent set of all possible top-level routes and a fixed initial start route.
- **NavGraph**: Updated setup completion logic to use the new `navigator.finishOnboarding` method and removed redundant priority education flags.
- **Onboarding**:
- Refactored `OnboardingScreen` to dynamically determine the last page using `pagerState.pageCount` instead of a hardcoded index.
- **Data & Persistence**:
- **AppPreferences**: Updated the onboarding reset logic to target `versionCode 18` for version 0.5.0, forcing a setup reset for users on older builds.
* chore: general cleanup, bug fixes, and maintenance
- **UI & Components**:
- Removed several legacy dialogs and components: `ChangelogDialog`, `PriorityEducationDialog`, and `DeviceCompatibility`.
- Simplified `CommonCards.kt` by removing `ExpandableOptimizationCard` and localized logic.
- Refactored `HyperOSColorPicker` to remove unused `ColorBubble` component.
- Added `verticalScroll` to `ThemeSettingsContent` to improve navigation on smaller screens.
- Updated `IslandSettingsControl` and `IslandSettingsScreen` to use explicit `IslandConfig` initialization.
- Added a content description for the widget snapshot layout.
- **Notification Service & Logic**:
- Refactored `NotificationReaderService` and `LiveUpdateTranslator` to improve string handling and reliability when resolving notification titles/text.
- Enhanced exception handling across the service and data layers using suppressed exceptions (`catch (_: Exception)`) to reduce log noise.
- Improved app label caching and package filtering logic.
- **Data & Persistence**:
- Cleaned up `AppPreferences` by removing the unused `isPriorityEduShown` flow.
- Refactored `ThemeRepository` to use a lowercase tag and improved error logging for theme installation and resource loading.
- Updated `AppCacheManager` and `WidgetPickerScreen` for better state management and type safety.
- **Resources & Localization**:
- **Icons**: Added monochrome support to adaptive launcher icons and moved them to the standard `mipmap-anydpi` directory.
- **Strings**:
- **PT-BR**: Updated widget ID formatting.
- **FR**: Simplified application configuration descriptions.
- **General**: Added `widget_layout_snapshot` resource.
- **Build & System**:
- Updated Gradle wrapper from `9.3.1` to `9.4.1`.
- Refactored `DeviceUtils` for cleaner system property checks.
- Updated `AndroidManifest` with improved package visibility policy ignores.
- Cleaned up `ThemeInstallerActivity` by removing redundant SDK version checks for dynamic color schemes.
* chore(manifest): add notification listener permission
- **Permissions**:
- Added `BIND_NOTIFICATION_LISTENER_SERVICE` to `AndroidManifest.xml` to support notification listener capabilities.
- Applied `tools:ignore="ProtectedPermissions"` to acknowledge the use of the protected system permission.
* fix(service): refine progress notification behavior and navigation state (#157)
- **Notification Service & Translators**:
- **ProgressTranslator**:
- Modified `translate` to accept an `isUpdate` flag.
- Restricted "floating" behavior to the initial notification appearance only, preventing subsequent progress updates from re-triggering the float animation.
- Refined `BigIslandInfo` layout for finished progress states by simplifying `ImageTextInfoLeft` and `ImageTextInfoRight` parameters (removing redundant text info).
- Removed redundant `setIslandFirstFloat` call.
- **NotificationReaderService**: Updated `PROGRESS` type handling to pass the `isUpdate` state to the translator.
- **UI & Navigation**:
- **MainActivity**: Added `isSetupComplete` as a key to `remember` blocks for `initialStartRoute` and `allPossibleTopLevel` to ensure navigation state correctly reacts to setup completion changes.
Closes #156
* feat(boot): add support for Direct Boot (#159)
- **Boot Receiver**:
- Updated `BootReceiver.kt` to handle `ACTION_LOCKED_BOOT_COMPLETED`, allowing the app to respond to boot events before the first user unlock.
- Added `android.intent.action.LOCKED_BOOT_COMPLETED` to the `BootReceiver` intent filter in `AndroidManifest.xml`.
fixed #158
* chore(localization): update and expand string resources across multiple languages
- **Strings & Localization**:
- **General**: Added new string resources `behavior_desc_glob_config` (island behavior description) and `widget_layout_snapshot` (widget preview) across all supported locales.
- **Spanish (ES)**: Added translations for floating notification timeouts, open source licenses, live updates, and original notification removal.
- **French (FR)**: Fully localized several strings including floating notification settings, live updates, onboarding descriptions, and behavior configurations.
- **Traditional Chinese (ZH-TW)**: Localized onboarding descriptions for widgets, themes, and customization options.
- **Portuguese (PT-BR)**: Simplified the `widget_id_fmt` string from "Widget #%d" to "Widget".
- **New Keys**: Added placeholder or translated entries for `setting_float_timeout_desc`, `open_source_licenses`, `live_updates`, and `remove_original_notification` logic in relevant resource files.
* chore(changelog): update for version 0.5.0-beta
- **UI & Navigation**:
- Updated `ChangelogHistoryScreen` to include version `0.5.0` at the top of the history list.
- Updated `MainActivity` to display the `0.5.0-beta` changelog in the main `ChangelogSheet`.
- **Resources & Localization**:
- Added `changelog_0_5_0_beta` string containing release notes for Native Live Updates, HyperOS CN support, new Theme Engine features (HSL selector, behavior controls), and system fixes.
- Added `title_0_5_0` string resource ("The Live Update").
* chore: update version metadata to 0.5.0
- **Changelog**:
- Updated `ChangelogHistoryScreen` to mark version `0.5.0` as the latest release and downgraded `0.4.2` to historical status.
- **Application Versioning**:
- Updated the fallback `currentVersionName` in `MainActivity` from `0.4.2` to `0.5.0`.
* refactor(service): refine floating behavior for progress notifications (#164)
- **Notification Logic**:
- Updated `ProgressTranslator` to restrict the floating behavior (`setEnableFloat`) to only the initial appearance of a notification, preventing repeated floats during updates.
- Removed the redundant `setIslandFirstFloat` call from the builder.
close #163
* Fix/162 bug crash unable to start service with null (#165)
* fix(service): handle nullable intent in onStartCommand
- **Notification Service**:
- Updated `onStartCommand` signature to accept a nullable `Intent` to prevent potential crashes when the service is restarted by the system.
- Implemented null-safe checks for `intent.action` when processing test widgets and theme reloads.
fixed #162
* feat(service): implement localized error messages for persistent notifications
- **Notification Service**:
- Updated `NotificationReaderService` to use localized string resources for fallback content text in both standard and widget notifications.
- Replaced the hardcoded "Active Island" text with `R.string.notification_went_wrong`.
- Replaced the hardcoded "Active" widget text with `R.string.widget_went_wrong`.
- **Resources**:
- Added `notification_went_wrong` and `widget_went_wrong` string resources to provide clearer feedback when notifications or widgets fail to render correctly.
* chore: update changelog string formatting
- **Resources**:
- Refactored `changelog_0_5_0_beta` in `strings.xml` to use HTML `<b>` tags instead of markdown-style bolding for better compatibility with Android string rendering.
- Improved indentation and formatting of the changelog text within the resource file.
* chore: bump version to 0.5.0-beta02 and refine changelog trigger logic
- **Build**:
- Updated `versionCode` to `19` and `versionName` to `0.5.0-beta02` in `app/build.gradle.kts`.
- **Navigation & Lifecycle**:
- **NavGraph**: Removed redundant `setLastSeenVersion` call during onboarding completion to centralize version tracking.
- **MainActivity**:
- Refined the changelog display logic to prevent it from appearing immediately after initial onboarding.
- Improved `lastSeenVersion` state handling by using a more reliable initial value (`-1`) to ensure version comparisons only trigger after the preference is properly loaded.
- Introduced `isInitiallySetup` check to distinguish between fresh installations and application updates.
* chore: update localizations and refine progress translation logic
- **Localization & Resources**:
- **Spanish (ES)**: Translated several core strings, including "Live updates," "Open source licenses," and "Island behavior" descriptions.
- **Indonesian (ID)**: Extensively updated translations for UI controls, navigation keywords (arrival, destination), and system permission descriptions.
- **Italian (IT)** and **Traditional Chinese (ZH-TW)**: Completed translations for onboarding descriptions and behavior settings.
- **General**: Added the `0.5.0-beta` changelog, version title, and error fallback strings (`notification_went_wrong`, `widget_went_wrong`) across all supported languages (ES, HU, IT, ZH-TW, SK, CS, TR, DE, PT, KO, FR, UK, PL, RU, ID).
- **Notification Service**:
- **ProgressTranslator**: Refactored `setIslandConfig` in the progress update logic to only apply `expandedTimeMs` (float timeout) if the floating notification setting is explicitly enabled, improving consistency with user preferences.
* chore(manifest): remove redundant notification listener permission
- **Permissions**:
- Removed the `BIND_NOTIFICATION_LISTENER_SERVICE` permission from `AndroidManifest.xml`.
- Removed the associated `tools:ignore="ProtectedPermissions"` attribute.
* Fix WidgetManager initialization and Shizuku implementation
Closes #97
Closes #119
Closes #141
Closes #177
* chore(manifest): remove redundant notification listener permission
- **Permissions**:
- Removed the `BIND_NOTIFICATION_LISTENER_SERVICE` permission from `AndroidManifest.xml`.
- Removed the associated `tools:ignore="ProtectedPermissions"` attribute.
* chore: bump version to 0.5.0-beta04 and refine Shizuku workaround
- **Build**:
- Updated `versionCode` to `21` and `versionName` to `0.5.0-beta04` in `app/build.gradle.kts`.
- **Shizuku & Notifications**:
- **ShizukuManager**: Refactored the `notify` logic to improve the reliability of the XMSF network workaround on MIUI/HyperOS.
- Introduced a `Mutex` to prevent race conditions during concurrent notification dispatches.
- Added a 50ms delay after disabling XMSF to ensure the network state change takes effect.
- Implemented a 1-second delayed restoration of XMSF network, which is reset by subsequent notifications to prevent premature re-enabling.
- Added `@RequiresPermission` annotation for `POST_NOTIFICATIONS`.
- **Resources & Localization**:
- **Changelog**: Updated `changelog_0_5_0_beta` to include information regarding CN Support and the new Shizuku workaround.
- **Traditional Chinese (ZH-TW)**: Refined the `enable_autostart` string for better clarity ("開啟後台啟動管理").
* Feature/permanent island (#179)
* feat: implement Permanent Island feature and enhance Shizuku notification handling
- **Permanent Island**:
- Introduced a "Permanent Island" feature that keeps a placeholder Dynamic Island visible when no active notifications are present.
- Added `PermanentIslandManager` to coordinate visibility based on the `activeIslands` count within `NotificationReaderService`.
- Added `isPermanentIslandEnabledFlow` and `permanentIslandWidthFlow` to `AppPreferences` to persist user configuration.
- Implemented `PermanentIslandConfigPage` in the onboarding flow and a dedicated settings screen.
Closes #94
- **Shizuku & Notifications**:
- **ShizukuManager**: Added a `cancel` function that applies the XMSF network workaround (disabling/enabling XMSF network with a delay) when programmatically removing notifications to ensure consistency on MIUI/HyperOS.
- **NotificationReaderService**: Integrated `PermanentIslandManager` to trigger updates whenever notifications are posted or removed.
- **Lifecycle & System**:
- **BootReceiver**: Added `ACTION_MY_PACKAGE_REPLACED` to the intent filter in `AndroidManifest.xml` and handled it in the receiver to ensure the service restarts correctly after app updates.
- **UI & Navigation**:
- **GlobalSettingsScreen**: Added an entry point for Permanent Island settings and updated the expressive shape logic to accommodate the additional list item.
- **NavGraph**: Defined the route and destination for `PermanentIslandConfig`.
- **Previews**: Updated `@Preview` annotations across onboarding components to use `apiLevel = 36`.
- **Resources & Localization**:
- Added strings for "Permanent Island" titles, descriptions, and width controls in English and Spanish (ES, ES-rEM).
- Refined the `shizuku_workaround_title` string for better clarity.
* feat: implement Permanent Island feature and configuration UI
- **Permanent Island Logic**:
- Introduced `PermanentIslandManager` to manage a persistent, "empty" island state when no other active notifications are present.
- Implemented logic to automatically show/hide the permanent island based on the current notification count and user preferences.
- Utilizes `ShizukuManager` to dispatch a non-dismissible, low-priority notification that uses non-breaking spaces (`\u00A0`) to simulate variable island widths.
- **Settings UI**:
- Created `PermanentIslandConfigScreen` providing users with a toggle to enable the feature and a slider to adjust the island's width.
- Integrated `AppPreferences` flows to reactively update the UI and service state.
- **Components**:
- Developed `PermanentIslandPreview`, a Compose component that provides a real-time visual mock-up of the island's appearance on a status bar, featuring smooth width animations via `animateDpAsState`.
* docs: Add permanent island feature to changelog
* chore: Update .gitignore to exclude build artifacts and IDE configs
* chore: Update .gitignore to standard Android Jetpack Compose template
* chore: initialize project configuration, dependency versions, and ignore rules
* feat: introduce dedicated Download notification type and refine progress parsing (#184)
- **Notifications & Services**:
- **NotificationType**: Added a new `DOWNLOAD` type to separate file transfers from general `PROGRESS` tasks. Close #174
- **NotificationReaderService**:
- Integrated `DownloadTranslator` to handle download-specific notification logic.
- Implemented `isDownloadNotification` and `hasProgressNotification` to smarter distinguish between types based on package names, channel IDs, and keywords.
- Added logic to implicitly enable `DOWNLOAD` if `PROGRESS` is active for a specific app to ensure backward compatibility.
- **Translators**:
- **BaseTranslator**: Introduced `extractTextPercentage` to parse progress values (e.g., "12%") from notification titles or text.
- **ProgressTranslator**: Updated to support text-based percentages and refined indeterminate state handling.
- **LiveUpdateTranslator**: Added fallback to text-based percentage parsing for system-native animations.
- **CallTranslator**: Switched to `getCharSequence` for retrieving notification titles for better compatibility.
- **Data & Migration**:
- **AppPreferences**: Implemented a migration routine (`download_type_migration_complete`) that automatically adds the `DOWNLOAD` type to global and app-specific settings if `PROGRESS` was previously enabled.
- **UI & Resources**:
- **Theme & Onboarding**:
- Updated `ThemeSettingsContent` and `OnboardingScreen` to reflect the split between Progress and Downloads.
- Updated icons: `HourglassEmpty` for Progress and `CloudDownload` for Downloads.
- **Localization**:
- Refined strings in English and Spanish to distinguish between "Progress & Tasks" and "Downloads."
- **Changelog**: Updated `changelog_0_5_0_beta` with details regarding CN support, the new Download type, text-based progress support, and smart filtering.
* feat: implement DownloadTranslator and expand configuration resources
- **Translators**:
- Introduced `DownloadTranslator` to provide specialized handling for file transfer notifications, separating them from general progress tasks.
- Implemented logic in `DownloadTranslator` to handle indeterminate states, percentage-based progress, and completion detection via keywords or 100% threshold.
- Added support for custom completion icons ("tick_icon") and automated timeout/dismissible configurations for finished downloads.
- **Resources & Localization**:
- **Permanent Island**: Added strings for titles, descriptions, and width adjustment controls across multiple locales (ID, FR, TR, CS, IT, UK, DE, ZH-TW, PT-BR, RU, SK, ES, PL, KO, HU).
- **Shizuku Workaround**: Added localized strings to guide users through enabling the Shizuku workaround, specifically for improved notification triggering on CN ROMs.
- **Do Not Disturb (DND)**: Introduced strings for managing island visibility during DND, including manual pause and auto-detection of system DND status.
- **Type Refinement**: Updated `type_progress` and `type_download` strings to clearly distinguish between "Progress & Tasks" (ongoing operations) and "Downloads" (file transfers).
- **Changelog**: Updated `changelog_0_5_0_beta` in all languages to detail CN support, native live updates, theme engine improvements (HSL selector), and the new Permanent Island feature.
* Feature/sui permission (#185)
* feat(shizuku): implement support for Sui permissions and detection
* chore(i18n): extract hardcoded onboarding text and add Spanish translations for Shizuku and DND strings
* chore(i18n): translate permanent island strings to Spanish
* Fix/widget permanent island (#186)
* fix(permanent-island): hide permanent island when a widget is active
* feat(ui): add shizuku workaround toggle to engine theme page
* Feature/better icons (#187)
* fix(notifications): tint dark icons, extract messaging avatars, fix update popups
* fix(notifications): allow group summaries with text to trigger islands
* fix(notifications): completely remove GROUP_ALERT_CHILDREN check for summaries
* fix(notifications): ensure sequential execution of cancel and notify to prevent race conditions dropping islands
* fix(notifications): use sender_person key for MessagingStyle avatar extraction
* chore: bump version to 0.5.0-beta05 and update dependencies
- **Build Configuration**:
- Updated `versionCode` to 22 and `versionName` to `0.5.0-beta05`.
- Updated Kotlin serialization plugin to 2.3.21.
- **Dependencies**:
- **Kotlin & Serialization**: Updated Kotlin to 2.3.21 and `kotlinxSerializationJson` to 1.11.0.
- **Compose**: Updated `composeBom` to 2026.05.01 and Compose UI to 1.11.2.
- **Libraries**:
- Updated `gson` to 2.14.0.
- Updated `nav3` to 1.1.2.
---------
Co-authored-by: David Df <abdldaviddom@gmail.com>
* Beta/0 5 0 (#191)
* Feat/color picker (#127)
* feat(theme): implement HSL color picker and enhanced lightness slider
- **New `CustomColorBottomSheet`**: Introduced a dedicated HSL (Hue, Saturation, Lightness) color picker with gradient sliders for precise theme color customization.
- **Enhanced `ColorsDetailContent`**:
- Overhauled the preset tab with an animated lightness slider that appears when a preset is selected.
- Improved the preset selection logic to maintain the "base" hue even when adjusting lightness to extreme white or black.
- Redesigned the "Custom" colors section to use the new HSL bottom sheet instead of a simple hex text field.
- Switched from simple circular bubbles to a more refined UI with selection rings and rounded-square transitions for active colors.
- **Improved Theme Creator State**:
- Implemented strict state clearing (nulling `currentEditingThemeId`) when exiting the creator to prevent state leakage between editing sessions.
- Updated save/apply dialog logic to ensure the UI resets correctly after persistence.
- **Shared Components**: Added `GradientSlider` and `ColorBubble` to `HyperOSColorPicker.kt` for reusable, stylized color selection components.
- **Localization**: Added missing string resources for color labels (Hue, Saturation, Lightness) in English and Spanish.
* #### feat(theme): implement advanced color modes and redesigned color picker
- **Color Modes**: Introduced a `ColorMode` system (`CUSTOM`, `APP_ICON`, `MATERIAL_YOU`) to replace the binary "Use App Colors" toggle. This allows themes to dynamically adapt to Material You system colors or extract colors from app icons globally and per-app.
- **Improved Color Picker**: Replaced standard text fields with a new `CustomColorBottomSheet` in the Call Style and Theme Creator screens, featuring a visual HSL-based selection and hex formatting.
- **UI & UX Refinement**:
- Redesigned `ColorsDetailContent` with a scrollable layout and new sections for dynamic color modes.
- Updated the Theme Creator preview to correctly reflect the active color mode.
- Standardized "My Theme" and "Share Theme" strings to use localized resources.
- **Data Persistence**: Updated `HyperTheme`, `GlobalConfig`, and `AppThemeOverride` models to support the new `ColorMode` enum while maintaining backward compatibility with legacy themes.
- **Theme Creator**: Refactored `ThemeViewModel` to handle more robust state initialization and migration when editing or creating new themes.
- **Tooling**: Added Crowdin configuration settings for the IDE.
* feat(widget): add favorites, recommended filtering, and update notice (#128)
- **Widget Picker**:
- Implemented a "Recommended" filter to highlight 1x4 and 2x4 layouts compatible with the Island size.
- Added a Favorite system for widget apps, allowing users to star apps for top-level sorting.
- Added a floating navigation bar to switch between Recommended and All widgets.
- Improved dimension display by converting DP to grid cell proportions (e.g., 4x2).
- **Saved Widgets**:
- Added a persistent "Update Notice" dialog to remind users to check Autostart/Battery permissions after an app update.
- Implemented a "Kill Active Widgets" action to instantly dismiss all running widget overlays.
- Redesigned the UI with a centered filter toolbar (Favorites vs. All) and a dedicated Add FAB.
- Added reactive listening for newly added widgets to ensure the list updates immediately.
- **Service & Data**:
- Enhanced `WidgetOverlayService` with specific `ACTION_KILL_WIDGET` and `ACTION_KILL_ALL_WIDGETS` handlers for immediate UI cleanup.
- Added `favoriteWidgetAppsFlow` to `AppPreferences` to persist starred widget providers.
- **Localization**:
- Added English and Spanish strings for filters, permission reminders, and widget management.
CLOSE #72
* feat(service): implement Native Android 16 Live Updates support
- Added `LiveUpdateTranslator` to transform standard notifications into native Android 16 promoted ongoing tasks using `android.requestPromotedOngoing` and `android.shortCriticalText`.
- Implemented a toggle in Global Settings to choose between custom Xiaomi Islands and native Android 16 Live Updates.
- Created a dedicated `hyper_bridge_live_update_channel` for native updates to manage notifications and visibility independently.
- Added `POST_PROMOTED_NOTIFICATIONS` permission to `AndroidManifest.xml` to support Android 16's promoted notification features.
- Enhanced `LiveUpdateTranslator` with a `generateCriticalShortText` helper to dynamically extract progress percentages or ETAs for the system status chip.
- Fixed Android 16 category filtering by forcing Live Updates into strictly valid categories (`PROGRESS` or `TRANSPORT`) to prevent OS blocking.
- Ensured original notification timestamps are preserved for accurate system-wide "time active" calculations.
- Updated `NotificationReaderService` to support hot-swapping between custom injection and native updates via shared preferences.
* feat(service): enhance Live Update processing and Android 16 compatibility
- **NotificationReaderService**: Implemented a more robust content hashing algorithm that tracks Title, Text, Progress (max, current, indeterminate), and Button Action states (e.g., Play to Pause transitions) to ensure accurate UI updates.
- **LiveUpdateTranslator**:
- Added support for large icons and picture extras in live updates.
- Improved media notification handling by suppressing progress bars that often persist in the background.
- Optimized category mapping (Progress vs. Transport) to comply with Android 16 ongoing promotion requirements.
- Updated `shortCriticalText` generation logic to prioritize media titles, percentages, or time ETAs for the Dynamic Island chip.
- Switched to native Android 16 APIs for promoted ongoing requests and short critical text injection.
* feat(settings): refactor Global Settings UI and update version
- Updated `versionName` to `0.5.0-alpha01`.
- Redesigned `GlobalSettingsScreen` to use consistent card-based layouts for all settings items.
- Replaced the "Native Live Updates" `ListItem` with a new standardized `SettingsSwitchItem` component.
- Improved UI spacing and styling across the settings screen, including unified icon background treatments.
- Simplified state management and click behavior for toggleable settings.
* Update changelog resource to v0.4.2
* build: update project dependencies and gradle configuration (#134)
- **Gradle & AGP**:
- Upgraded Android Gradle Plugin (AGP) from `8.13.2` to `9.1.0`.
- Upgraded Gradle wrapper from `8.13` to `9.3.1`.
- Added `foojay-resolver-convention` plugin to `settings.gradle.kts` for automated toolchain management.
- **Dependencies**:
- Updated Kotlin to `2.3.20` and KSP to `2.3.2`.
- Updated Compose BOM to `2026.03.00` and Material3 to `1.5.0-alpha15`.
- Updated various AndroidX libraries: `core-ktx` (`1.18.0`), `datastore-preferences` (`1.2.1`), `activity-compose` (`1.13.0`), and `ui` (`1.10.5`).
- Bumped `kotlinx-serialization-json` to `1.10.0`.
- **Build Configuration**:
- Removed `kotlin-android` plugin in favor of `kotlin-compose` and built-in Kotlin support.
- Removed explicit `jvmTarget` configuration in `app/build.gradle.kts`.
- Enabled several experimental/new Android Gradle properties in `gradle.properties`, including `android.builtInKotlin` and `android.newDsl`.
- **Optimization**:
- Updated `proguard-rules.pro` to strip Debug and Info logs in release builds using AGP 9.1+ syntax.
* Feature/ux iprovement global configuration (#137)
* feat(settings): redesign Global Settings and enhance Theme Engine
- **Global Settings UI**:
- Refactored `GlobalSettingsScreen` to use a card-based list layout with standardized `ListOptionCard` components.
- Split settings into dedicated screens: `EngineSettingsScreen`, `IslandSettingsScreen`, and `NavCustomizationScreen`.
- Added an "Engine" section to toggle between "Xiaomi Featured Design" and "Native Android Live Updates".
- Implemented a more granular "Island Behavior" configuration including an improved auto-hide timeout slider with snap points (1s to 1h).
- **Theme Engine**:
- Integrated "Engine", "Island Behavior", and "Notification Types" selection directly into the Theme Creator flow.
- Added a real-time `EnginePreview` component to visualize differences between Xiaomi and Native Live Update designs.
- Added a "Notification Types" manager to toggle triggers for Standard, Progress, Media, Navigation, Call, and Timer events.
- **Functionality & Fixes**:
- **Crash Fix**: Resolved a critical issue causing the app to crash when opening settings in Traditional Chinese.
- Updated `AppPreferences` to support persistent storage for the native notification engine toggle.
- Improved `ThemeViewModel` with a more efficient bitmap scaling method for theme thumbnails.
- Updated `StandardTranslator`, `NavTranslator`, and `ProgressTranslator` to better respect global timeout and dismissal configurations.
- Set the default notification shade visibility to `false` for a cleaner "Island-only" experience by default.
- **Localization**:
- Added extensive string resources for version 0.4.2 hotfix and new engine settings across multiple languages (SK, PL, RU, ZH-TW, TR, UK, PT-BR, CS, DE, HU, IN, IT, KO, ES).
- Fixed several translation issues in Traditional Chinese and Spanish.
* feat(settings): externalize and localize auto-hide island strings
- **UI**: Refactored `IslandSettingsControl.kt` to use `stringResource` instead of hardcoded strings for the Auto-hide Island feature.
- **Localization**:
- Added new string resources (`auto_hide_island`, `hides_after_a_set_time`, `behavior_hide_desc`, `behavior_desc_hide_long`) to multiple locales: Slovak, Polish, Russian, Traditional Chinese, Turkish, Ukrainian, Portuguese (Brazil), Czech, German, Indonesian, Italian, Korean, Spanish, and Hungarian.
- Updated Spanish translations for behavior and trigger settings.
- Standardized ellipsis usage from `…` to `...` in Portuguese (Brazil) and Korean `strings.xml`.
* build: update version and remove redundant material3 dependenc…
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.
ProgressTranslatorto restrict the floating behavior (setEnableFloat) to only the initial appearance of a notification, preventing repeated floats during updates.setIslandFirstFloatcall from the builder.close #163