diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/browser/provider/BrowserProvider.java | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/src/com/android/browser/provider/BrowserProvider.java b/src/com/android/browser/provider/BrowserProvider.java index 744032c..0b3ef94 100644 --- a/src/com/android/browser/provider/BrowserProvider.java +++ b/src/com/android/browser/provider/BrowserProvider.java @@ -61,9 +61,6 @@ public class BrowserProvider extends ContentProvider { private static final String TAG = "BrowserProvider"; private static final String ORDER_BY = "visits DESC, date DESC"; - private static final String PICASA_URL = "http://picasaweb.google.com/m/" + - "viewer?source=androidclient"; - static final String[] TABLE_NAMES = new String[] { "bookmarks", "searches" }; @@ -405,44 +402,10 @@ public class BrowserProvider extends ContentProvider { } mOpenHelper = new DatabaseHelper(context); mBackupManager = new BackupManager(context); - // we added "picasa web album" into default bookmarks for version 19. - // To avoid erasing the bookmark table, we added it explicitly for - // version 18 and 19 as in the other cases, we will erase the table. - if (DATABASE_VERSION == 18 || DATABASE_VERSION == 19) { - SharedPreferences p = PreferenceManager - .getDefaultSharedPreferences(context); - boolean fix = p.getBoolean("fix_picasa", true); - if (fix) { - fixPicasaBookmark(); - Editor ed = p.edit(); - ed.putBoolean("fix_picasa", false); - ed.apply(); - } - } mSettings = BrowserSettings.getInstance(); return true; } - private void fixPicasaBookmark() { - SQLiteDatabase db = mOpenHelper.getWritableDatabase(); - Cursor cursor = db.rawQuery("SELECT _id FROM bookmarks WHERE " + - "bookmark = 1 AND url = ?", new String[] { PICASA_URL }); - try { - if (!cursor.moveToFirst()) { - // set "created" so that it will be on the top of the list - db.execSQL("INSERT INTO bookmarks (title, url, visits, " + - "date, created, bookmark)" + " VALUES('" + - getContext().getString(R.string.picasa) + "', '" - + PICASA_URL + "', 0, 0, " + new Date().getTime() - + ", 1);"); - } - } finally { - if (cursor != null) { - cursor.close(); - } - } - } - /* * Subclass AbstractCursor so we can combine multiple Cursors and add * "Search the web". |