From dffa3dc34e0f299ff1262e51cc726b0ffd9da355 Mon Sep 17 00:00:00 2001 From: Alexander Capehart Date: Mon, 14 Nov 2022 19:41:23 -0700 Subject: [PATCH 1/3] playback: fix slider crash Fix crashes occuring from -1 positions causing Slider to error out. This is just fixed by band-aiding the UI, since I seemingly cannot control these from the backend. --- .../main/java/org/oxycblt/auxio/playback/StyledSeekBar.kt | 8 +++++--- build.gradle | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/org/oxycblt/auxio/playback/StyledSeekBar.kt b/app/src/main/java/org/oxycblt/auxio/playback/StyledSeekBar.kt index 657c120d0..6bb64fd76 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/StyledSeekBar.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/StyledSeekBar.kt @@ -69,15 +69,17 @@ constructor( var positionDs: Long get() = binding.seekBarSlider.value.toLong() set(value) { + val sanitized = max(value, 0) + // Sanity check: Ensure that this value is within the duration and will not crash // the app, and that the user is not currently seeking (which would cause the SeekBar // to jump around). - if (value <= durationDs && !isActivated) { - binding.seekBarSlider.value = value.toFloat() + if (sanitized <= durationDs && !isActivated) { + binding.seekBarSlider.value = sanitized.toFloat() // We would want to keep this in the callback, but the callback only fires when // a value changes completely, and sometimes that does not happen with this view. - binding.seekBarPosition.text = value.formatDurationDs(true) + binding.seekBarPosition.text = sanitized.formatDurationDs(true) } } diff --git a/build.gradle b/build.gradle index 4699d5121..411cc64ab 100644 --- a/build.gradle +++ b/build.gradle @@ -9,7 +9,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:7.4.0-alpha10' + classpath 'com.android.tools.build:gradle:7.3.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$navigation_version" classpath "com.diffplug.spotless:spotless-plugin-gradle:6.6.1" From b3cf76089a3c2cd7d0b95669e68a216d65165eed Mon Sep 17 00:00:00 2001 From: Alexander Capehart Date: Tue, 15 Nov 2022 20:49:28 -0700 Subject: [PATCH 2/3] detail: fix genre menu crash Fix a crash when opening the genre menu. --- .../main/java/org/oxycblt/auxio/detail/GenreDetailFragment.kt | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/src/main/java/org/oxycblt/auxio/detail/GenreDetailFragment.kt b/app/src/main/java/org/oxycblt/auxio/detail/GenreDetailFragment.kt index 541186601..920bdec3f 100644 --- a/app/src/main/java/org/oxycblt/auxio/detail/GenreDetailFragment.kt +++ b/app/src/main/java/org/oxycblt/auxio/detail/GenreDetailFragment.kt @@ -126,8 +126,6 @@ class GenreDetailFragment : if (item is Song) { musicMenu(anchor, R.menu.menu_song_actions, item) } - - error("Unexpected datatype when opening menu: ${item::class.java}") } override fun onPlayParent() { From 6b1f3e4567ca46dec08978673c2f9a7f2b54907f Mon Sep 17 00:00:00 2001 From: Alexander Capehart Date: Wed, 16 Nov 2022 08:19:32 -0700 Subject: [PATCH 3/3] Version 2.6.4 Ready for version 2.6.4 of Auxio. --- CHANGELOG.md | 6 ++++++ README.md | 4 ++-- app/build.gradle | 6 ++---- fastlane/metadata/android/en-US/changelogs/23.txt | 3 +++ 4 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 fastlane/metadata/android/en-US/changelogs/23.txt diff --git a/CHANGELOG.md b/CHANGELOG.md index d09f55f26..0c8fc2d1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ ## dev +## 2.6.4 + +#### What's Fixed +- Fixed issue where invalid position values would crash the app +- Fixed issue where opening the song menu in the genre view would crash the app + ## 2.6.3 #### What's New diff --git a/README.md b/README.md index 0e5a7e997..b431e1a3d 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@

Auxio

A simple, rational music player for android.

- - Latest Version + + Latest Version Releases diff --git a/app/build.gradle b/app/build.gradle index 04fb6ae11..2c6afb0da 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -11,12 +11,10 @@ android { defaultConfig { applicationId namespace - versionName "2.6.3" - versionCode 22 + versionName "2.6.4" + versionCode 23 minSdk 21 - // API 33 is still busted, waiting until the XML element issue is fixed - // noinspection OldTargetApi targetSdk 33 buildFeatures { diff --git a/fastlane/metadata/android/en-US/changelogs/23.txt b/fastlane/metadata/android/en-US/changelogs/23.txt new file mode 100644 index 000000000..c132841f7 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/23.txt @@ -0,0 +1,3 @@ +Auxio 2.6.0 enables a new, higher-quality form of music scanning, while also heavily improving the playback UI. For more information, For more information, see https://github.com/OxygenCobalt/Auxio/releases/tag/v2.6.0. + +This release fixes certain crashes that were identified in the previous version.