export default class IndicatorPresenter {
  indicate(enabled: boolean): Promise<void> {
    let path = enabled
      ? 'resources/enabled_32x32.png'
      : 'resources/disabled_32x32.png';
    if (typeof browser.browserAction.setIcon === "function") {
      return browser.browserAction.setIcon({ path });
    }
    else {
      // setIcon not supported on Android
      return Promise.resolve();
    }
  }

  onClick(listener: (arg: browser.tabs.Tab) => void): void {
    browser.browserAction.onClicked.addListener(listener);
  }
}

export default class IndicatorPresenter {
  indicate(enabled: boolean): Promise<void> {
    let path = enabled
      ? 'resources/enabled_32x32.png'
      : 'resources/disabled_32x32.png';
    return browser.browserAction.setIcon({ path });
  }

  onClick(listener: (arg: browser.tabs.Tab) => void): void {
    browser.browserAction.onClicked.addListener(listener);
  }
}

--- 
+++ 
@@ -3,7 +3,13 @@
     let path = enabled
       ? 'resources/enabled_32x32.png'
       : 'resources/disabled_32x32.png';
-    return browser.browserAction.setIcon({ path });
+    if (typeof browser.browserAction.setIcon === "function") {
+      return browser.browserAction.setIcon({ path });
+    }
+    else {
+      // setIcon not supported on Android
+      return Promise.resolve();
+    }
   }
 
   onClick(listener: (arg: browser.tabs.Tab) => void): void {
Fix setIcon warning on Android
