[Android] PlaybackService: Catch Notification failure

Geoffrey Métais git at videolan.org
Mon Feb 25 15:47:53 CET 2019


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Feb 25 11:48:35 2019 +0100| [ce12e2a7c6fbe80f1bea349cf469939befef23eb] | committer: Geoffrey Métais

PlaybackService: Catch Notification failure

Happens on Android 7.0, mostly on Xperia L1 (G3312)

> https://code.videolan.org/videolan/vlc-android/commit/ce12e2a7c6fbe80f1bea349cf469939befef23eb
---

 vlc-android/src/org/videolan/vlc/PlaybackService.kt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.kt b/vlc-android/src/org/videolan/vlc/PlaybackService.kt
index a97c20125..3ece6518b 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.kt
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.kt
@@ -700,6 +700,9 @@ class PlaybackService : MediaBrowserServiceCompat(), CoroutineScope, LifecycleOw
                     Log.e(TAG, "Failed to display notification", e)
                 } catch (e: IllegalStateException) {
                     Log.e(TAG, "Failed to display notification", e)
+                } catch (e: ArrayIndexOutOfBoundsException) {
+                    // Happens on Android 7.0 (Xperia L1 (G3312))
+                    Log.e(TAG, "Failed to display notification", e)
                 }
             }
         }



More information about the Android mailing list