diff options
author | John Reck <jreck@google.com> | 2011-05-26 17:02:23 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2011-05-26 17:03:08 -0700 |
commit | b9b2a8290874e447444c7791647cbade915bc47d (patch) | |
tree | d995f69168f8444765cd3c4b90d40b82bb989d67 /src/com/android/browser/provider | |
parent | 74147ba74e6c7f40ffd55c9992bf3ae10ad1aecd (diff) | |
download | packages_apps_Browser-b9b2a8290874e447444c7791647cbade915bc47d.zip packages_apps_Browser-b9b2a8290874e447444c7791647cbade915bc47d.tar.gz packages_apps_Browser-b9b2a8290874e447444c7791647cbade915bc47d.tar.bz2 |
Remove sync setting
Change-Id: I7719c82a3a63d8ac8022e70e3a7f7b4a814e304f
Diffstat (limited to 'src/com/android/browser/provider')
-rw-r--r-- | src/com/android/browser/provider/BrowserProvider2.java | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/com/android/browser/provider/BrowserProvider2.java b/src/com/android/browser/provider/BrowserProvider2.java index a44f050..d9760e5 100644 --- a/src/com/android/browser/provider/BrowserProvider2.java +++ b/src/com/android/browser/provider/BrowserProvider2.java @@ -333,7 +333,7 @@ public class BrowserProvider2 extends SQLiteContentProvider { final class DatabaseHelper extends SQLiteOpenHelper { static final String DATABASE_NAME = "browser2.db"; - static final int DATABASE_VERSION = 27; + static final int DATABASE_VERSION = 28; public DatabaseHelper(Context context) { super(context, DATABASE_NAME, null, DATABASE_VERSION); } @@ -402,6 +402,15 @@ public class BrowserProvider2 extends SQLiteContentProvider { if (!importFromBrowserProvider(db)) { createDefaultBookmarks(db); } + + enableSync(db); + } + + void enableSync(SQLiteDatabase db) { + ContentValues values = new ContentValues(); + values.put(Settings.KEY, Settings.KEY_SYNC_ENABLED); + values.put(Settings.VALUE, 1); + insertSettingsInTransaction(db, values); } boolean importFromBrowserProvider(SQLiteDatabase db) { @@ -491,7 +500,9 @@ public class BrowserProvider2 extends SQLiteContentProvider { @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { - // TODO write upgrade logic + if (oldVersion < 28) { + enableSync(db); + } if (oldVersion < 27) { createAccountsView(db); } |