[Android] Make MediaParsingService foreground
Geoffrey Métais
git at videolan.org
Thu May 18 16:04:04 CEST 2017
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu May 18 15:54:35 2017 +0200| [921e7c3136499df2249e58608ccc912dcec975e8] | committer: Geoffrey Métais
Make MediaParsingService foreground
> https://code.videolan.org/videolan/vlc-android/commit/921e7c3136499df2249e58608ccc912dcec975e8
---
vlc-android/src/org/videolan/vlc/MediaParsingService.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/MediaParsingService.java b/vlc-android/src/org/videolan/vlc/MediaParsingService.java
index 0a2078c..ec8bc85 100644
--- a/vlc-android/src/org/videolan/vlc/MediaParsingService.java
+++ b/vlc-android/src/org/videolan/vlc/MediaParsingService.java
@@ -284,7 +284,7 @@ public class MediaParsingService extends Service implements DevicesDiscoveryCb {
synchronized (MediaParsingService.this) {
if (mLastNotificationTime != -1L) {
try {
- NotificationManagerCompat.from(MediaParsingService.this).notify(43, notification);
+ startForeground(43, notification);
} catch (IllegalArgumentException ignored) {}
}
}
More information about the Android
mailing list