summaryrefslogtreecommitdiffstats
path: root/src/com/android
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2010-07-20 02:25:23 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-07-20 02:25:23 -0700
commit58008e25deb346bef221ba12d48cd72910fad2bf (patch)
tree58740362b808a0b0a41832e38037e38164b4aad6 /src/com/android
parent120239f992761e54fadc09d5d95211a03c5dcb7e (diff)
parentccb5de06714993c28d16f1e5abfcd9f0b1e656fc (diff)
downloadpackages_apps_Browser-58008e25deb346bef221ba12d48cd72910fad2bf.zip
packages_apps_Browser-58008e25deb346bef221ba12d48cd72910fad2bf.tar.gz
packages_apps_Browser-58008e25deb346bef221ba12d48cd72910fad2bf.tar.bz2
Merge "Fix NPEs after merge of d159ec534823b87f9896843e95912b0df8c27e16 from open source master."
Diffstat (limited to 'src/com/android')
-rw-r--r--src/com/android/browser/AddBookmarkPage.java2
-rw-r--r--src/com/android/browser/BrowserActivity.java2
-rw-r--r--src/com/android/browser/DownloadTouchIcon.java11
3 files changed, 8 insertions, 7 deletions
diff --git a/src/com/android/browser/AddBookmarkPage.java b/src/com/android/browser/AddBookmarkPage.java
index 104a495..10c91f8 100644
--- a/src/com/android/browser/AddBookmarkPage.java
+++ b/src/com/android/browser/AddBookmarkPage.java
@@ -150,7 +150,7 @@ public class AddBookmarkPage extends Activity {
final ContentResolver cr = getContentResolver();
Bookmarks.addBookmark(null, cr, url, title, thumbnail, true);
if (touchIconUrl != null) {
- new DownloadTouchIcon(cr, url).execute(mTouchIconUrl);
+ new DownloadTouchIcon(AddBookmarkPage.this, cr, url).execute(mTouchIconUrl);
}
mMessage.arg1 = 1;
} catch (IllegalStateException e) {
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index dde0765..6a7c79e 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -3782,7 +3782,7 @@ public class BrowserActivity extends Activity
b.putParcelable("favicon", current.getFavicon());
Message msg = mHandler.obtainMessage(TOUCH_ICON_DOWNLOADED);
msg.setData(b);
- new DownloadTouchIcon(msg,
+ new DownloadTouchIcon(BrowserActivity.this, msg,
mTabControl.getCurrentWebView().getSettings()
.getUserAgentString()).execute(touchIconUrl);
} else {
diff --git a/src/com/android/browser/DownloadTouchIcon.java b/src/com/android/browser/DownloadTouchIcon.java
index 98e14fb..765d288 100644
--- a/src/com/android/browser/DownloadTouchIcon.java
+++ b/src/com/android/browser/DownloadTouchIcon.java
@@ -16,6 +16,7 @@
package com.android.browser;
+import android.app.Activity;
import android.content.ContentResolver;
import android.content.ContentUris;
import android.content.ContentValues;
@@ -49,7 +50,7 @@ class DownloadTouchIcon extends AsyncTask<String, Void, Void> {
private final String mUserAgent; // Sites may serve a different icon to different UAs
private Message mMessage;
- private final BrowserActivity mActivity;
+ private final Activity mActivity;
/* package */ Tab mTab;
/**
@@ -74,9 +75,9 @@ class DownloadTouchIcon extends AsyncTask<String, Void, Void> {
* TODO: Would be nice to set the user agent here so that there is no
* potential for the three different ctors here to return different icons.
*/
- public DownloadTouchIcon(ContentResolver cr, String url) {
+ public DownloadTouchIcon(AddBookmarkPage activity, ContentResolver cr, String url) {
mTab = null;
- mActivity = null;
+ mActivity = activity;
mContentResolver = cr;
mOriginalUrl = null;
mUrl = url;
@@ -88,9 +89,9 @@ class DownloadTouchIcon extends AsyncTask<String, Void, Void> {
* the passed Message's data bundle with the key "touchIcon" and then send
* the message.
*/
- public DownloadTouchIcon(Message msg, String userAgent) {
+ public DownloadTouchIcon(BrowserActivity activity, Message msg, String userAgent) {
mMessage = msg;
- mActivity = null;
+ mActivity = activity;
mContentResolver = null;
mOriginalUrl = null;
mUrl = null;