[Android] Show scan notification immediately

Geoffrey Métais git at videolan.org
Mon Feb 27 18:56:27 CET 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Feb 27 18:55:18 2017 +0100| [0a2ed7fa09e23ad4919e46ebb08ab6a872cfc96b] | committer: Geoffrey Métais

Show scan notification immediately

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

 vlc-android/src/org/videolan/vlc/MediaParsingService.java | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/MediaParsingService.java b/vlc-android/src/org/videolan/vlc/MediaParsingService.java
index 6144f71..f440e7a 100644
--- a/vlc-android/src/org/videolan/vlc/MediaParsingService.java
+++ b/vlc-android/src/org/videolan/vlc/MediaParsingService.java
@@ -43,7 +43,7 @@ public class MediaParsingService extends Service implements DevicesDiscoveryCb {
     private Medialibrary mMedialibrary;
     private int mParsing = 0, mReload = 0;
     private String mCurrentDiscovery = null;
-    private long mLastNotificationTime;
+    private long mLastNotificationTime = 0L;
     private BroadcastReceiver mReceiver = new BroadcastReceiver() {
         @Override
         public void onReceive(Context context, Intent intent) {
@@ -77,9 +77,6 @@ public class MediaParsingService extends Service implements DevicesDiscoveryCb {
         filter.addAction(ACTION_PAUSE_SCAN);
         filter.addAction(ACTION_RESUME_SCAN);
         registerReceiver(mReceiver, filter);
-        synchronized (this) {
-            mLastNotificationTime = System.currentTimeMillis();
-        }
         mMedialibrary.addDeviceDiscoveryCb(MediaParsingService.this);
         switch (intent.getAction()) {
             case ACTION_INIT:



More information about the Android mailing list