Create separate routines to parse disc and track numbers in the most
optimal manner.
On API 30 (Android R) and above, ensure that we are using the superior
CD_TRACK_NUMBER and DISC_NUMBER database fields, while below API 30,
stick with the normal TRACK field.
Revert the introduction of the thin/tiny widgets, but keep the new
cover layout I created while working on them.
There is simply no way I can cram controls and metadata within the
size bucket that the thin widget occupies. I have decided to give up
and revert the widget to it's old form.
I understand why the thin widget is not appealing. However, the sizing
at which a widget can properly accomodate a taller widget is just too
precise and not really large enough to justify it's existance.
Also use the gesture insets on playback panel.
Turns out when the panel uses normal insets, the playback panel is
extremely close to the system bars. Fix this by using the bigger
gesture insets.
Resolves#137.
Rework the smallest widgets to have no textual metadata, alongside
adding a new widget size class.
Turns out the last tiny widget redesign made the controls far too
small. Instead, remove the textual metadata and make these widgets
more akin to the small and wide widgets. This also introduces a new
side class alongside that with more controls, again to make it
similar to the other size classes.
Re-add accent customization on Android 12 and above.
Previously, I disabled accent customization since I thought they were
more or less useless with the new Material You dynamic colors system.
Turns out I severely underestimated how horribly OEMs would botch the
dynamic colors system. Guess I was blinded by my adherence to the pixel
line. Re-add the accent customization for those who do not have a good
dynamic color palette at all.
Resolves#131.
Rework the tiny widget to cram even more information into it.
The tiny widget is nominally meant for edge cases like exceptionally
small screens or landscape mode, but apparently it's triggered on some
devices in normal use because of platform fragmentation and OEM insanity.
Update the tiny widget layout with some new buttons in order to make it
more usable in mnormal use. This is still nowehre near ideal. For
example, when triggering the layout on my device, it ends up squishing
the buttons. But it should probably work better outside of those edge
cases.
Hack around more insane lollipop bugs, such as:
- The angular auxio icon crashing the system UI
- Optimized icons being corrupted
- Setting image alpha not working properly
I really wish I could drop support for this horrible version, but I
either have to wait for a major library to drop support or for the
usage numbers to reach 1%.
Replace the hodge-podge framework of state restoration and URI playing
with a single "delayed action" system.
Auxio's initialization routine is a total cluster----. This is mostly
because it involves multiple asynchronous operations such as music
loading, state restore, and service starting which tend to make it
highly prone to race conditions and other insanity.
In particular, the way Auxio would attempt to restore playback and
handle file opening was a spaghetti pile of bad API boundaries and
dubious UI code. This has not changed. I want to move this routine
to the service, but it's lifecycle is also sh------ed to such an
extent where that would be nearly impossible. Instead, this commit
introduces a new "delayed action" system that bites the bullet and
allowes PlaybackViewModel to accept a context and an action in
return for initializing playback...eventually.
I tried my best to eliminate as much memory leaks as I physically
could here, but could only go so far. Still though, even this insane
system is better than the UI-level LiveData shenanigans I did
previously, and actually works compared to the broken android
components that google keeps wanting you to use.
Remove references to android system strings, in favor of in-house
translations.
Previously Auxio would use the `android.R.string.ok` and
`android.R.string.cancel` strings to represent Ok and Cancel
respectively, but these system strings are actually untranslated on
some devices, so it is better for i18n if we use our own strings
for such.
Implement a UI frontend for customizing the ReplayGain pre-amp value.
This finally completes Auxio's ReplayGain implementation. Not only
that, it also shows how Auxio can use positive ReplayGain values,
unlike other apps.
As a side-note, this also fiddles with the dialog style somewhat.
I got carried away.
Resolves#114.
Implement an internal setting for a ReplayGain pre-amp setting.
Pre-amp is a lot like above reference volume regarding Auxio's
ReplayGain implementation, where I want to implement it in order
to allow ReplayGain to graduate from being labeled "experimental".
No UI frontend has been implemented just yet.
Add sorting modes for duration and song count.
This was requested previously in the now-closed UI/UX changes
megathread, however I have only gotten to it now.
Add recovery code to the music indexer in the case that Android doesn't
provide the DISPLAY_NAME field.
Nominally this should never happen, but OEMs will OEM and apparently
this does happen on some devices. Try to recover by grokking DATA for
a file name.
Rework the sort implementation to allow Auxio to leverage it's sorting
capabilities in a more powerful manner.
This is mostly the removal of stupid redunant methods and the change of
Sort overrides to sort in-place. This just gives us the option to avoid
full blown list copies in cases where such is reasonable.
Finalize the disc number implementation within Auxio.
This is probably one of the most widely-requested features outside
of playlisting. This implementation also adds some more fine grained
sorting modes for disc numbers in particular, which actually removes
some of the quirkiness of the Sort class.
Resolves#96.
Change the indexer to parse out the disc number field from
AudioColumns.TRACK.
On newer versions, I hope to further modify the loader to use
the API 30+ CD_TRACK_NUMBER field, as it is more versatile than
TRACK.
Add the UI and data components for a disc number value within the album
detail view.
This is the first-step of a multi-step addition to finally implement
disc numbers.
Make MediaButtonReceiver an empty class without any behavior.
The previous manner in which Auxio would handle media button events
was actually bad, as in certain cases (like a rewind or if there was
no song playing) Auxio would actually crash, as the service would
not start a foreground state in time.
Fix this by removing that functionality. This should hopefully still
retain the current state.
Try to rework the playback service components to reduce race conditions
and improve readability.
This changeset has gone through a number of changes. I originally
wanted to unify all cover loading under a single "Component Manager",
but this turned out to be stupid given that the three service components
are different in nearly every way. Instead I just reworked them all
individually by introducing a new less-data race-prone image loading
framework, and moving around a bunch of code I was planning to move
around.
Do some miscellanious formatting reworks.
1. Remove all instances of m in favor of _. _ is only used when names
collide or if something should be internal.
2. Make fragments apply their own click listeners.
3. Remove instances of inc/dec and replace them with the more
straightfoward + 1 or - 1.
Split off the "songs loaded" about item into it's own card called
"library statistics"
This card includes the song, album, artist, and genre counts,
alongside a total duration of the music library. This is just more
informative and useful to the user.
Resolves#121.
Rework state restore to be more coherent and in line with the new
member layout of the general
This primarily involves making the index the primary database attribute
in favor of song, with the old song id field becoming a sanity check
field.
Fix miscellanious bugs and clean the component code.
Currently the components are in a strange state. They are a big ball of
mud with inconsistent lifecycles and callbacks. I want to find a way to
unify them under a single lifecycle, but the competing nature of them
makes this extremely difficult.
Rename LoopMode to RepeatMode, which is generally much clearer
than the previous name.
This changes all non-breaking instances of "loop" in the app with
"repeat".
Rework the asynchronous aspects of MusicStore to rely on a more
conventional callback system.
In preparation for automatic rescanning, it would be more elegant
for music consumers to use a callback, so that updates can be
registered easier than if a co-routine continued to be used.
Convert MusicStore to this new model and rework the accesses of
MusicStore in-app to line up with this new system.
Create a ViewModel for the more complicated navigation pathways.
Normally, navigation was fragmented along a complicated stretch of
fragment hacks and DetailViewModel's navToItem attitbute, both of which
were not really that ideal. Dumpster them for a single, unified
viewmodel for the more complicated navigation situations. This removes
much of the duplicate navigation logic and is likely much more
maintainable for future situations.
Rework the style of all album covers in the app to be more in line with
the new track number style.
This is mostly comprised of adding a new background to all cover views
and rescaling error icons to be smaller than they would normally be.
This also includes a change in the cover/track background color from
colorSurfaceVariant to colorOnSurfaceInverse, which seems to provide
the best visibility in all cases.
These changes also apply to the track number views.
Update the album song layout to be more alike to other songs.
Recently I migrated the TextView in the album songs to use 48dp sizing,
like the other song views. However, this resulted in a lot of empty
space that felt off. Fix this by adding a light background to the track
number, which fills the room it takes up a bit more. It also hopefully
primes the track number to take an indicator once multi-select is
added.