diff options
author | Michael Kolb <kolby@google.com> | 2010-10-26 16:08:53 -0700 |
---|---|---|
committer | Michael Kolb <kolby@google.com> | 2010-11-17 13:27:05 -0800 |
commit | 8233facddcc51865d612a919d450db6954aa48e3 (patch) | |
tree | 049b5f9ac93146d842aa1c28a168e93783ea578a /src/com/android/browser/FetchUrlMimeType.java | |
parent | d9fb57958a0bea503b43d740057e3a4623c91d12 (diff) | |
download | android_packages_apps_Gello-8233facddcc51865d612a919d450db6954aa48e3.tar.gz android_packages_apps_Gello-8233facddcc51865d612a919d450db6954aa48e3.tar.bz2 android_packages_apps_Gello-8233facddcc51865d612a919d450db6954aa48e3.zip |
Controller Refactor
Bug: 3170671
First step towards a model/view/control design in Browser
introduced Controller object
started separating UI code
represent state of the app in one place only
Change-Id: Ica387d6bde2dcf1a4993c3db0cce498cf34ff60f
Diffstat (limited to 'src/com/android/browser/FetchUrlMimeType.java')
-rw-r--r-- | src/com/android/browser/FetchUrlMimeType.java | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/com/android/browser/FetchUrlMimeType.java b/src/com/android/browser/FetchUrlMimeType.java index 89ac13d3..0481806e 100644 --- a/src/com/android/browser/FetchUrlMimeType.java +++ b/src/com/android/browser/FetchUrlMimeType.java @@ -16,25 +16,24 @@ package com.android.browser; -import android.app.DownloadManager; -import android.content.ContentValues; -import android.content.Context; -import android.net.Proxy; -import android.net.Uri; -import android.net.http.AndroidHttpClient; - +import org.apache.http.Header; import org.apache.http.HttpHost; import org.apache.http.HttpResponse; -import org.apache.http.Header; import org.apache.http.client.methods.HttpHead; import org.apache.http.conn.params.ConnRouteParams; -import java.io.IOException; - +import android.app.Activity; +import android.app.DownloadManager; +import android.content.ContentValues; +import android.content.Context; +import android.net.Proxy; +import android.net.http.AndroidHttpClient; import android.os.AsyncTask; import android.webkit.MimeTypeMap; import android.webkit.URLUtil; +import java.io.IOException; + /** * This class is used to pull down the http headers of a given URL so that * we can analyse the mimetype and make any correction needed before we give @@ -53,11 +52,12 @@ class FetchUrlMimeType extends AsyncTask<ContentValues, String, ContentValues> { public static final String URI = "uri"; public static final String USER_AGENT = "user_agent"; public static final String COOKIE_DATA = "cookie_data"; - BrowserActivity mActivity; + + Activity mActivity; ContentValues mValues; DownloadManager.Request mRequest; - public FetchUrlMimeType(BrowserActivity activity, + public FetchUrlMimeType(Activity activity, DownloadManager.Request request) { mActivity = activity; mRequest = request; |