diff options
author | George Mount <mount@google.com> | 2011-10-07 15:57:53 -0700 |
---|---|---|
committer | George Mount <mount@google.com> | 2011-10-10 13:11:56 -0700 |
commit | 387d45d2284c7fd7f12cbadc96161f946ae29cad (patch) | |
tree | 04bc0d8cdcca96dc2d5730f26309885f55d99d95 /src/com/android/browser/PhoneUi.java | |
parent | 07af26d9ae4239bad876e8fd7ac69984a1d66996 (diff) | |
download | packages_apps_Browser-387d45d2284c7fd7f12cbadc96161f946ae29cad.zip packages_apps_Browser-387d45d2284c7fd7f12cbadc96161f946ae29cad.tar.gz packages_apps_Browser-387d45d2284c7fd7f12cbadc96161f946ae29cad.tar.bz2 |
Data URL fixes - bookmarks, save, and wallpaper
Bug 5383517
Images kept in data URLs can now be selected and this fixes the
Save and Set Wallpaper options. It also removes the bookmarking
capability.
Change-Id: I461bdcb4c950f6fcd8db8b38f4c599212106b027
Diffstat (limited to 'src/com/android/browser/PhoneUi.java')
-rw-r--r-- | src/com/android/browser/PhoneUi.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/browser/PhoneUi.java b/src/com/android/browser/PhoneUi.java index 0e2710d..ddb4e0e 100644 --- a/src/com/android/browser/PhoneUi.java +++ b/src/com/android/browser/PhoneUi.java @@ -196,7 +196,9 @@ public class PhoneUi extends BaseUi { public void updateMenuState(Tab tab, Menu menu) { MenuItem bm = menu.findItem(R.id.bookmarks_menu_id); if (bm != null) { - bm.setVisible(!showingNavScreen()); + String url = tab.getUrl(); + boolean isDataUrl = DataUri.isDataUri(url); + bm.setVisible(!showingNavScreen() && !isDataUrl); } MenuItem nt = menu.findItem(R.id.new_tab_menu_id); if (nt != null) { |