diff options
-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; } |