diff options
author | Yorke Lee <yorkelee@google.com> | 2013-09-04 14:08:14 -0700 |
---|---|---|
committer | Yorke Lee <yorkelee@google.com> | 2013-09-04 14:08:14 -0700 |
commit | 78af00b164499bd90eb0daf0fe90dd4bdb1074a5 (patch) | |
tree | 6f39c7f2b795a96b3f12bec75add856c6af4b905 /src | |
parent | 6bd2f2eef4a6882f43decbe481082a4f289f26eb (diff) |
Don't wipe subclass helper's tables in our upgrade steps
Bug: 10618836
Change-Id: I086d082f69b85bfe5789cf4c20dd9f9da30cee87
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/dialer/database/DialerDatabaseHelper.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/dialer/database/DialerDatabaseHelper.java b/src/com/android/dialer/database/DialerDatabaseHelper.java index 4bf8eda6b..e9d773561 100644 --- a/src/com/android/dialer/database/DialerDatabaseHelper.java +++ b/src/com/android/dialer/database/DialerDatabaseHelper.java @@ -337,6 +337,10 @@ public class DialerDatabaseHelper extends SQLiteOpenHelper { */ @Override public void onCreate(SQLiteDatabase db) { + setupTables(db); + } + + private void setupTables(SQLiteDatabase db) { dropTables(db); db.execSQL("CREATE TABLE " + Tables.SMARTDIAL_TABLE + " (" + SmartDialDbColumns._ID + " INTEGER PRIMARY KEY AUTOINCREMENT," + @@ -390,7 +394,7 @@ public class DialerDatabaseHelper extends SQLiteOpenHelper { } if (oldVersion < 4) { - onCreate(db); + setupTables(db); return; } |