diff options
author | Michael Kolb <kolby@google.com> | 2012-05-16 13:15:40 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-05-16 13:15:40 -0700 |
commit | fe9356329710e8fae22bb3dc5f6aea86ae3cb87e (patch) | |
tree | d08c278e16874701d9a6d433d3f4d1cb17a563ce /src | |
parent | b9b293119d3a4a94b5d05d8e555070738ca3c36f (diff) | |
parent | af63dbadb04a963f3513bff2f6ec5f34d31c24d6 (diff) | |
download | packages_apps_Browser-fe9356329710e8fae22bb3dc5f6aea86ae3cb87e.zip packages_apps_Browser-fe9356329710e8fae22bb3dc5f6aea86ae3cb87e.tar.gz packages_apps_Browser-fe9356329710e8fae22bb3dc5f6aea86ae3cb87e.tar.bz2 |
Merge "Toggle QC request desktop icon" into jb-dev
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/browser/Controller.java | 3 | ||||
-rw-r--r-- | src/com/android/browser/PieControl.java | 9 | ||||
-rw-r--r-- | src/com/android/browser/UiController.java | 2 |
3 files changed, 13 insertions, 1 deletions
diff --git a/src/com/android/browser/Controller.java b/src/com/android/browser/Controller.java index 2fb465c..493583d 100644 --- a/src/com/android/browser/Controller.java +++ b/src/com/android/browser/Controller.java @@ -429,7 +429,8 @@ public class Controller mUi = ui; } - BrowserSettings getSettings() { + @Override + public BrowserSettings getSettings() { return mSettings; } diff --git a/src/com/android/browser/PieControl.java b/src/com/android/browser/PieControl.java index 7c4291c..a33f8c6 100644 --- a/src/com/android/browser/PieControl.java +++ b/src/com/android/browser/PieControl.java @@ -118,6 +118,15 @@ public class PieControl implements PieMenu.PieController, OnClickListener { if (tab != null) { mForward.setEnabled(tab.canGoForward()); } + WebView view = mUiController.getCurrentWebView(); + if (view != null) { + ImageView icon = (ImageView) mRDS.getView(); + if (mUiController.getSettings().hasDesktopUseragent(view)) { + icon.setImageResource(R.drawable.ic_mobile); + } else { + icon.setImageResource(R.drawable.ic_desktop_holo_dark); + } + } return true; } diff --git a/src/com/android/browser/UiController.java b/src/com/android/browser/UiController.java index 5be2343..b3d4631 100644 --- a/src/com/android/browser/UiController.java +++ b/src/com/android/browser/UiController.java @@ -105,4 +105,6 @@ public interface UiController { void toggleUserAgent(); + BrowserSettings getSettings(); + } |