Move the loading screen into the home view.
Previously, we would use a Snackbar to track the music loading state.
This ended up being a pretty stupid and buggy idea, and would get even
worse with the new music loader changes. Instead, we re-implement the
loading screen into the home view to generally be more sane and
extendable compared to previously.
Make addCallback calls (or similar) initalize the caller by calling the
specific callback methods.
This is primarily intended as a fix to an issue where the music library
would actually reload during a warm start. This is extremely bad, but I
hope it doesn't make the app too unusable until the next version.
Add an ExoPlayer-based metadata backend.
This backend finally allows Auxio to parse metadata internally, which
has been a highly requested feature given how many unfixable MediaStore
issues it would fix.
However, this is not fully ready for production yet. The loading
process becomes much larger with manual parsing, the current
implementation still allocates picture metadata (terrible for
efficiency), and there is no good indicator in the app to keep
track of music loading.
As a result, this backend is disabled until it can be fully integrated
into Auxio's architecture.
Move out the MediaStoreCompat interface into a full interface called
Backend.
In preparation for direct metadata parsing, it would be useful to
create some kind of object system to properly handle the capabilities
of each metadata indexing mode. Backend fulfills that by allowing
each object to implement their own query and then loading routine.
This system is designed somewhat strangely. This is firstly because
the ExoPlayer metadata backend will have to plug in to the original
MediaStore backend, so making methods more granular allows the
ExoPlayer backend to avoid some of the stupid inefficiencies from
the actual MediaStore backend, such as the genre loading process.
We also want to separate the steps of loading music in order to
more adequately show the current loading process to the user in
a future change.
Implement a safe slider wrapper that does not crash with invalid values
as often.
Slider is a terrible component that is not designed with Auxio's
use-case in the slightest. Instead of gracefully degrading with invalid
values, it just crashes the entire app, which is horrible for UX.
Since SeekBar is a useless buggy version-specific sh******ed mess too,
we have no choice but to wrap Slider in a safe view layout that
hopefully hacks with the input enough to not crash the app when doing
simple seeking actions.
I hate android so much.
Resolves#140.
Add disc number sorting to sorts that originally sorted by track.
Forgot to add disc sorting to the other sort modes when adding disc
number support. Fix that.
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.