music: attempt to handle bad DISPLAY_NAME [#120]

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.
This commit is contained in:
OxygenCobalt
2022-05-19 17:37:19 -06:00
parent 0b9141d474
commit 28cedd1240
4 changed files with 21 additions and 13 deletions
@@ -15,6 +15,7 @@
style="@style/Widget.Auxio.Image.Small"
android:src="@drawable/ic_song"
android:scaleType="matrix"
tools:src="@null"
app:layout_constraintBottom_toBottomOf="@+id/song_track"
app:layout_constraintEnd_toEndOf="@+id/song_track"
app:layout_constraintStart_toStartOf="@+id/song_track"
@@ -33,6 +34,7 @@
android:textAlignment="center"
android:textAppearance="@style/TextAppearance.Auxio.BodyLarge"
android:textColor="@color/sel_on_cover_bg"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/song_name"
app:layout_constraintHorizontal_bias="0.5"
+1 -2
View File
@@ -9,8 +9,7 @@
<org.oxycblt.auxio.coil.StyledImageView
android:id="@+id/disc_item"
style="@style/Widget.Auxio.Image.Small"
android:layout_width="@dimen/size_cover_compact"
android:scaleType="center"
android:scaleType="matrix"
android:src="@drawable/ic_album"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"