[Android] Force restart the scan only if the preferences have been changed

Ludovic Fauvet git at videolan.org
Mon Oct 1 17:26:19 CEST 2012


vlc-ports/android | branch: master | Ludovic Fauvet <etix at videolan.org> | Mon Oct  1 17:23:38 2012 +0200| [63095c6ff13145f5a5804ce810b31c1b8b4f47e0] | committer: Ludovic Fauvet

Force restart the scan only if the preferences have been changed

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=63095c6ff13145f5a5804ce810b31c1b8b4f47e0
---

 vlc-android/src/org/videolan/vlc/gui/MainActivity.java |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
index 8172dab..e5f3567 100644
--- a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
@@ -309,7 +309,7 @@ public class MainActivity extends SherlockFragmentActivity {
 
         /* Load media items from database and storage */
         if (mScanNeeded)
-            MediaLibrary.getInstance(this).loadMediaItems(this, true);
+            MediaLibrary.getInstance(this).loadMediaItems(this);
 
         super.onResume();
     }
@@ -468,7 +468,7 @@ public class MainActivity extends SherlockFragmentActivity {
         super.onActivityResult(requestCode, resultCode, data);
         if (requestCode == ACTIVITY_RESULT_PREFERENCES) {
             if (resultCode == PreferencesActivity.RESULT_RESCAN)
-                mScanNeeded = true;
+                MediaLibrary.getInstance(this).loadMediaItems(this, true);
         }
     }
 



More information about the Android mailing list