summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/BrowserProvider.java
diff options
context:
space:
mode:
authorLeon Scroggins <scroggo@google.com>2009-06-18 12:05:28 -0400
committerLeon Scroggins <scroggo@google.com>2009-06-18 17:01:59 -0400
commitb6b7f9ef3b4ed220063f555d8b7c205210a61a04 (patch)
treefeaa09ad4d5310921189e15cf1307091aa8e34b7 /src/com/android/browser/BrowserProvider.java
parent7874657df1a62c8e3b2b9fcc47570333664d6988 (diff)
downloadpackages_apps_browser-b6b7f9ef3b4ed220063f555d8b7c205210a61a04.zip
packages_apps_browser-b6b7f9ef3b4ed220063f555d8b7c205210a61a04.tar.gz
packages_apps_browser-b6b7f9ef3b4ed220063f555d8b7c205210a61a04.tar.bz2
Use a grid view for bookmarks page.
The BrowserProvider now stores another blob for a screenshot of the page. If the current page is a bookmark, store a screenshot. When viewing bookmarks, show a gridview of screenshots of the bookmarks. Requires a change to framework to add THUMBNAIL to Browser.BookmarkColumns and to the HISTORY_PROJECTION
Diffstat (limited to 'src/com/android/browser/BrowserProvider.java')
-rw-r--r--src/com/android/browser/BrowserProvider.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/com/android/browser/BrowserProvider.java b/src/com/android/browser/BrowserProvider.java
index 8743254..a3f249b 100644
--- a/src/com/android/browser/BrowserProvider.java
+++ b/src/com/android/browser/BrowserProvider.java
@@ -145,7 +145,8 @@ public class BrowserProvider extends ContentProvider {
// 15 -> 17 Set it up for the SearchManager
// 17 -> 18 Added favicon in bookmarks table for Home shortcuts
// 18 -> 19 Remove labels table
- private static final int DATABASE_VERSION = 19;
+ // 19 -> 20 Added thumbnail
+ private static final int DATABASE_VERSION = 20;
// Regular expression which matches http://, followed by some stuff, followed by
// optionally a trailing slash, all matched as separate groups.
@@ -214,7 +215,8 @@ public class BrowserProvider extends ContentProvider {
"created LONG," +
"description TEXT," +
"bookmark INTEGER," +
- "favicon BLOB DEFAULT NULL" +
+ "favicon BLOB DEFAULT NULL," +
+ "thumbnail BLOB DEFAULT NULL" +
");");
final CharSequence[] bookmarks = mContext.getResources()
@@ -241,9 +243,12 @@ public class BrowserProvider extends ContentProvider {
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
Log.w(TAG, "Upgrading database from version " + oldVersion + " to "
- + newVersion + ", which will destroy all old data");
+ + newVersion);
if (oldVersion == 18) {
db.execSQL("DROP TABLE IF EXISTS labels");
+ }
+ if (oldVersion <= 19) {
+ db.execSQL("ALTER TABLE bookmarks ADD COLUMN thumbnail BLOB DEFAULT NULL;");
} else {
db.execSQL("DROP TABLE IF EXISTS bookmarks");
db.execSQL("DROP TABLE IF EXISTS searches");