1
0
Fork 1

No real thumbnail for audio files

Let's not try to decode as an image lol

(cherry picked from commit 4f927a124391fa99d86d3ad30789316fde2a69cb)
This commit is contained in:
Stephen Paul Weber 2024-09-18 22:18:33 +02:00 committed by Arne
parent eeab4e6d46
commit 045bd1a93f
2 changed files with 12 additions and 0 deletions

View file

@ -1359,6 +1359,8 @@ public class FileBackend {
thumbnail = new BitmapDrawable(res, getPdfDocumentPreview(file, size));
} else if (mime.startsWith("video/")) {
thumbnail = new BitmapDrawable(res, getVideoPreview(file, size));
} else if (mime.startsWith("audio/")) {
thumbnail = res.getDrawable(R.drawable.audio_file_24dp);
} else {
thumbnail = getImagePreview(file, res, size, mime);
if (thumbnail == null) {

View file

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M430,760Q468,760 494,734Q520,708 520,670L520,520L640,520L640,440L480,440L480,595Q469,587 456.5,583.5Q444,580 430,580Q392,580 366,606Q340,632 340,670Q340,708 366,734Q392,760 430,760ZM240,880Q207,880 183.5,856.5Q160,833 160,800L160,160Q160,127 183.5,103.5Q207,80 240,80L560,80L800,320L800,800Q800,833 776.5,856.5Q753,880 720,880L240,880ZM520,360L520,160L240,160Q240,160 240,160Q240,160 240,160L240,800Q240,800 240,800Q240,800 240,800L720,800Q720,800 720,800Q720,800 720,800L720,360L520,360ZM240,160L240,160L240,360L240,360L240,160L240,360L240,360L240,800Q240,800 240,800Q240,800 240,800L240,800Q240,800 240,800Q240,800 240,800L240,160Q240,160 240,160Q240,160 240,160Z"/>
</vector>