summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Kolb <kolby@google.com>2012-05-16 13:15:40 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-05-16 13:15:40 -0700
commitfe9356329710e8fae22bb3dc5f6aea86ae3cb87e (patch)
treed08c278e16874701d9a6d433d3f4d1cb17a563ce
parentb9b293119d3a4a94b5d05d8e555070738ca3c36f (diff)
parentaf63dbadb04a963f3513bff2f6ec5f34d31c24d6 (diff)
downloadpackages_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
-rw-r--r--res/drawable-hdpi/ic_mobile.pngbin0 -> 631 bytes
-rw-r--r--res/drawable-mdpi/ic_mobile.pngbin0 -> 460 bytes
-rw-r--r--res/drawable-xhdpi/ic_mobile.pngbin0 -> 863 bytes
-rw-r--r--src/com/android/browser/Controller.java3
-rw-r--r--src/com/android/browser/PieControl.java9
-rw-r--r--src/com/android/browser/UiController.java2
6 files changed, 13 insertions, 1 deletions
diff --git a/res/drawable-hdpi/ic_mobile.png b/res/drawable-hdpi/ic_mobile.png
new file mode 100644
index 0000000..cd688c8
--- /dev/null
+++ b/res/drawable-hdpi/ic_mobile.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_mobile.png b/res/drawable-mdpi/ic_mobile.png
new file mode 100644
index 0000000..6cf4283
--- /dev/null
+++ b/res/drawable-mdpi/ic_mobile.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_mobile.png b/res/drawable-xhdpi/ic_mobile.png
new file mode 100644
index 0000000..a055b07
--- /dev/null
+++ b/res/drawable-xhdpi/ic_mobile.png
Binary files differ
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();
+
}