diff options
author | Jean-Baptiste Queru <jbq@google.com> | 2012-09-04 14:39:07 -0700 |
---|---|---|
committer | Jean-Baptiste Queru <jbq@google.com> | 2012-09-04 14:39:07 -0700 |
commit | 2584c31de479fa27971455b1e70b8e58b754c0e9 (patch) | |
tree | a30a66592a51f63faaafa5f7bcf9f4190e1f7a07 /src/com/android/browser/Controller.java | |
parent | d9719732b9e02d1236138d2f76eddf9ca2dbd2b7 (diff) | |
parent | 0570344a1b3187294250be20e212397e8fd42c88 (diff) | |
download | packages_apps_Browser-2584c31de479fa27971455b1e70b8e58b754c0e9.zip packages_apps_Browser-2584c31de479fa27971455b1e70b8e58b754c0e9.tar.gz packages_apps_Browser-2584c31de479fa27971455b1e70b8e58b754c0e9.tar.bz2 |
resolved conflicts for merge of 0570344a to jb-mr1-dev
Change-Id: I5853a3609caacf7b0ff0eecbb1ed697811b7430e
Diffstat (limited to 'src/com/android/browser/Controller.java')
-rw-r--r-- | src/com/android/browser/Controller.java | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/com/android/browser/Controller.java b/src/com/android/browser/Controller.java index 385d494..cf1518c 100644 --- a/src/com/android/browser/Controller.java +++ b/src/com/android/browser/Controller.java @@ -512,8 +512,8 @@ public class Controller case R.id.save_link_context_menu_id: case R.id.download_context_menu_id: DownloadHandler.onDownloadStartNoStream( - mActivity, url, null, null, null, null, - view.isPrivateBrowsingEnabled()); + mActivity, url, view.getSettings().getUserAgentString(), + null, null, null, view.isPrivateBrowsingEnabled()); break; } break; @@ -1434,9 +1434,9 @@ public class Controller return false; } }); - menu.findItem(R.id.download_context_menu_id). - setOnMenuItemClickListener( - new Download(mActivity, extra, webview.isPrivateBrowsingEnabled())); + menu.findItem(R.id.download_context_menu_id).setOnMenuItemClickListener( + new Download(mActivity, extra, webview.isPrivateBrowsingEnabled(), + webview.getSettings().getUserAgentString())); menu.findItem(R.id.set_wallpaper_context_menu_id). setOnMenuItemClickListener(new WallpaperHandler(mActivity, extra)); @@ -2166,6 +2166,7 @@ public class Controller private Activity mActivity; private String mText; private boolean mPrivateBrowsing; + private String mUserAgent; private static final String FALLBACK_EXTENSION = "dat"; private static final String IMAGE_BASE_FORMAT = "yyyy-MM-dd-HH-mm-ss-"; @@ -2174,16 +2175,18 @@ public class Controller if (DataUri.isDataUri(mText)) { saveDataUri(); } else { - DownloadHandler.onDownloadStartNoStream(mActivity, mText, null, + DownloadHandler.onDownloadStartNoStream(mActivity, mText, mUserAgent, null, null, null, mPrivateBrowsing); } return true; } - public Download(Activity activity, String toDownload, boolean privateBrowsing) { + public Download(Activity activity, String toDownload, boolean privateBrowsing, + String userAgent) { mActivity = activity; mText = toDownload; mPrivateBrowsing = privateBrowsing; + mUserAgent = userAgent; } /** |