@Override public void setActiveTab(final Tab tab) { super.setActiveTab(tab); BrowserWebView view = (BrowserWebView) tab.getWebView(); // TabControl.setCurrentTab has been called before this, // so the tab is guaranteed to have a webview if (view == null) { Log.e(LOGTAG, "active tab with no webview detected"); return; } mTabBar.onSetActiveTab(tab); }