Index: mobile/android/base/BrowserApp.java |
=================================================================== |
--- a/mobile/android/base/BrowserApp.java |
+++ b/mobile/android/base/BrowserApp.java |
@@ -253,6 +253,9 @@ |
case SELECTED: |
if (Tabs.getInstance().isSelectedTab(tab)) { |
updateHomePagerForTab(tab); |
+ if (mMenu != null) |
+ org.adblockplus.browser.BrowserAppUtils.updateBlockAdsMenuItem( |
+ mMenu.findItem(R.id.block_ads)); |
} |
break; |
case START: |
@@ -2281,6 +2284,12 @@ |
* the root (mMenu). |
*/ |
private void addAddonMenuItemToMenu(final Menu menu, final MenuItemInfo info) { |
+ // Adblock Browser doesn't support add-ons, so the only menu item that |
+ // could be added is the one for whitelisting the current domain added |
+ // by ABP - Adblock Browser has its own item for that. |
+ if (true) |
+ return; |
+ |
info.added = true; |
final Menu destination; |
@@ -2441,6 +2450,9 @@ |
share.setActionProvider(provider); |
} |
+ org.adblockplus.browser.BrowserAppUtils.updateBlockAdsMenuItem( |
+ mMenu.findItem(R.id.block_ads)); |
+ |
return true; |
} |
@@ -2783,6 +2795,11 @@ |
return true; |
} |
+ if (itemId == R.id.block_ads) { |
+ org.adblockplus.browser.BrowserAppUtils.updateCurrentTabWhitelisting(item); |
+ return true; |
+ } |
+ |
if (itemId == R.id.new_tab) { |
addTab(); |
return true; |