From 821816087b6793709de8351d56b220edcda3fc0f Mon Sep 17 00:00:00 2001 From: Sriram Ramasubramanian Date: Tue, 9 Jul 2013 00:19:46 -0700 Subject: [PATCH] Bug 890671: Addon icon is missing when the menu item adds a submenu. [r=mfinkle] --HG-- extra : rebase_source : 9d27cd4ffd03c59c27d9eb9830f897efa09800c6 --- mobile/android/base/BrowserApp.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mobile/android/base/BrowserApp.java b/mobile/android/base/BrowserApp.java index 31638eb5162..242eecdbdbb 100644 --- a/mobile/android/base/BrowserApp.java +++ b/mobile/android/base/BrowserApp.java @@ -1434,7 +1434,7 @@ abstract public class BrowserApp extends GeckoApp } } - final MenuItem item = menu.add(Menu.NONE, info.id, Menu.NONE, info.label); + MenuItem item = menu.add(Menu.NONE, info.id, Menu.NONE, info.label); item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem item) { @@ -1445,9 +1445,11 @@ abstract public class BrowserApp extends GeckoApp }); if (info.icon != null) { + final int id = info.id; BitmapUtils.getDrawable(this, info.icon, new BitmapUtils.BitmapLoader() { @Override public void onBitmapFound(Drawable d) { + MenuItem item = mMenu.findItem(id); if (d == null) { item.setIcon(R.drawable.ic_menu_addons_filler); return;