[Android] Catch IllegalStateException for notification

Geoffrey Métais git at videolan.org
Wed Oct 11 11:10:45 CEST 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Oct 11 10:59:33 2017 +0200| [10730bdd9d82b8660d18da6ae2dab5ce04eb6ab2] | committer: Geoffrey Métais

Catch IllegalStateException for notification

On some Android 4.4 devices, bitmap appear to get recycled sometimes

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

 vlc-android/src/org/videolan/vlc/PlaybackService.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.java b/vlc-android/src/org/videolan/vlc/PlaybackService.java
index 8a37e813c..3c5c6b408 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -978,7 +978,7 @@ public class PlaybackService extends MediaBrowserServiceCompat implements IVLCVo
                             }
                             NotificationManagerCompat.from(ctx).notify(3, notification);
                         }
-                    } catch (IllegalArgumentException e){
+                    } catch (IllegalArgumentException|IllegalStateException e){
                         // On somme crappy firmwares, shit can happen
                         Log.e(TAG, "Failed to display notification", e);
                     }



More information about the Android mailing list