[Android] Unnecessary check
Geoffrey Métais
git at videolan.org
Thu Feb 26 14:26:17 CET 2015
vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Feb 26 14:21:55 2015 +0100| [b1a631c0591f16000e957ba951dd742a167fee35] | committer: Geoffrey Métais
Unnecessary check
onUpgrade is only called when DB_VERSION changes
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=b1a631c0591f16000e957ba951dd742a167fee35
---
vlc-android/src/org/videolan/vlc/MediaDatabase.java | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/MediaDatabase.java b/vlc-android/src/org/videolan/vlc/MediaDatabase.java
index c20c1fd..d004883 100644
--- a/vlc-android/src/org/videolan/vlc/MediaDatabase.java
+++ b/vlc-android/src/org/videolan/vlc/MediaDatabase.java
@@ -268,10 +268,9 @@ public class MediaDatabase {
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
- if (oldVersion < DB_VERSION && newVersion == DB_VERSION) {
- dropMediaTableQuery(db);
- createMediaTableQuery(db);
- }
+ dropMediaTableQuery(db);
+ createMediaTableQuery(db);
+
// Upgrade incrementally from oldVersion to newVersion
for(int i = oldVersion+1; i <= newVersion; i++) {
switch(i) {
More information about the Android
mailing list