summaryrefslogtreecommitdiffstats
path: root/src/com/cyanogenmod/eleven/provider
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/cyanogenmod/eleven/provider')
-rw-r--r--src/com/cyanogenmod/eleven/provider/LocalizedStore.java9
-rw-r--r--src/com/cyanogenmod/eleven/provider/MusicDB.java3
2 files changed, 8 insertions, 4 deletions
diff --git a/src/com/cyanogenmod/eleven/provider/LocalizedStore.java b/src/com/cyanogenmod/eleven/provider/LocalizedStore.java
index 43367e6..d3a33d1 100644
--- a/src/com/cyanogenmod/eleven/provider/LocalizedStore.java
+++ b/src/com/cyanogenmod/eleven/provider/LocalizedStore.java
@@ -110,7 +110,7 @@ public class LocalizedStore {
SongSortColumns.ID + " INTEGER PRIMARY KEY," +
SongSortColumns.ARTIST_ID + " INTEGER NOT NULL," +
SongSortColumns.ALBUM_ID + " INTEGER NOT NULL," +
- SongSortColumns.NAME + " TEXT," +
+ SongSortColumns.NAME + " TEXT COLLATE LOCALIZED," +
SongSortColumns.NAME_LABEL + " TEXT," +
SongSortColumns.NAME_BUCKET + " INTEGER);",
@@ -137,8 +137,11 @@ public class LocalizedStore {
}
public void onUpgrade(final SQLiteDatabase db, final int oldVersion, final int newVersion) {
- // this table was created in version 3 so call the onCreate method if we hit that scenario
- if (oldVersion < 3 && newVersion >= 3) {
+ // this table was created in version 3 so call the onCreate method if oldVersion <= 2
+ // in version 4 we need to recreate the SongSortcolumns table so drop the table and call
+ // onCreate if oldVersion <= 3
+ if (oldVersion <= 3) {
+ db.execSQL("DROP TABLE IF EXISTS " + SongSortColumns.TABLE_NAME);
onCreate(db);
}
}
diff --git a/src/com/cyanogenmod/eleven/provider/MusicDB.java b/src/com/cyanogenmod/eleven/provider/MusicDB.java
index 8090626..84c64a0 100644
--- a/src/com/cyanogenmod/eleven/provider/MusicDB.java
+++ b/src/com/cyanogenmod/eleven/provider/MusicDB.java
@@ -30,11 +30,12 @@ public class MusicDB extends SQLiteOpenHelper {
* maintain data
* v3 Dec 4 2014 Add Sorting tables similar to Contacts to enable other languages like
* Chinese to properly sort as they would expect
+ * v4 Jan 6 2015 Missed Collate keyword on the LocalizedSongSortTable
*/
/* Version constant to increment when the database should be rebuilt */
- private static final int VERSION = 3;
+ private static final int VERSION = 4;
/* Name of database file */
public static final String DATABASENAME = "musicdb.db";