Bug 1321418 - Update menu items using the correct ID; r=sebastian
authorJim Chen <nchen@mozilla.com>
Wed, 05 Apr 2017 14:23:44 -0400
changeset 351483 84abf2ef2fabc1fb0b77870de1bf38ecb0bc15fb
parent 351482 a54617dc98c1c312e3638489b825422cee301495
child 351484 3a75f63f380103b1d74c7e3f4059d16d5292829e
push id31611
push usercbook@mozilla.com
push dateThu, 06 Apr 2017 10:51:05 +0000
treeherdermozilla-central@950612071c4e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssebastian
bugs1321418
milestone55.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 1321418 - Update menu items using the correct ID; r=sebastian Regression caused by an incorrect ID used to update menu items.
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
@@ -1833,17 +1833,18 @@ public class BrowserApp extends GeckoApp
             case "Menu:Open":
                 if (mBrowserToolbar.isEditing()) {
                     mBrowserToolbar.cancelEdit();
                 }
                 openOptionsMenu();
                 break;
 
             case "Menu:Update":
-                updateAddonMenuItem(message.getInt("id"), message.getBundle("options"));
+                updateAddonMenuItem(message.getInt("id") + ADDON_MENU_OFFSET,
+                                    message.getBundle("options"));
                 break;
 
             case "Menu:Add":
                 final MenuItemInfo info = new MenuItemInfo();
                 info.label = message.getString("name");
                 info.id = message.getInt("id") + ADDON_MENU_OFFSET;
                 info.checked = message.getBoolean("checked", false);
                 info.enabled = message.getBoolean("enabled", true);