From 78af00b164499bd90eb0daf0fe90dd4bdb1074a5 Mon Sep 17 00:00:00 2001 From: Yorke Lee Date: Wed, 4 Sep 2013 14:08:14 -0700 Subject: Don't wipe subclass helper's tables in our upgrade steps Bug: 10618836 Change-Id: I086d082f69b85bfe5789cf4c20dd9f9da30cee87 --- src/com/android/dialer/database/DialerDatabaseHelper.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/com/android/dialer/database') 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; } -- cgit v1.2.3