Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1074892a authored by linus_lee's avatar linus_lee
Browse files

Eleven: Fix LocalizedSongSort - Missed Collate keyword

Change-Id: Ief86b3fea672bcc498a4560fab40486657cc2751
parent 5ff35e31
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -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);
        }
    }
+2 −1
Original line number Diff line number Diff line
@@ -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";