Rework Sort again into a new class that leverages a better Mode design
and static comparator instances.
This somewhat improves efficiency, but is also far easier to work with
and has far less footguns with adding new sorts.
Completely rework app typography.
Today I found out that inter has a tool that allowed you to generate
line spacings for a particular font size. Several hours later, I
regenerated the entirety of Auxio's typography to use this new system.
Moreso, I also tried to eliminate some of the non-standard text styles
that I was using prior. That failed. Mostly there's two edge-cases
regarding title bolding and the playback view that I simply cannot
work through right now, since M3's typography system is horribly
restrictive.
Add new shortcut utilities for collecting StateFlows in a safe manner.
The priamry addition here is collectImmediately. collectImmediately
just calls block with the existing value initially, which helps remove
a good amount of bugs regarding state initialization. Sure, it is a bit
inefficient given that it will also initialize on startup, but this is
okay.
The other utilities are the same, but simply remove the launch
boilerplate.
Add a new "Detail playback mode" option that allows one to configure
what selecting a song will do in an album/artist/genre.
This is mostly a clone of the prior setting, just in a new context.
Resolves#164.
Add a utility to easily work with lifecycle-dependent fragment objects.
This reduces the code duplication required to maintain objects that
would leak after the destruction of a fragment. We normally would not
do this as a delegate, as that usually entails some lifecycle wizardry
that can easily break and crash the app in esoteric situations.
However, this this just extends the normal lifecycle without watching
any state, it seems to be pretty safe to use.
Rework the preference classes to reduce the horrible bloat of the
recursivelyHandlePreference function.
This was mostly implementing new methods into IntListPreference and
adding a new preference to represent the weird, "generic" dialogs that
are used at points. While some preferences still need to be tweaked in
recursivelyHandlePreference, it is nowhere near as bad as it was prior.
Revamp the shared object SettingsManager into a standalone utility
called Settings.
This makes many things easier in Auxio. It completely unifies the key
format that we use (Android Strings instead of Java consts), eliminates
the pretty dumb initialization method that we use, and eliminates the
dubiousness of holding a Context-related utility in a global field.
The only cost was having to migrate even more ViewModels to Android
ViewModels. Whatever.
Add synchronized calls to all mutations in PlaybackStateManager.
I mean, it is global mutable state modified on several threads. This is
the safest option to remove a bunch of horrible bugs.
Add a controller role to PlaybackStateManager.
The controller manages the internal player, and acts as an intermediary
between other internal objects that want to modify the player, but
don't actually have access to it.
This makes a bunch of future changes far easier.
Add a shortcut to shuffle all songs.
This is likely the only static shortcut Auxio will have. Top tracks
and recently added are completely useless for me, so I will never
add them. I may add more dynamic shortcuts for recently played items,
however.
Note that we use a basic black shuffle icon here. I will not add icon
customization to these shortcuts.
Fix a visual issue with the queue animation where the playback view
will still slightly show.
This was caused by the lack of a background in the queue fragment UI.
Fix an issue where a seam might appear on some covers when rounded
covers was enabled.
This was caused by a poor usage of clipToOutline. Replace with simply
stacking existing image instances on top of eachother.
Remove the temporary 28dp hack that was applied to the playback bar.
This finally puts the playback bar in line with all other icon
components. The playback panel is still weird, but that's okay since
it's a full screen view and the buttons can take up more space.
Since I absolutely hate change, I had to effectively frog-boil myself
in order to do this, first downsizing the icon from 32dp to 28dp, and
then from 28dp down to 24dp. I can't believe I care about this so much.
Add a link to Weblate in the README, and bring it up in the FAQ.
Using weblate should make translations much easier. It's not fully
ready yet, and this is mostly a preliminary measure so I can apply
for the FOSS weblate.
Use ServiceCompat.stopForeground instead of stopForeground.
This is preliminary preparation for Android 13. I can only change SDK
versions however when the Android Gradle Plugin makes a new release
though.
Remove the animated indicator, replacing it with a static one.
I wish I could have kept this, but once again android is a sh******ed
mess and makes it impossible to dynamically animate something depending
on the playing state. It will restart the animation, ignore calls to
stop, or just flat out now run the code path in the first place due to
race conditions.
Further separate backend implementations to remove redundant tasks.
Generally, if I have not encountered an issue where a field is not
present/sane, I don't want to put in a "well, maybe" fallback, as
that would tank performance. Only do it when we need to.
Introduce MenuFragment in order to replace ActionMenu.
ActionMenu was a terrible class filled with hacks. Introduce a new
fragment called MenuFragment that enables the same features, plus:
1. Requiring consumers the specify the menu, which prevents issues
from one-size-fits-all menus (unless absolutely necessary)
2. Fixing an issue where multiple menus appear at once
Switch the excluded directory system to StorageVolume.
This finally removes dependence on the in-house Volume constructs, and
also completely extends fully music folder selection support to all
versions that Auxio supports.
This is possibly one of the most invasive and risky reworks I have done
with Auxio's music loader, but it's also somewhat exciting, as no other
music player I know of handles Volumes like I do.
Leverage StorageVolume when working with file paths.
StorageVolume is android's navive API for handling external volumes.
Ideally, we would want to replace our built-in volume class with this
new API, however doing so is somewhat complicated as some methods only
exist on newer API levels. This is only the first step until we are
able to migrate the excluded directory system to this as well.
Make some ViewModel instances AndroidViewModels in order to make some
code less insane.
I don't like doing this, as I want to keep ViewModel instances clean of
android things, but this just makes a lot of functionality easier to
implement.
Fix an issue where the collapsing toolbar would not preserve it's state
when navigating.
Apparently you need to add an ID to a view to get it's state to be
restored. There is no warning for this at all. Android, everyone.
Only show codecs in the "format" field, if we are able to extract them.
This is primarily for consistency, as there is no way for us to
determine the container format outside of an extension (which could not
be sane).
Fix an API 21-specific bug that could result in covers not loading when
quality covers was enabled.
This stemmed from a use of `use` on MediaMetadataRetriever, which
relied on an interface not present on the class on API 21.
Completely rework the excluded directory system into a new
"Music Folders" system.
This is implemented alongside a new "Include" mode. This mode
allows the user to restrict music indexing to a parsicular folder.
I've been reluctant to add this feature, as having two separate
options seemed bad. This resolves it by effectively packing whether
to include/exclude directories into a single option.
Resolves#154.
Add a non-queue version of the song menu to the playback panel.
While the original UI flow of clicking on each TextView to navigate
to a particular item is still present, this simply makes the action
more clear to a first-time user.
Heavily improve the way Auxio handles shows formats in the song
properties view.
This is composed of the following:
- Using ExoPlayer to find a format-specific mime type before having to
fall back to other solutions
- Keeping around the format and extension mime types so that each is
picked in the best circumstances
- Using MediaFormat to also retrieve a format-specific mime type in the
case that ExoPlayer parsing is disabled
- Adding special names for the most common formats
Remove scientific notation from the auxio icon, allowing me to
reintroduce it to the notification icon.
API 21 does not support scientific notation in vector drawables, so we
need to remove them from the icon for it to not crash the system ui.
Use basic scroll indicators when a dialog shows a list.
Mostly for material guidelines. Excluded dialogs and int pref dialog
have not been modified, as I am still working on revamping those.
Make it so that the rounded covers option is not dependent on the show
covers option.
Rounded covers has no relation to whether to show covers (at least not
anymore with the new cover style), so it makes no sense to disable it
when show covers is turned off.
Resolves#152.
Remove malformed songs that have a size of 0 bytes, but are still
present in MediaStore.
This issue only seems to occur when files are transferred via MTP, but
are not loaded due to storage issues.
Add support for file size, format, and parent directory values to the
MediaStore backend.
I hope that this handles API boundaries properly, especially regarding
path parsing. As a side-note, I have learned of a way to extend
external volume support to even earlier versions. Maybe.