Preserve the system audio mode and speakerphone route when only player settings change. Apply explicit global routing changes using the incoming context instead of the previous defaults.
Verified with three native routing regression tests and 34 Dart player tests. The Android build and audioplayers lint checks pass. Related to #721.
A finished scan only reported how many files it skipped. The Rust
scanner and the Android SAF scan now record the first 100 failed files
with the reader's reason and include them in the finished progress
report.
Library settings show the count under each folder, and its actions
open a sheet listing each file, its folder and the reason. The list is
kept per folder across restarts, cleared by a clean scan and removed
with the folder. Network folders keep only the count.
Validation: provider, model and Rust scan tests, and the full Flutter
suite on a clean tree with only this series applied.
Android Library scans counted a file as an error whenever its tag reader
failed, even when the audio was fine, so mixed folders that other
players list cleanly reported dozens of errors.
- Opus and Vorbis files with a comment header but no title or artist
read as untagged songs instead of failing.
- The comment header is read up to 16 MiB instead of 80 pages, so a
large cover written on small pages no longer hides the tags.
- Raw ADTS .aac files read ID3 or APEv2 tags, a cover, and quality from
their frame headers. MP4 .aac files keep the MP4 reader.
- An ID3v2 tag in front of a FLAC stream is skipped.
- Interrupted and short reads from provider descriptors are retried
instead of failing the read, and the last direct SAF read waits
400 ms before its retry.
Damaged FLAC, MP3 and AAC streams are still rejected.
Validation: 7 new mornye-core format tests (6 fail without this
change), mornye-core, mornye-extensions and mornye-mobile tests, clippy,
and 17 SafMetadataReadPolicyTest cases.
Publish metadata and artwork on the main looper, then refresh the playback media ID while preserving position and playback controls. Cover delayed metadata with playing and paused Android session tests.
Distinguish readable MP3 and MP4 streams without tags from failed metadata reads. Preserve partial ID3 and MP4 tags, use the original display name for tagless documents, and expose parser failures to Android SAF scanning. Cover tagless files, partial tags, invalid data, cancellation, and revoked documents.
Stage content URIs before reading audio for Save LRC, preserve the requested output, and clean up temporary input. Return an explicit failure when the source document is inaccessible.
The Android DSD/WavPack reader built its library row without scannedAt.
Since the native staging validates required fields (d1de8331), one such
file failed the whole import with "Library scan row requires string
scannedAt", so a library containing a .dsf, .dff or .wv file could not
be scanned at all.
Stamp that row in Kotlin and fill a missing scannedAt during native
staging. A row that still cannot be encoded is counted, reported through
invalid_rows, invalid_row_error and invalid_row_paths, and skipped; the
owner logs it and protects the file's previous entry during publication,
as it does for a platform read error, instead of discarding the scan.
"Find lyrics online" in the editor's lyrics section opens a sheet that
asks every enabled provider, extensions included, and lists each
answer in priority order with its timing and a preview. The chosen
lyrics fill the field and are saved with the other edits.
The backend gains getLyricsFromProvider, which asks one enabled
provider directly without the cache or the priority race, and
getEnabledLyricsProviders, wired for desktop, Android and iOS.
Provider display names move to a shared helper.
Add the Mornye brand kit and regenerate the Android and iOS launcher
icons on the Deep Teal background with a dedicated monochrome layer.
Replace the in-app logo assets, point the README banner at the new
lockup, and drop the old README banners. Download notifications now use
the monochrome mark, matching the playback notification.
Rename the Dart package, Android and iOS identifiers, Rust crates, native libraries, and Discord plugin. Preserve legacy data readers and compatibility aliases.
Update localized branding, documentation, artwork, build tooling, and release artifacts. Route Telegram release notifications to @mornyeupdates and link @mornyecommunity.
Phones without tuned haptic primitives often use an eccentric mass motor
that needs tens of milliseconds to spin up. The previous 12 ms on/off
pulses and low-amplitude one-shots were mostly not felt, so only the
loudest hits produced any vibration. On/off motors now play hits from
intensity 0.35 for 25 to 50 ms, and amplitude-controlled motors play
20 to 40 ms pulses with a minimum amplitude.
Analysis keeps every candidate hit with its threshold score, so a new
Sensitivity setting reselects pulses without decoding the song again.
The midpoint reproduces the previous selection exactly. A Strength
setting scales pulse intensity from 0.4x to 1.6x.
Ignore low-memory, resource-reclamation, and ordinary kill exits when recovering Android crash reports. Apply the same policy to saved reports from earlier versions while preserving Java/native crashes, ANRs, and fatal signals.
Include process importance and session duration in confirmed crash diagnostics. Validate with 8 Android unit tests, 9 Flutter tests, analyzer, formatting, and diff checks.
Pass renderer arguments when audio_service creates its cached Flutter engine so existing compatibility rules take effect. Use Skia for Xiaomi 25053PC47I on Android 15 as a scoped workaround for the reported Impeller raster crash.
Add tests that keep the new workaround limited to the affected manufacturer, model, and Android SDK.
Serialize scan notifications and surface failures even when database error persistence fails. Recover interrupted scans independently of auto-scan, retain their checkpoints, and collect matching Android process-exit details on restart.
Add android/README.md: backend channel routing, the 70 nativeBackendMethods with handler file and reply kind, host-to-Dart events, the __json_file spill, progress EventChannels (400 ms Android, 800 ms iOS), the two foreground services, the SAF model, the Rust bridge files, and the iOS routing differences.
Derived from MainActivity.kt and the MainActivity*.kt handler files, MainActivityProgressStreams.kt, SelectedCoreBackend.kt, RustCoreBackendApplication.kt, NativeDataJobs.kt, SpillJsonWriter, DownloadService.kt, BackgroundWorkService.kt, MainActivitySafScan.kt, MainActivitySafIo.kt, android/app/build.gradle.kts, proguard-rules.pro, ios/Runner/AppDelegate.swift, CoreBackend.swift and lib/services/platform_bridge*.dart.
The two SAF scans repeated the same progress arithmetic and CUE steps.
Only the runs that are identical are shared:
- safScanProgressPct(done, total) is the Int/Int to Double * 100.0
expression all six percent sites used. The incremental scan keeps its
zero-total guard (100.0), the full scan's call sites keep relying on a
non-zero total as before.
- reportScanned() replaces the two identical scanned/error/percent
updates in scanSafTree. The CUE-referenced audio skip keeps its own
update, which never set errorCount.
- reportProcessed() moves above the changed-CUE loop, whose inline copy
of its body it now replaces.
- resolveCueSheetAudio() covers the FILE line extraction plus sibling
lookup that both changed-CUE loops and the unchanged-CUE loop ran.
- scanSafCueTracks() covers the audio name, timestamp, cover key and
scanCueFromUri steps. The scans fall back to different timestamps
when the audio's own cannot be read, so the fallback is a lambda and
still runs only on that failure.
Cancellation checks, checkpoint writes, flushes, the copy/delete of the
temporary CUE file and every counter update stay in place and order;
progress values and the scan output are unchanged.
safExistsBatch and getSafFileModTimes answer per-URI document queries
for library and history checks and do not take part in the scan, so
they move verbatim into SafBatchQueries.kt. The file header of
MainActivitySafScan.kt now describes what is left there.
Child listing (with the provider-loading retry), readable tree
resolution, the listing prefetcher and the ordered read pool are the
I/O layer under both scans and the history inspection, so they move
verbatim into SafTreeListing.kt together with their pool size
constants (4 listing threads, 6 read workers, unchanged).
SafTreeLister and runSafReadsInOrder become internal because the scans
stay behind. The pause poll constant stays with safScanStopRequested.
The CUE sheet helpers used by both SAF scans (FILE line extraction,
the per-directory child lookup cache and the audio sibling resolver)
move verbatim into SafCueScan.kt. rememberCueDirectoryListing becomes
internal because the scans stay behind; the sibling extension list and
the lookup builder are only used in the new file and stay private.
The resumable-scan checkpoint helpers (state file path, load,
reconcile against written rows, row count and output repair) are a
self-contained unit, so they move verbatim into SafScanCheckpoint.kt.
They were file-private and become internal because scanSafTree stays
in MainActivitySafScan.kt. The checkpoint file name, its line format
and the reconciled NDJSON keys are unchanged.
MainActivitySafScan.kt mixes the library scan with unrelated SAF
helpers. resolveSafFile and inspectSafFiles (with its private request
class) serve history file checks, not the scan, so they move verbatim
into SafFileInspection.kt. Signatures and visibility are unchanged.
ExtensionMimeTablesTest fixes the outputs of extFromFileName,
extFromMimeType, SafDownloadHandler.normalizeExt and mimeTypeForExt, and
NativeFinalizationPolicy.normalizeExtension for every table entry plus
unknown, blank, uppercase and dotted inputs. The expected values come
from reading the code; the tables are not inverse maps, so each keeps
its own entries.
The two normalizers trim, lowercase with Locale.ROOT and add one leading
dot, with "" for blank input; checking the dot before or after
lowercasing cannot differ. normalizeExt now delegates to
normalizeExtension, which becomes internal. The test passed against
both original bodies before the delegation.
The MainActivitySafIo helpers declared a MainActivity receiver although
they only use Context members and the core backend. They now take a
Context receiver, and the ones that reach the backend take it as an
explicit first parameter, so a service can call them with its own
backend. buildLibraryCoverCacheKey used neither and is now a plain
function.
Bodies are unchanged apart from passing the backend through to the
helpers they call. Activity callers pass their own coreBackend, so the
same instances reach the same code. The finalizer keeps using
SafDownloadHandler.copyContentUriToTemp; switching it would add the
MediaStore fallback and MIME-based extension, which is a behavior change.
DownloadService and BackgroundWorkService each built the same partial
wake lock (30-minute timeout, 15-minute renew, not reference-counted),
the same dataSync startForeground SDK branch and the same content
PendingIntent to MainActivity. ForegroundWorkLock now holds the lock and
the shared constants, and two small helpers cover the start branch and
the intent.
The renew strategies stay per service: DownloadService renews on its
progress and maintenance calls once 15 minutes have passed, while
BackgroundWorkService re-acquires from a main-thread Handler timer.
Wake-lock tags, channel IDs, notification IDs, intent flags and request
codes are unchanged, and the verification intent keeps its own request
code and extras.
MainActivity.kt is now the dispatcher only. The screen wake,
verification notification, install marker, runtime state, exit,
backend implementation and memory release cases keep their labels and
order in the backend `when` and now call MainActivity.handle<Name>
functions in MainActivityLifecycleCalls.kt; processPendingExtensionCallbacks
stays inline.
Bodies move verbatim. prepareRuntimeState takes the backend that
configureFlutterEngine selected as a parameter, as the case body
captured it before, and flutterBackCallback is widened to internal for
exitApp.
MainActivity.kt should be the dispatcher only. downloadByStrategy, the
download foreground service, background work and native download worker
cases keep their labels and order in the backend `when`; the multi-line
ones now call MainActivity.handle<Name> functions in
MainActivityServiceCalls.kt, and the one-line stop/pause/resume/cancel
cases stay inline.
Bodies move verbatim apart from the receiver label for this@MainActivity.
MainActivity.kt should be the dispatcher only. The cover cache, folder
and SAF tree scan, and scan progress/cancel/pause/resume cases keep
their labels and order in the backend `when` and now call
MainActivity.handle<Name> functions in MainActivityLibraryScanCalls.kt.
Bodies move verbatim. Every handler takes (call, result) so the
dispatch lines stay uniform, even where a body ignores the call.
MainActivity.kt should be the dispatcher only. The metadata, tag,
cover, re-enrich, post-processing and CUE cases keep their labels and
order in the backend `when` and now call MainActivity.handle<Name>
functions in MainActivityMetadataCalls.kt.
Bodies move verbatim apart from the receiver label for this@MainActivity
and re-indenting the FLAC copy-back lines of editFileMetadata, which sat
at the wrong depth.
MainActivity.kt should be the dispatcher only. The backend `when` keeps
every case label in the same order, so the routing set check and the
dispatch order are unchanged, and each SAF case now calls a
MainActivity.handle<Name> function in MainActivitySafCalls.kt.
Bodies move verbatim; the only edit is this@MainActivity becoming the
extension function's own receiver label.
MainActivity.kt mixed the Activity lifecycle and the backend dispatcher
with several self-contained helpers. Give each its own file as
MainActivity extension functions, following the W2-N split:
- MainActivityInstallState.kt: ensureInstallMarker, prepareRuntimeState
- MainActivityExtensionIntents.kt: verification and OAuth intent
handling, processPendingExtensionCallbacks, session-grant events
- MainActivitySafLeases.kt: SAF playback descriptor leases
- MainActivitySmallChannels.kt: the concert_calendar and audio_output
MethodChannels, still registered at the same point and in the same
order in configureFlutterEngine
The state these helpers touch stays in MainActivity and is widened from
private to internal. Bodies move verbatim except that companion members
are qualified with MainActivity. outside the class.
NT-16 Kotlin part. The application method dispatch (about 290 lines) moves
verbatim into RustCoreBackendApplication.kt as an internal extension
`RustCoreBackend.dispatchApplication`. The `invokeApplication` override
stays in SelectedCoreBackend.kt as a one-line delegate. `synchronized(this)`
still locks the RustCoreBackend object.
The object state and helpers the dispatch uses are widened from private to
internal; method names, argument keys, results and error strings are
unchanged.
First NT-12 seam group, following the MainActivitySafScan.kt and
MainActivitySafIo.kt receiver-function shape. Bodies are moved verbatim.
- ImpellerCompatibility.kt: the device lists and shouldDisableImpeller /
getGpuRenderer, now file-level. ImpellerAwareFlutterFragment stays nested
in MainActivity because proguard-rules.pro keeps it by that name.
- MainActivitySafTreePicker.kt: the pickSafTree launch (the case now calls
launchSafTreePicker), the activity-result handler, and the storage id and
display path helpers. The launcher registration stays a MainActivity
property so it is still registered at construction.
- MainActivityProgressStreams.kt: both progress EventChannels, their
start/stop/poll helpers and the channel name and polling constants.
Stream state, the picker store, the launcher, the coroutine scope, the
backend channel and the companion's pending picker result are widened from
private to internal so the receiver functions can reach them. Channel
names, payload keys, error codes and dispatch order are unchanged.
MainActivity handles a backend call in its own `when` only when the method
name is listed in `nativeBackendMethods`; any other name falls through to the
selected core backend. A name added to only one of the two silently changes
where the call is handled. This JVM test reads MainActivity.kt as source,
extracts the set literal and the top-level string case labels of
`when (call.method)`, and fails with the symmetric difference when they drift.
Move worker request contract validation and the download history row
and JSON mapping out of NativeDownloadFinalizer into a sibling file of
extension functions. Bodies are verbatim. NATIVE_WORKER_CONTRACT_VERSION
stays on the object with its value, so its contract test is unchanged.
The history column contract test now reads buildHistoryRow from the new
file. normalizeOptional moves with the row builder, so
cleanMetadataString widens from private to internal.
Move the extension post-processing hook stage out of
NativeDownloadFinalizer into a sibling file as an extension function.
The body is verbatim. The shared materializeForFFmpeg and
replaceStatePath helpers stay on the object because every stage uses
them, and no object member needed wider visibility.
Move the metadata embedding stage, ReplayGain tagging and verification,
the album key and duration helpers, and the final audio quality probe
out of NativeDownloadFinalizer into a sibling file of extension
functions. Bodies are verbatim. The moved code reads three JSON helpers
that stay on the object, so parseObject, optPositiveInt and
optPositiveBitrateKbps widen from private to internal.
Move the lossless container conversion and automatic conversion stages,
with their file-local helpers (output extension, M4A sniffing, unique
output path, preserved container rename), out of NativeDownloadFinalizer
into a sibling file of extension functions. Bodies are verbatim except
one moved comment line whose em dash is rewritten as a colon. No object
member needed wider visibility.
NativeDownloadFinalizer.kt is a 1300-line god file. Move the decryption
stage (finalizeDecryption, ISO-BMFF extension normalization and key
candidate expansion) into a sibling file as NativeDownloadFinalizer
extension functions, matching NativeFinalizerMedia/FFmpeg/SafPublish.
Bodies are verbatim; file-local helpers stay private, and no object
member needed wider visibility.
MainActivitySafIo and SafDownloadHandler each defined an identical
errorJson. Keep one internal top-level function in MainActivitySafIo
and drop the private copy. errorJson, isMediaStoreUri, extFromFileName
and extFromMimeType never used their MainActivity receiver, so they
become plain top-level functions; call sites are unchanged.
Rust is the only backend. Rename the iOS invokeGoMethod, which
dispatches the OS-owned channel methods, to invokeOsMethod, and reword
the comments that still described Go calls, the Go progress stream, the
Go metadata reader or a "native migration boundary" so they describe
the current backend. Channel method names and reply keys are unchanged.
Flutter 3.47.7 sets flutter.minSdkVersion to 24, which
android/app/build.gradle.kts uses as minSdk. The N (24) checks around
StorageManager.storageVolumes and the LOLLIPOP (21) check around
finishAndRemoveTask were therefore always true, and their else branches
could never run. Keep the true-branch bodies. Checks for API levels
above 24 are unchanged.
RustCoreBackend.invokeApplication handled readFileMetadata,
editFileMetadata and cancelNativeDataJob, but MainActivity intercepts
all three first: the metadata methods are in nativeBackendMethods and
dispatchBackendApplication answers cancelNativeDataJob before it calls
invokeApplication. No Kotlin code calls invokeApplication with those
names.
Dart never sends these channel methods, so their handlers go on every
platform:
- shareMultipleContentUris (Android) and getAvailableLyricsProviders
(Android and iOS) have no Dart caller.
- scanLibraryFolderIncrementalFromSnapshot and
scanSafTreeIncrementalFromSnapshot are called only from the Dart host
branch of the library scan, which runs only when
supportsCoreBackend is false, that is never on Android or iOS. The
unreachable Dart wrappers are removed separately.
The allowlist and the when cases in MainActivity stay in sync (70
names). The UniFFI exports get_available_lyrics_providers_json and
scan_library_folder_incremental_from_snapshot were used only by the
removed handlers; the backend methods behind them stay.
Rust is the only backend, so several single-backend switches had become
constants and their other branches could never run:
- CoreBackend.supportsOutputDescriptors was always false. The
descriptor branch in SafDownloadHandler and its pfd/detachFd cleanup
never ran, and the Rust planner rejects output_fd anyway.
- routesApplication was always true on Android and iOS. Drop the member,
the "go" value of getBackendImplementations (the reply keys and the
"rust" value Dart receives are unchanged), the iOS routing guard and
the interface defaults that threw for unrouted methods.
- cleanupExtensions(), waitForDownloadProgressDelta and
scanCueForLibrary had no production caller. Dart reaches cleanup
through the cleanupExtensions channel method, and RustCoreBackend
overrides openDownloadProgress, so the polling default goes too.
The UniFFI exports DownloadState.wait_progress_delta and
ExtensionManager.scan_cue_file_for_library were used only by those
Kotlin overrides. Bindings are generated at build time by
scripts/build_rust_backend.sh; no generated binding is tracked.