Associate screenshots with original url.
Partial fix for http://b/issue?id=1949260 : can't get a thumb for
facebook.com. Associate the screenshot with the original url so
a bookmark that was redirected will still get updated with the
picture.
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index b28d892..e65e8e1 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -2978,12 +2978,13 @@
// If this is a bookmarked site, add a screenshot to the database.
// FIXME: When should we update? Every time?
- if (url != null) {
+ String original = view.getOriginalUrl();
+ if (original != null) {
// copied from BrowserBookmarksAdapter
- int query = url.indexOf('?');
- String noQuery = url;
+ int query = original.indexOf('?');
+ String noQuery = original;
if (query != -1) {
- noQuery = url.substring(0, query);
+ noQuery = original.substring(0, query);
}
String URL = noQuery + '?';
String[] selArgs = new String[] { noQuery, URL };