Feature: Advanced App Backup (v2), Native Spatializer (API 32+) & UI Polish#43
Open
YisusPineapple wants to merge 10 commits into
Open
Conversation
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.
Description
This pull request significantly modernizes Lune's infrastructure by introducing a full-featured Application State Backup & Restore Engine (Backup v2) and migrating to the platform-native Spatializer API (API 32+) to resolve legacy deprecation warnings under Android 15 (targetSdk 36). It also includes UI refinements and localized Spanish corrections.
Key Enhancements
1. Advanced Application State Backup & Restore (v2)
song_overridesdatabase table [MusicDatabase.kt]. This preserves customized metadata (titles, artists, genres), custom local covers, and all liked/favorite statuses (isFavorite = true).SettingsManagerusing a type-safe nested data model (SettingsBackupData). This prevents type-safety issues during GSON deserialization and guarantees exact recovery of audio configurations, layout preferences, and custom themes.playback_statstable to preserve home screen cards and overall stats across device migrations.v1backup (containing only playlists) is imported, the engine falls back gracefully to playlist-only restoration without throwing exceptions.2. Material 3 Expressive Loader & Thread Safety
AlertDialogduring file I/O operations.CircularWavyProgressIndicatordriven by a lightweight, infinite-loop transition—providing smooth expressive rendering friendly on modest devices.1200mscoroutine delay. This ensures that SQLite transactional writes and journal files are fully flushed on disk before recreating the active Activity context.3. Native Spatial Audio Engine (API 32+)
setSpatializationBehavior(AudioAttributes.SPATIALIZATION_BEHAVIOR_AUTO)duringMediaPlayerinstantiation (playSongandperformCrossfade). If disabled, it falls back cleanly toSPATIALIZATION_BEHAVIOR_NEVER.Virtualizeraudio effect bound to the active MediaPlayer audio session ID, maintaining stable backward compatibility and eliminating compiler deprecation warnings under API 35/36.4. Dynamic Language & UI Hot-Reload
AppCompatDelegate.setApplicationLocales(LocaleListCompat.forLanguageTags(code))on the Main Thread and triggers an immediate contextrecreate()to apply the restored language and theme configurations without requiring a manual app restart.5. Spanish Localization Cleanup
values-es/strings.xml):"Cover player"➔"Carátula del reproductor""Control player"➔"Controles del reproductor""Export/Import Playlists"➔"Exportar/Importar copia de seguridad"Technical Specifications
Dispatchers.IOto keepDispatchers.Mainlightweight and prevent frame drops.