Disable the default long-press action in the ItemTouchHelper usages.
ItemTouchHelper provides a long-press action to start an item drag by
default. However, because Auxio adds a drag handle on top of this
action, this actually results in a conflict with the default behavior
in certain cases. Replace it with a custom version of the long-press
action within the viewholders themselves.
Fix an esoteric crash with queue synchronization during the playback
restore process.
Auxio will attempt to re-synchronize the queue index whenever it is
desynchronized, however during the check for if it's desynchronized,
Auxio would do a direct index of the queue, which could result in a
crash in situations where the desynchronized index is outside of the
queue bounds.
Fix this by replacing that unprotected access with a protected access,
which not only fixes the crash but also still correctly detects
desynchronization in that case.
Resolves#89.
Turn the headset focus setting into the headset autoplay setting.
The way auxio handles headsets is...odd. Sometimes the MediaSession
handles it and Auxio could not care less, and sometimes Auxio actually
needs to handle it. As a result, the idea of being able to disable
headset focus is more or less moot because it will only apply to some
devices and not others.
On the other end, the way Auxio automatically begins playback once a
headset is plugged in is also quite weird. It only works on wired
headsets, and when it does, it overrides all other apps that might
also be playing audio. It's not to say that it's a bad feature, but
it's also one that I don't want to make the defualt. Auxio should
still play along within the confines of Android's expectations, after
all.
Replacing the existing "Headset focus" setting with a new "Headset
autoplay" setting solves both of these issues, as it prevents a
mis-guided disabling of the setting that doesn't actually disable
the feature and it relegates the quirky autoplay behavior to an
setting not enabled by default.
Fix an issue where headset focus would result in unexpected playback
whenever the service started.
AudioManager.ACTION_HEADSET_PLUG seems to always fire when the initial
BroadcastReceiver is set up, which results in a weird bug where if a
wired headset is connected while PlaybackService is started, playback
will start immediately, which was not user friendly.
I fear that this may result in an edge case that results in headset
focus not firing in an unrelated situation, which in that case I would
be forced to remove headset autoplay entirely (or at least relegate it
to a quirk option).
Add even more checks and guards to the music loading process to ensure
proper metadata loading.
Auxio has always had issues handling track numbers and years, mostly
with ensuring their validity. This change resolves them by more or less
surrounding them with gobs of null-checks and fallible parsing
routines, which should help avoid frustrating bugs and crashes with
metadata in the future.
Resolves#88.
Resolves#84.
Revert the removal of the song/artist values from list items for now.
The current plan of removing extraneous values from songs and albums
only works if I add multi-select and a dedicated menu button, but that
is still in the air, and in general I want feedback before I go ahead.
Aside from reverting the previous changes, this actually standardizes
all item descriptions under a single bullet point formatting system,
instead of the mix of commas and bullet points that existed beforehand.
Remove the album name from the main song item in favor of a duration
value.
Auxio has traditionally used "Artist . Album" for song items. However,
this had some shortcomings:
1. The way the artist and album names are packed probably results in
truncation on small screens, which I doubt is very helpful.
2. All other items in Auxio have only one specific "subject" per line,
which makes the song items a bit of an outlier since it has two (the
artist and the album)
3. The empty space available could be used for another UI element,
such as a duration or maybe a menu button in the future.
For consistency, this also removes the song count from all album items
as well.
Remove all usages of memberBinding from the app.
For some reason, certain devices running Android 10 and lower will
have a lifecycle race condition whenever the theme is mis-matched.
This ends up resulting in an invalid state whenever memberBinder was
used. Since we can't replace memberBinder with a better solution,
just dumpster the whole thing. This platform is so god damn broken,
jesus christ.
Resolves#80.
Create a custom view for rounded images, making them more nuanced in
the process.
The previous method for applying rounded images in-app was generally
clunky and fragile. Introduce a new custom view that actually takes a
cornerRadius attribute from the ImageView itself that then applies it
whenever the user enables the setting. This also allows rounded images
to be more nuanced, as typical 8dp elevation can be used for small
views and a more fitting 16dp radius can be used for large views.
Crop all images to a 1:1 aspect ratio.
Sometimes cover art will not be a square. I never realized this because
all covers in my music library are square. This led to many strange bugs
that I would rather avoid, so create a new transformation that crops the
image to a 1:1 aspect ratio.
The reason why we use a transformation is that it won't be dependent on
the actual state of the ImageView, which is what would happen if we
used ScaleType.CENTER_CROP. In the case that we use a very weird hacky
ImageView like in the widgets, doing such would result in any cropping
not actually working correctly. It's better to do it in the
Transformation stage simply to ensure consistency.
Allow the material library to handle dynamic colors.
Turns out I was mis-understanding how DynamicColor themes were meant to
be used by the material library. Turns out you can just inherit from it
and it will work perfectly fine. Refactor the V31 styles to remove our
insane shims and finally fix the slapdash dynamic color usage across
the main theme and widgets.
Copy-paste some extra fields onto the file opening intent filter as to
[hopefully] get Auxio to be recognized by OEM skins better.
Some OEM skins don't seem to do a basic query for an app that matches
the APP_MUSIC category. Instead, they do some insane query for apps
that match this specific file intent structure that Auxio does not fit
for whatever reason. Try to graft some manifest features from the MPV
android app to make Auxio correctly expose this. I have no idea if this
will actually do anything.
Disable the ability to customize audio focus on Android 12 and up.
Android 12 automatically regulates audio streams even further than it
did in previous versions, to the point where the audio focus setting
no longer makes sense on that version. I may extend the removal to all
versions in the future.
Fix an issue where headset focus would restart playback unexpectedly.
At some point during the broadcast refactor, I accidentally switched
the values of CONNECTED and DISCONNECTED when handling
AudioManager.ACTION_HEADSET_PLUG. This resulted in playback starting
for no reason in some situations.
Use body typography in more places, reworking the letter spacing as to
make it more pleasent to use with the inter typeface.
This should hopefully be the last time I fret over typography.
Everything should line up in the way desired by M3.
Update the contribution information and templates.
The contribution information and templates were growing a bit stale,
given that they haven't gotten a refresh since ~1.3.0. This commit
reworks them to be more thorough and straightfoward.
Add a CHANGELOG document that keeps track of the past and current
release notes.
Making all of our releases rely on GitHub to keep track of them is not
really a good idea, so this document serves as a record of past release
changelogs just as a pre-caution. It also allows a live preview of the
next version whenever something is changed.