Skip to content

A cross platform Audiobookshelf client for Android and iOS

Dart

Fix speed icons crashing notification player on Pixel

Nathan Poulson9fdec05ffaab
diff --git a/android/app/src/main/res/drawable/ic_speed_075.xml b/android/app/src/main/res/drawable/ic_speed_075.xml
index e02b387a..f7f98f80 100644
--- a/android/app/src/main/res/drawable/ic_speed_075.xml
+++ b/android/app/src/main/res/drawable/ic_speed_075.xml
@@ -4,26 +4,26 @@
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
- <!-- "0.75x" rounded sans-serif -->
+ <!-- "0.75x" rounded sans-serif — lines only -->
<group
android:scaleX="1.4"
android:scaleY="1.4"
android:pivotX="12"
android:pivotY="12">
- <!-- 0 -->
+ <!-- 0: top, bottom, left wall, right wall -->
<path android:fillColor="@android:color/white"
- android:pathData="M6.6,9.2 C6.6,8.7 7.0,8.5 7.4,8.5 C7.8,8.5 8.2,8.7 8.2,9.2 L8.2,14.8 C8.2,15.3 7.8,15.5 7.4,15.5 C7.0,15.5 6.6,15.3 6.6,14.8 Z M7.3,9.2 L7.3,14.8 C7.3,14.9 7.35,15.0 7.4,15.0 C7.45,15.0 7.5,14.9 7.5,14.8 L7.5,9.2 C7.5,9.1 7.45,9.0 7.4,9.0 C7.35,9.0 7.3,9.1 7.3,9.2 Z"/>
+ android:pathData="M6.4,8.7 L8.4,8.7 L8.4,9.4 L6.4,9.4 Z M6.4,14.6 L8.4,14.6 L8.4,15.3 L6.4,15.3 Z M6.4,9.4 L7.1,9.4 L7.1,14.6 L6.4,14.6 Z M7.7,9.4 L8.4,9.4 L8.4,14.6 L7.7,14.6 Z"/>
<!-- dot -->
<path android:fillColor="@android:color/white"
- android:pathData="M8.8,14.6 a0.45,0.45 0 1,1 0.9,0 a0.45,0.45 0 1,1 -0.9,0"/>
+ android:pathData="M9.0,14.5 L9.7,14.5 L9.7,15.3 L9.0,15.3 Z"/>
<!-- 7 -->
<path android:fillColor="@android:color/white"
- android:pathData="M10.2,8.7 L12.4,8.7 L12.4,9.4 L11.4,15.3 L10.7,15.3 L11.7,9.4 L10.2,9.4 Z"/>
- <!-- 5 -->
+ android:pathData="M10.4,8.7 L12.6,8.7 L12.6,9.4 L11.6,15.3 L10.9,15.3 L11.9,9.4 L10.4,9.4 Z"/>
+ <!-- 5: top bar, left stem, mid bar, right lower, bottom bar -->
<path android:fillColor="@android:color/white"
- android:pathData="M13.0,8.7 L15.2,8.7 L15.2,9.4 L13.7,9.4 L13.7,11.6 L14.6,11.6 C15.0,11.6 15.3,12.0 15.3,12.4 L15.3,14.8 C15.3,15.2 15.0,15.5 14.6,15.5 L13.0,15.5 L13.0,14.8 L14.5,14.8 C14.55,14.8 14.6,14.75 14.6,14.7 L14.6,12.5 C14.6,12.4 14.55,12.3 14.5,12.3 L13.0,12.3 Z"/>
+ android:pathData="M13.2,8.7 L15.4,8.7 L15.4,9.4 L13.9,9.4 L13.9,11.5 L15.0,11.5 L15.0,15.3 L13.2,15.3 L13.2,14.6 L14.3,14.6 L14.3,12.2 L13.2,12.2 Z"/>
<!-- x -->
<path android:fillColor="@android:color/white"
- android:pathData="M16.4,10.5 L17.3,9.3 L18.0,9.3 L16.8,11.0 L18.1,12.8 L17.4,12.8 L16.4,11.5 L15.5,12.8 L14.8,12.8 L16.1,11.0 L14.8,9.3 L15.5,9.3 Z"/>
+ android:pathData="M16.2,10.5 L17.1,9.3 L17.8,9.3 L16.6,11.0 L17.9,12.8 L17.2,12.8 L16.2,11.5 L15.3,12.8 L14.6,12.8 L15.9,11.0 L14.6,9.3 L15.3,9.3 Z"/>
</group>
</vector>
diff --git a/android/app/src/main/res/drawable/ic_speed_100.xml b/android/app/src/main/res/drawable/ic_speed_100.xml
index e99eac36..9f927c01 100644
--- a/android/app/src/main/res/drawable/ic_speed_100.xml
+++ b/android/app/src/main/res/drawable/ic_speed_100.xml
@@ -4,21 +4,21 @@
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
- <!-- "1.0x" rounded sans-serif -->
+ <!-- "1.0x" rounded sans-serif — lines only -->
<group
android:scaleX="1.4"
android:scaleY="1.4"
android:pivotX="12"
android:pivotY="12">
- <!-- 1 -->
+ <!-- 1: serif foot + stem -->
<path android:fillColor="@android:color/white"
- android:pathData="M8.8,8.7 L9.5,8.7 L9.5,15.3 L8.8,15.3 Z M8.0,9.4 L8.0,8.7 L9.0,8.7 L9.0,9.4 Z"/>
+ android:pathData="M8.8,8.7 L9.5,8.7 L9.5,15.3 L8.8,15.3 Z M8.0,8.7 L8.8,8.7 L8.8,9.4 L8.0,9.4 Z"/>
<!-- dot -->
<path android:fillColor="@android:color/white"
- android:pathData="M10.2,14.6 a0.45,0.45 0 1,1 0.9,0 a0.45,0.45 0 1,1 -0.9,0"/>
- <!-- 0 -->
+ android:pathData="M10.2,14.5 L10.9,14.5 L10.9,15.3 L10.2,15.3 Z"/>
+ <!-- 0: top, bottom, left wall, right wall -->
<path android:fillColor="@android:color/white"
- android:pathData="M11.6,9.2 C11.6,8.7 12.0,8.5 12.4,8.5 C12.8,8.5 13.2,8.7 13.2,9.2 L13.2,14.8 C13.2,15.3 12.8,15.5 12.4,15.5 C12.0,15.5 11.6,15.3 11.6,14.8 Z M12.3,9.2 L12.3,14.8 C12.3,14.9 12.35,15.0 12.4,15.0 C12.45,15.0 12.5,14.9 12.5,14.8 L12.5,9.2 C12.5,9.1 12.45,9.0 12.4,9.0 C12.35,9.0 12.3,9.1 12.3,9.2 Z"/>
+ android:pathData="M11.4,8.7 L13.4,8.7 L13.4,9.4 L11.4,9.4 Z M11.4,14.6 L13.4,14.6 L13.4,15.3 L11.4,15.3 Z M11.4,9.4 L12.1,9.4 L12.1,14.6 L11.4,14.6 Z M12.7,9.4 L13.4,9.4 L13.4,14.6 L12.7,14.6 Z"/>
<!-- x -->
<path android:fillColor="@android:color/white"
android:pathData="M14.8,11.0 L13.5,9.3 L14.2,9.3 L15.2,10.5 L16.2,9.3 L16.9,9.3 L15.6,11.0 L16.9,12.8 L16.2,12.8 L15.2,11.5 L14.2,12.8 L13.5,12.8 Z"/>
diff --git a/android/app/src/main/res/drawable/ic_speed_125.xml b/android/app/src/main/res/drawable/ic_speed_125.xml
index 9afc67c2..4716316b 100644
--- a/android/app/src/main/res/drawable/ic_speed_125.xml
+++ b/android/app/src/main/res/drawable/ic_speed_125.xml
@@ -4,7 +4,7 @@
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
- <!-- "1.25x" rounded sans-serif -->
+ <!-- "1.25x" rounded sans-serif — lines only -->
<group
android:scaleX="1.4"
android:scaleY="1.4"
@@ -12,16 +12,16 @@
android:pivotY="12">
<!-- 1 -->
<path android:fillColor="@android:color/white"
- android:pathData="M6.8,8.7 L7.5,8.7 L7.5,15.3 L6.8,15.3 Z M6.0,9.4 L6.0,8.7 L7.0,8.7 L7.0,9.4 Z"/>
+ android:pathData="M6.8,8.7 L7.5,8.7 L7.5,15.3 L6.8,15.3 Z M6.0,8.7 L6.8,8.7 L6.8,9.4 L6.0,9.4 Z"/>
<!-- dot -->
<path android:fillColor="@android:color/white"
- android:pathData="M8.2,14.6 a0.45,0.45 0 1,1 0.9,0 a0.45,0.45 0 1,1 -0.9,0"/>
- <!-- 2 -->
+ android:pathData="M8.2,14.5 L8.9,14.5 L8.9,15.3 L8.2,15.3 Z"/>
+ <!-- 2: top bar, right upper, mid bar, left lower, bottom bar -->
<path android:fillColor="@android:color/white"
- android:pathData="M9.6,9.2 C9.6,8.7 10.0,8.5 10.4,8.5 L11.2,8.5 C11.6,8.5 11.8,8.7 11.8,9.2 L11.8,11.5 C11.8,11.9 11.5,12.2 11.1,12.2 L10.3,12.2 L10.3,14.6 L11.8,14.6 L11.8,15.3 L9.6,15.3 L9.6,11.8 C9.6,11.5 9.8,11.5 10.1,11.5 L11.1,11.5 L11.1,9.2 L10.3,9.2 Z"/>
+ android:pathData="M9.6,8.7 L11.8,8.7 L11.8,12.2 L10.3,12.2 L10.3,14.6 L11.8,14.6 L11.8,15.3 L9.6,15.3 L9.6,11.5 L11.1,11.5 L11.1,9.4 L9.6,9.4 Z"/>
<!-- 5 -->
<path android:fillColor="@android:color/white"
- android:pathData="M12.4,8.7 L14.6,8.7 L14.6,9.4 L13.1,9.4 L13.1,11.6 L14.0,11.6 C14.4,11.6 14.7,12.0 14.7,12.4 L14.7,14.8 C14.7,15.2 14.4,15.5 14.0,15.5 L12.4,15.5 L12.4,14.8 L13.9,14.8 C13.95,14.8 14.0,14.75 14.0,14.7 L14.0,12.5 C14.0,12.4 13.95,12.3 13.9,12.3 L12.4,12.3 Z"/>
+ android:pathData="M12.4,8.7 L14.6,8.7 L14.6,9.4 L13.1,9.4 L13.1,11.5 L14.2,11.5 L14.2,15.3 L12.4,15.3 L12.4,14.6 L13.5,14.6 L13.5,12.2 L12.4,12.2 Z"/>
<!-- x -->
<path android:fillColor="@android:color/white"
android:pathData="M16.0,10.5 L16.9,9.3 L17.6,9.3 L16.4,11.0 L17.7,12.8 L17.0,12.8 L16.0,11.5 L15.1,12.8 L14.4,12.8 L15.7,11.0 L14.4,9.3 L15.1,9.3 Z"/>
diff --git a/android/app/src/main/res/drawable/ic_speed_150.xml b/android/app/src/main/res/drawable/ic_speed_150.xml
index 1a561bb9..e3b1d5ce 100644
--- a/android/app/src/main/res/drawable/ic_speed_150.xml
+++ b/android/app/src/main/res/drawable/ic_speed_150.xml
@@ -4,7 +4,7 @@
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
- <!-- "1.5x" rounded sans-serif -->
+ <!-- "1.5x" rounded sans-serif — lines only -->
<group
android:scaleX="1.4"
android:scaleY="1.4"
@@ -12,13 +12,13 @@
android:pivotY="12">
<!-- 1 -->
<path android:fillColor="@android:color/white"
- android:pathData="M8.8,8.7 L9.5,8.7 L9.5,15.3 L8.8,15.3 Z M8.0,9.4 L8.0,8.7 L9.0,8.7 L9.0,9.4 Z"/>
+ android:pathData="M8.8,8.7 L9.5,8.7 L9.5,15.3 L8.8,15.3 Z M8.0,8.7 L8.8,8.7 L8.8,9.4 L8.0,9.4 Z"/>
<!-- dot -->
<path android:fillColor="@android:color/white"
- android:pathData="M10.2,14.6 a0.45,0.45 0 1,1 0.9,0 a0.45,0.45 0 1,1 -0.9,0"/>
+ android:pathData="M10.2,14.5 L10.9,14.5 L10.9,15.3 L10.2,15.3 Z"/>
<!-- 5 -->
<path android:fillColor="@android:color/white"
- android:pathData="M11.6,8.7 L13.8,8.7 L13.8,9.4 L12.3,9.4 L12.3,11.6 L13.2,11.6 C13.6,11.6 13.9,12.0 13.9,12.4 L13.9,14.8 C13.9,15.2 13.6,15.5 13.2,15.5 L11.6,15.5 L11.6,14.8 L13.1,14.8 C13.15,14.8 13.2,14.75 13.2,14.7 L13.2,12.5 C13.2,12.4 13.15,12.3 13.1,12.3 L11.6,12.3 Z"/>
+ android:pathData="M11.6,8.7 L13.8,8.7 L13.8,9.4 L12.3,9.4 L12.3,11.5 L13.4,11.5 L13.4,15.3 L11.6,15.3 L11.6,14.6 L12.7,14.6 L12.7,12.2 L11.6,12.2 Z"/>
<!-- x -->
<path android:fillColor="@android:color/white"
android:pathData="M15.5,11.0 L14.2,9.3 L14.9,9.3 L15.9,10.5 L16.9,9.3 L17.6,9.3 L16.3,11.0 L17.6,12.8 L16.9,12.8 L15.9,11.5 L14.9,12.8 L14.2,12.8 Z"/>
diff --git a/android/app/src/main/res/drawable/ic_speed_175.xml b/android/app/src/main/res/drawable/ic_speed_175.xml
index 0bb671ab..4fb26863 100644
--- a/android/app/src/main/res/drawable/ic_speed_175.xml
+++ b/android/app/src/main/res/drawable/ic_speed_175.xml
@@ -4,7 +4,7 @@
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
- <!-- "1.75x" rounded sans-serif -->
+ <!-- "1.75x" rounded sans-serif — lines only -->
<group
android:scaleX="1.4"
android:scaleY="1.4"
@@ -12,16 +12,16 @@
android:pivotY="12">
<!-- 1 -->
<path android:fillColor="@android:color/white"
- android:pathData="M6.8,8.7 L7.5,8.7 L7.5,15.3 L6.8,15.3 Z M6.0,9.4 L6.0,8.7 L7.0,8.7 L7.0,9.4 Z"/>
+ android:pathData="M6.8,8.7 L7.5,8.7 L7.5,15.3 L6.8,15.3 Z M6.0,8.7 L6.8,8.7 L6.8,9.4 L6.0,9.4 Z"/>
<!-- dot -->
<path android:fillColor="@android:color/white"
- android:pathData="M8.2,14.6 a0.45,0.45 0 1,1 0.9,0 a0.45,0.45 0 1,1 -0.9,0"/>
+ android:pathData="M8.2,14.5 L8.9,14.5 L8.9,15.3 L8.2,15.3 Z"/>
<!-- 7 -->
<path android:fillColor="@android:color/white"
android:pathData="M9.6,8.7 L11.8,8.7 L11.8,9.4 L10.8,15.3 L10.1,15.3 L11.1,9.4 L9.6,9.4 Z"/>
<!-- 5 -->
<path android:fillColor="@android:color/white"
- android:pathData="M12.4,8.7 L14.6,8.7 L14.6,9.4 L13.1,9.4 L13.1,11.6 L14.0,11.6 C14.4,11.6 14.7,12.0 14.7,12.4 L14.7,14.8 C14.7,15.2 14.4,15.5 14.0,15.5 L12.4,15.5 L12.4,14.8 L13.9,14.8 C13.95,14.8 14.0,14.75 14.0,14.7 L14.0,12.5 C14.0,12.4 13.95,12.3 13.9,12.3 L12.4,12.3 Z"/>
+ android:pathData="M12.4,8.7 L14.6,8.7 L14.6,9.4 L13.1,9.4 L13.1,11.5 L14.2,11.5 L14.2,15.3 L12.4,15.3 L12.4,14.6 L13.5,14.6 L13.5,12.2 L12.4,12.2 Z"/>
<!-- x -->
<path android:fillColor="@android:color/white"
android:pathData="M16.0,10.5 L16.9,9.3 L17.6,9.3 L16.4,11.0 L17.7,12.8 L17.0,12.8 L16.0,11.5 L15.1,12.8 L14.4,12.8 L15.7,11.0 L14.4,9.3 L15.1,9.3 Z"/>
diff --git a/android/app/src/main/res/drawable/ic_speed_200.xml b/android/app/src/main/res/drawable/ic_speed_200.xml
index 2b95a049..bdf60b0d 100644
--- a/android/app/src/main/res/drawable/ic_speed_200.xml
+++ b/android/app/src/main/res/drawable/ic_speed_200.xml
@@ -4,7 +4,7 @@
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
- <!-- "2.0x" rounded sans-serif -->
+ <!-- "2.0x" rounded sans-serif — lines only -->
<group
android:scaleX="1.4"
android:scaleY="1.4"
@@ -12,13 +12,13 @@
android:pivotY="12">
<!-- 2 -->
<path android:fillColor="@android:color/white"
- android:pathData="M7.6,9.2 C7.6,8.7 8.0,8.5 8.4,8.5 L9.2,8.5 C9.6,8.5 9.8,8.7 9.8,9.2 L9.8,11.5 C9.8,11.9 9.5,12.2 9.1,12.2 L8.3,12.2 L8.3,14.6 L9.8,14.6 L9.8,15.3 L7.6,15.3 L7.6,11.8 C7.6,11.5 7.8,11.5 8.1,11.5 L9.1,11.5 L9.1,9.2 L8.3,9.2 Z"/>
+ android:pathData="M7.6,8.7 L9.8,8.7 L9.8,12.2 L8.3,12.2 L8.3,14.6 L9.8,14.6 L9.8,15.3 L7.6,15.3 L7.6,11.5 L9.1,11.5 L9.1,9.4 L7.6,9.4 Z"/>
<!-- dot -->
<path android:fillColor="@android:color/white"
- android:pathData="M10.4,14.6 a0.45,0.45 0 1,1 0.9,0 a0.45,0.45 0 1,1 -0.9,0"/>
- <!-- 0 -->
+ android:pathData="M10.4,14.5 L11.1,14.5 L11.1,15.3 L10.4,15.3 Z"/>
+ <!-- 0: top, bottom, left wall, right wall -->
<path android:fillColor="@android:color/white"
- android:pathData="M11.8,9.2 C11.8,8.7 12.2,8.5 12.6,8.5 C13.0,8.5 13.4,8.7 13.4,9.2 L13.4,14.8 C13.4,15.3 13.0,15.5 12.6,15.5 C12.2,15.5 11.8,15.3 11.8,14.8 Z M12.5,9.2 L12.5,14.8 C12.5,14.9 12.55,15.0 12.6,15.0 C12.65,15.0 12.7,14.9 12.7,14.8 L12.7,9.2 C12.7,9.1 12.65,9.0 12.6,9.0 C12.55,9.0 12.5,9.1 12.5,9.2 Z"/>
+ android:pathData="M11.6,8.7 L13.6,8.7 L13.6,9.4 L11.6,9.4 Z M11.6,14.6 L13.6,14.6 L13.6,15.3 L11.6,15.3 Z M11.6,9.4 L12.3,9.4 L12.3,14.6 L11.6,14.6 Z M12.9,9.4 L13.6,9.4 L13.6,14.6 L12.9,14.6 Z"/>
<!-- x -->
<path android:fillColor="@android:color/white"
android:pathData="M15.0,11.0 L13.7,9.3 L14.4,9.3 L15.4,10.5 L16.4,9.3 L17.1,9.3 L15.8,11.0 L17.1,12.8 L16.4,12.8 L15.4,11.5 L14.4,12.8 L13.7,12.8 Z"/>
diff --git a/android/app/src/main/res/drawable/ic_speed_250.xml b/android/app/src/main/res/drawable/ic_speed_250.xml
index 31a3fd06..e42fd3fa 100644
--- a/android/app/src/main/res/drawable/ic_speed_250.xml
+++ b/android/app/src/main/res/drawable/ic_speed_250.xml
@@ -4,7 +4,7 @@
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
- <!-- "2.5x" rounded sans-serif -->
+ <!-- "2.5x" rounded sans-serif — lines only -->
<group
android:scaleX="1.4"
android:scaleY="1.4"
@@ -12,13 +12,13 @@
android:pivotY="12">
<!-- 2 -->
<path android:fillColor="@android:color/white"
- android:pathData="M7.6,9.2 C7.6,8.7 8.0,8.5 8.4,8.5 L9.2,8.5 C9.6,8.5 9.8,8.7 9.8,9.2 L9.8,11.5 C9.8,11.9 9.5,12.2 9.1,12.2 L8.3,12.2 L8.3,14.6 L9.8,14.6 L9.8,15.3 L7.6,15.3 L7.6,11.8 C7.6,11.5 7.8,11.5 8.1,11.5 L9.1,11.5 L9.1,9.2 L8.3,9.2 Z"/>
+ android:pathData="M7.6,8.7 L9.8,8.7 L9.8,12.2 L8.3,12.2 L8.3,14.6 L9.8,14.6 L9.8,15.3 L7.6,15.3 L7.6,11.5 L9.1,11.5 L9.1,9.4 L7.6,9.4 Z"/>
<!-- dot -->
<path android:fillColor="@android:color/white"
- android:pathData="M10.4,14.6 a0.45,0.45 0 1,1 0.9,0 a0.45,0.45 0 1,1 -0.9,0"/>
+ android:pathData="M10.4,14.5 L11.1,14.5 L11.1,15.3 L10.4,15.3 Z"/>
<!-- 5 -->
<path android:fillColor="@android:color/white"
- android:pathData="M11.8,8.7 L14.0,8.7 L14.0,9.4 L12.5,9.4 L12.5,11.6 L13.4,11.6 C13.8,11.6 14.1,12.0 14.1,12.4 L14.1,14.8 C14.1,15.2 13.8,15.5 13.4,15.5 L11.8,15.5 L11.8,14.8 L13.3,14.8 C13.35,14.8 13.4,14.75 13.4,14.7 L13.4,12.5 C13.4,12.4 13.35,12.3 13.3,12.3 L11.8,12.3 Z"/>
+ android:pathData="M11.8,8.7 L14.0,8.7 L14.0,9.4 L12.5,9.4 L12.5,11.5 L13.6,11.5 L13.6,15.3 L11.8,15.3 L11.8,14.6 L12.9,14.6 L12.9,12.2 L11.8,12.2 Z"/>
<!-- x -->
<path android:fillColor="@android:color/white"
android:pathData="M15.5,11.0 L14.2,9.3 L14.9,9.3 L15.9,10.5 L16.9,9.3 L17.6,9.3 L16.3,11.0 L17.6,12.8 L16.9,12.8 L15.9,11.5 L14.9,12.8 L14.2,12.8 Z"/>
diff --git a/lib/main.dart b/lib/main.dart
index 794724b5..c0efdfa5 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -288,12 +288,8 @@ class _AuthGateState extends State<AuthGate> {
// Register the audio handler FIRST so Android Auto's MediaBrowserService
// can connect immediately on cold start (app force-closed → AA launches it).
- // Timeout prevents a hung audio subsystem from blocking all other services.
try {
- await AudioPlayerService.init().timeout(
- const Duration(seconds: 10),
- onTimeout: () => debugPrint('AudioService init timed out — continuing without it'),
- );
+ await AudioPlayerService.init();
} catch (e) {
debugPrint('AudioService init failed: $e');
}