Bug 1263800 - Ensure bookmark star is enabled if tab data available r?grisha draft
authorAndrzej Hunt <ahunt@mozilla.com>
Thu, 14 Apr 2016 11:13:52 -0700
changeset 351040 4679b21857569c7b227c31a2b9051a3c30c81a4b
parent 350963 995e7890dd613843c3914a1d9d46676f400152c1
child 518461 11c47c05bb2f690b670a8a237a0ada6be1385947
push id15484
push userahunt@mozilla.com
push dateThu, 14 Apr 2016 18:14:16 +0000
reviewersgrisha
bugs1263800
milestone48.0a1
Bug 1263800 - Ensure bookmark star is enabled if tab data available r?grisha If tab data is initially null then we disable the bookmark star. We need to explicitly reenable it when we load an actual page. All other menu items seem to be explicitly enabled as needed below, only bookmarks was omitted (since it's expected to be enabled ~all the time) - but we still could have disabled it previously. MozReview-Commit-ID: GpVJu4Rw2dN
mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
--- a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
+++ b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
@@ -3205,16 +3205,17 @@ public class BrowserApp extends GeckoApp
             MenuUtils.safeSetEnabled(aMenu, R.id.add_search_engine, false);
             MenuUtils.safeSetEnabled(aMenu, R.id.add_to_launcher, false);
 
             return true;
         }
 
         final boolean inGuestMode = GeckoProfile.get(this).inGuestMode();
 
+        bookmark.setEnabled(true); // Might have been disabled above, ensure it's reenabled
         bookmark.setVisible(!inGuestMode);
         bookmark.setCheckable(true);
         bookmark.setChecked(tab.isBookmark());
         bookmark.setTitle(resolveBookmarkTitleID(tab.isBookmark()));
 
         if (Versions.feature11Plus) {
             // We don't use icons on GB builds so not resolving icons might conserve resources.
             bookmark.setIcon(resolveBookmarkIconID(tab.isBookmark()));