diff options
author | Yorke Lee <yorkelee@google.com> | 2013-09-04 21:58:19 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-09-04 21:58:19 +0000 |
commit | f1f0df7120069399417a64f03cd4d38de05446bc (patch) | |
tree | c28e419764c1930068dd7489409bd009bd350f75 | |
parent | 9b6c525d249e4092b9cabad573e4b37fa7aec946 (diff) | |
parent | 78af00b164499bd90eb0daf0fe90dd4bdb1074a5 (diff) |
Merge "Don't wipe subclass helper's tables in our upgrade steps" into klp-dev
-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; } |