Remove the ripple resources and replace them with their system
counterparts.
This is to remove redundancy in-app and make the widget more consistent
with other android widgets.
Finally unify all icon activation states under the new grade modifier
in Material Symbols.
This provides similar clarify to the dot/greyed state, but without
inconsistent meanings. The shuffle icon did have to be bolded a little
more though, as the grade did not seem to do much.
Rework the UI flow for music loading to be more coherent with runtime
rescanning.
The loading progress is now shown as a card on the bottom of the
screen. This way, app use is not completely crippled when the app has
to rescan the music library, albeit the shuffle button still has to
be disabled during this period.
Revert the optional rounded corners on the bottom sheet.
It was causing too many bugs to be a sensible addition. I will only add
it if Google moves WindowInset application to layout time AND only on
devices with the stretch overscroll implemented.
Audit usages of Synchronized throughout the app to prevent deadlocks.
This is primarily composed of not making long-running work
synchronized, instead only making mutations and reads synchronized.
This does cause minor issues, such as during a sanitization event
the playback state could be feasibly saved, changed, and then restored
back to the previous state unintentionally. However, preventing
deadlocks is generally better than trying to fix those.
Use the @Synchronized annotation instead of synchronized.
Makes my ability to manage thread-safety on the shared objects much
easier. Because I don't have to think about what I should guard
and what I shouldn't.
Finally enable runtime rescanning, opening the door for a ton of new
features and automatic rescanning later on.
More work needs to be done on making the shared mutable state in-app
safer to use.
Improve the indexer callback system to be more coherent and efficient.
This delegates the old Callback role to a new singular Callback and
Controller roles. IndexerService also handles the loading process
more gracefully, reducing the amount of time music loads take.
Make notification updates entirely reliant on the MediaSession.
Android 11 and onwards automatically populate the notification with the
MediaSession state. This apparently conflicts with updating the
notification in some cases, resulting in the incorrect song being
shown. Fix this by not populating the notification from Android 11
onward and only posting it when the MediaSession state was set.
Resolves#179.
Remove WindowInsetsCompat from the project, as it is a pile of garbage.
WindowInsetsCompat refuses to actually update the correct fields when
you transform it back into a WindowInsets. This makes it impossible to
use in Auxio. The fact that Google decided to make such an
overengineered wrapper to some version-specific methods is an absolute
joke. All you needed were some extension functions, but no, let's make
an entire wrapper class filled with so many gotchas as to be unusable.
Rework the rounded covers option into a new "Round Mode" option.
This commit extends the rounded corners configuration to now the
widget, thus making the setting apply now to covers, the bar, and
the widget configuration. This makes a naming change useful.
Further rework the button layout to be alike to other modern widgets.
This changeset transforms the play button into a FAB-ish thing,
makes spacing coherent between the uses of each layout, and adds
spacers to make the buttons layout in a more appealing way.
Update the library update process to be on a co-routine, updating
callbacks on the main thread.
For some insane reason, the Main dispatcher used normally when
loading music just disappears sometimes. This leads to unpleasent
crashes as callbacks expect to be called on the app thread, not
any background threads.
Fix this by forcing the Main dispatcher during the update process.
This requires the music update process to also run on a background
thread, albeit that will be useful for automatic rescanning late ron.
Completely rework Auxio's iconography based on the new material symbols
icon set.
This does the following:
1. Switches the sharp + filled icon style to an outlined + round icon
style.
2. Removes 32dp icons from everywhere except the playback panel.
This does not:
1. Actually handle optical sizes right. This is going to take some more
work to make it harmonious with the current UI.
2. Update margins in some places to be harmonious with the new icons.
This is also going to take some more work to do properly.
Rework the bottom sheet layout process to accomodate the new rounded
corners and be far more efficient.
This removes the weird content layout code and moves it into the inset
code, which not only allows content to show in the corners, but also
allows us to minimize the amount of layouts that we normally perform.
Make BottomSheetLayout apply rounded corners when rounded covers is
enabled.
Draggable elements should be rounded, not straight, so this simply
makes this consistent. It does have one visual error as it stands,
stemming from the layout code allocating space for the bar and thus
clipping certain content. I hope to fix this soon.
Do not use collectImmediately when recreating tabs in the home menu.
This resulted in an issue where the ViewPager would not update to
reflect the new tab layout.
Fix several issues with the bottom sheet implementation, mostly
relating to what occurs when the bar is hidden.
Previously, if the bar was hidden and then re-shown, it would not be
visible, and you could override a hidden event with another tap. These
are now both resolved by removing a stray visibility assignment and
replacing the old drag checks with a new isDraggable attribute.
In the future, I hope to abuse BottomSheetBehavior into not being a
pile of garbage and replace this system once and for all.
Override isActive to control when the ReplayGain engine should
manipulate audio.
This makes the system much more efficient, as we can side-step a
useless copy when ReplayGain shouldn't be applied.
Remove the TitleMidLarge style, replacing it with more Material3
attributes.
This finally removes all of the non-standard text styles. There is
still the two TitleMedium styles, but this is considered okay.
In the playback view, TitleMidLarge has become TitleLarge, which
honestly works quite well, as the same text styles are used in the
detail views.
Force LTR on timeline controls, as per the Material Design guidelines.
The guidelines state that while "directional" UIs should be LTR/RTL
depending on locale, "timeline" UIs should always by LTR, as the
direction of time is universal. Auxio did not do this, and so the
timeline controls would be RTL on other elements. Fix this by forcing
LTR on the UI elements that correspond to timelines.
Now, this is not the best system. To ensure that the rest of the layout
remains sane, much of the directional views have to be wrapped in a
redundant layout, which is somewhat in-efficient. However, the impact
seems to be at least negligable.
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.