Remove the excluded directory migration code, as it causes far more
issues than it fixes.
Due to an unfixable logic bug that occurs when trying to read the
setting, Auxio will always try to migrate the database when there is
no music folders, causing a hang in some situations. Fix it by just
removing the migration.
Add an abstraction over the generation system called GenerationGuard.
This allows cheap cooperative threading to be implemented consistently
in many places.
Hide the new quality tags option for now.
This is not because I wanted to, but rather because of me wanting to
reduce the amount of bugs I will likely be thrown due to the release
of automatic rescanning.
Add automatic rescanning, for real.
This is the culmination of 6 months of work to make Auxio respond to
music updates and to research the most versatile implementation of
such. Is it the best system? No. It's actually a bit messy by necessity
in order to prevent bugs. Does it work well? Yes.
This will not be enabled by default, as it does require a battery
draining foreground service and is generally not useful for most
circumstances.
So glad to be done with this.
Resolves#72.
Move the switch from IO to Main to within Indexer itself, through
withContext.
This is much easier to work with than the previous system of a separate
"update" coroutine, which isn't really needed anymore given that I no
longer need to do IO work when sanitizing the playback state.
Edge case I thought existed did not. PlaybackService must have saved
before dying, and thus if it did not foreground after a sanitization,
the saved state would still sanitize in a similar manner.
Save, but do not read the playback state when sanitizing.
Turns out there is an edge-case where we want to save the state. Still
keep the runtime sanitization, as that greatly reduces the time it
takes to rescan the library.
Do not save the playback state when sanitizing.
After some thought, there is no situation where re-saving the playback
state is desirable. A previously saved state will be consistent with
a sanitized state, and there is no need to save when the service is
active. Thus, save on speed and reduce insane race conditions by just
sanitizing the current runtime state and not saving at all.
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.