v2026.06.03 hotfix — Sonos cast URL + UPnP picker polish #78

Merged
bvandeusen merged 4 commits from dev into main 2026-06-03 15:30:09 -04:00
Showing only changes of commit a9edc12523 - Show all commits
@@ -158,10 +158,43 @@ class MinstrelApplication :
override fun onCreate() { override fun onCreate() {
super.onCreate() super.onCreate()
if (BuildConfig.DEBUG) Timber.plant(Timber.DebugTree()) // Debug builds get the full DebugTree (verbose). Release builds
// get a WARN+ tree so operator-driven diagnosis via `adb logcat`
// still surfaces UPnP / cast failures, OkHttp errors, and our
// own Timber.w / Timber.e calls — without the chatty DEBUG /
// INFO traffic flooding the buffer in production.
if (BuildConfig.DEBUG) {
Timber.plant(Timber.DebugTree())
} else {
Timber.plant(ReleaseTree())
}
appScope.launch { resumeController.restore() } appScope.launch { resumeController.restore() }
} }
/**
* Release-build Timber tree: emits at WARN and above only.
* `android.util.Log` with the canonical tag so `adb logcat` shows
* the line under the standard tag column without falling through
* to the package-stack-trace tag DebugTree produces.
*/
private class ReleaseTree : Timber.Tree() {
override fun isLoggable(tag: String?, priority: Int): Boolean =
priority >= android.util.Log.WARN
override fun log(priority: Int, tag: String?, message: String, t: Throwable?) {
val resolvedTag = tag ?: "Minstrel"
if (t == null) {
android.util.Log.println(priority, resolvedTag, message)
} else {
android.util.Log.println(
priority,
resolvedTag,
message + '\n' + android.util.Log.getStackTraceString(t),
)
}
}
}
override val workManagerConfiguration: Configuration override val workManagerConfiguration: Configuration
get() = Configuration.Builder() get() = Configuration.Builder()
.setWorkerFactory(workerFactory) .setWorkerFactory(workerFactory)