Bug 1145217 - Disable toolbar add to reading list button on about: pages. r=margaret
authorMichael Comella <michael.l.comella@gmail.com>
Thu, 19 Mar 2015 10:08:07 -0700
changeset 234423 2a397413f85f2031029925af9122a30f5427665d
parent 234422 11c3430c78f8e0297e1a1deaf9fa05d08598c763
child 234424 1dbf52164ffeeba315c79d4073441d3022a5e31f
push id28445
push userkwierso@gmail.com
push dateFri, 20 Mar 2015 02:10:04 +0000
treeherdermozilla-central@988afda9eac4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmargaret
bugs1145217
milestone39.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1145217 - Disable toolbar add to reading list button on about: pages. r=margaret Except for about:reader, obviously. :)
mobile/android/base/BrowserApp.java
--- a/mobile/android/base/BrowserApp.java
+++ b/mobile/android/base/BrowserApp.java
@@ -2977,23 +2977,24 @@ public class BrowserApp extends GeckoApp
             MenuUtils.safeSetEnabled(aMenu, R.id.site_settings, false);
             MenuUtils.safeSetEnabled(aMenu, R.id.add_to_launcher, false);
 
             return true;
         }
 
         final boolean inGuestMode = GeckoProfile.get(this).inGuestMode();
 
-        bookmark.setEnabled(!AboutPages.isAboutReader(tab.getURL()));
+        final boolean isAboutReader = AboutPages.isAboutReader(tab.getURL());
+        bookmark.setEnabled(!isAboutReader);
         bookmark.setVisible(!inGuestMode);
         bookmark.setCheckable(true);
         bookmark.setChecked(tab.isBookmark());
         bookmark.setIcon(resolveBookmarkIconID(tab.isBookmark()));
 
-        reader.setEnabled(true);
+        reader.setEnabled(isAboutReader || !AboutPages.isAboutPage(tab.getURL()));
         reader.setVisible(!inGuestMode);
         reader.setCheckable(true);
         final boolean isPageInReadingList = tab.isInReadingList();
         reader.setChecked(isPageInReadingList);
         reader.setIcon(resolveReadingListIconID(isPageInReadingList));
         reader.setTitle(resolveReadingListTitleID(isPageInReadingList));
 
         back.setEnabled(tab.canDoBack());