music: improve indexer callback impl

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.
This commit is contained in:
OxygenCobalt
2022-07-02 15:31:01 -06:00
parent 49a964705b
commit bbf3b1778b
12 changed files with 177 additions and 132 deletions
+4 -4
View File
@@ -81,7 +81,7 @@
<android.widget.ImageButton
android:id="@+id/widget_repeat"
style="@style/Widget.Auxio.PlaybackButton.AppWidget"
style="@style/Widget.Auxio.MaterialButton.AppWidget"
android:layout_width="@dimen/size_btn"
android:layout_height="@dimen/size_btn"
android:contentDescription="@string/desc_change_repeat"
@@ -94,7 +94,7 @@
<android.widget.ImageButton
android:id="@+id/widget_skip_prev"
style="@style/Widget.Auxio.PlaybackButton.AppWidget"
style="@style/Widget.Auxio.MaterialButton.AppWidget"
android:layout_width="@dimen/size_btn"
android:layout_height="@dimen/size_btn"
android:contentDescription="@string/desc_skip_prev"
@@ -122,7 +122,7 @@
<android.widget.ImageButton
android:id="@+id/widget_skip_next"
style="@style/Widget.Auxio.PlaybackButton.AppWidget"
style="@style/Widget.Auxio.MaterialButton.AppWidget"
android:layout_width="@dimen/size_btn"
android:layout_height="@dimen/size_btn"
android:contentDescription="@string/desc_skip_next"
@@ -135,7 +135,7 @@
<android.widget.ImageButton
android:id="@+id/widget_shuffle"
style="@style/Widget.Auxio.PlaybackButton.AppWidget"
style="@style/Widget.Auxio.MaterialButton.AppWidget"
android:layout_width="@dimen/size_btn"
android:layout_height="@dimen/size_btn"
android:contentDescription="@string/desc_shuffle"
+2 -2
View File
@@ -79,7 +79,7 @@
<android.widget.ImageButton
android:id="@+id/widget_skip_prev"
style="@style/Widget.Auxio.PlaybackButton.AppWidget"
style="@style/Widget.Auxio.MaterialButton.AppWidget"
android:layout_width="@dimen/size_btn"
android:layout_height="@dimen/size_btn"
android:contentDescription="@string/desc_skip_prev"
@@ -107,7 +107,7 @@
<android.widget.ImageButton
android:id="@+id/widget_skip_next"
style="@style/Widget.Auxio.PlaybackButton.AppWidget"
style="@style/Widget.Auxio.MaterialButton.AppWidget"
android:layout_width="@dimen/size_btn"
android:layout_height="@dimen/size_btn"
android:contentDescription="@string/desc_skip_next"
+2 -2
View File
@@ -68,7 +68,7 @@
<android.widget.ImageButton
android:id="@+id/widget_skip_prev"
style="@style/Widget.Auxio.PlaybackButton.AppWidget"
style="@style/Widget.Auxio.MaterialButton.AppWidget"
android:layout_width="@dimen/size_btn"
android:layout_height="@dimen/size_btn"
android:contentDescription="@string/desc_skip_prev"
@@ -94,7 +94,7 @@
<android.widget.ImageButton
android:id="@+id/widget_skip_next"
style="@style/Widget.Auxio.PlaybackButton.AppWidget"
style="@style/Widget.Auxio.MaterialButton.AppWidget"
android:layout_width="@dimen/size_btn"
android:layout_height="@dimen/size_btn"
android:contentDescription="@string/desc_skip_next"
+4 -4
View File
@@ -55,7 +55,7 @@
<android.widget.ImageButton
android:id="@+id/widget_repeat"
style="@style/Widget.Auxio.PlaybackButton.AppWidget"
style="@style/Widget.Auxio.MaterialButton.AppWidget"
android:layout_width="@dimen/size_btn"
android:layout_height="@dimen/size_btn"
android:contentDescription="@string/desc_change_repeat"
@@ -68,7 +68,7 @@
<android.widget.ImageButton
android:id="@+id/widget_skip_prev"
style="@style/Widget.Auxio.PlaybackButton.AppWidget"
style="@style/Widget.Auxio.MaterialButton.AppWidget"
android:layout_width="@dimen/size_btn"
android:layout_height="@dimen/size_btn"
android:contentDescription="@string/desc_skip_prev"
@@ -95,7 +95,7 @@
<android.widget.ImageButton
android:id="@+id/widget_skip_next"
style="@style/Widget.Auxio.PlaybackButton.AppWidget"
style="@style/Widget.Auxio.MaterialButton.AppWidget"
android:layout_width="@dimen/size_btn"
android:layout_height="@dimen/size_btn"
android:contentDescription="@string/desc_skip_next"
@@ -108,7 +108,7 @@
<android.widget.ImageButton
android:id="@+id/widget_shuffle"
style="@style/Widget.Auxio.PlaybackButton.AppWidget"
style="@style/Widget.Auxio.MaterialButton.AppWidget"
android:layout_width="@dimen/size_btn"
android:layout_height="@dimen/size_btn"
android:contentDescription="@string/desc_shuffle"
+1 -1
View File
@@ -49,7 +49,7 @@
</style>
<!-- A variant of PlaybackButton that plays along with AppWidget restrictions. -->
<style name="Widget.Auxio.PlaybackButton.AppWidget" parent="Widget.AppCompat.Button.Borderless">
<style name="Widget.Auxio.MaterialButton.AppWidget" parent="Widget.AppCompat.Button.Borderless">
<item name="android:minHeight">@dimen/size_btn</item>
<item name="android:background">@drawable/ui_remote_ripple</item>
</style>