diff --git a/mobile/android/base/BrowserApp.java b/mobile/android/base/BrowserApp.java index 971e991560b..6b6fc2da96c 100644 --- a/mobile/android/base/BrowserApp.java +++ b/mobile/android/base/BrowserApp.java @@ -66,7 +66,6 @@ import org.mozilla.gecko.sync.setup.SyncAccounts; import org.mozilla.gecko.tabs.TabHistoryController; import org.mozilla.gecko.tabs.TabHistoryFragment; import org.mozilla.gecko.tabs.TabHistoryPage; -import org.mozilla.gecko.tabs.TabStrip; import org.mozilla.gecko.tabs.TabsPanel; import org.mozilla.gecko.tabs.TabHistoryController.OnShowTabHistory; import org.mozilla.gecko.toolbar.AutocompleteHandler; @@ -179,7 +178,8 @@ public class BrowserApp extends GeckoApp public ViewFlipper mActionBarFlipper; public ActionModeCompatView mActionBar; private BrowserToolbar mBrowserToolbar; - private TabStrip mTabStrip; + // We can't name the TabStrip class because it's not included on API 9. + private Refreshable mTabStrip; private ToolbarProgressView mProgressView; private FirstrunPane mFirstrunPane; private HomePager mHomePager; @@ -723,7 +723,7 @@ public class BrowserApp extends GeckoApp } if (HardwareUtils.isTablet()) { - mTabStrip = (TabStrip) (((ViewStub) findViewById(R.id.new_tablet_tab_strip)).inflate()); + mTabStrip = (Refreshable) (((ViewStub) findViewById(R.id.new_tablet_tab_strip)).inflate()); } ((GeckoApp.MainLayout) mMainLayout).setTouchEventInterceptor(new HideOnTouchListener()); @@ -3609,4 +3609,8 @@ public class BrowserApp extends GeckoApp appLocale, previousSession); } + + public static interface Refreshable { + public void refresh(); + } } diff --git a/mobile/android/base/tabs/TabStrip.java b/mobile/android/base/tabs/TabStrip.java index f58b1df01d5..b5772182db6 100644 --- a/mobile/android/base/tabs/TabStrip.java +++ b/mobile/android/base/tabs/TabStrip.java @@ -15,13 +15,15 @@ import android.view.TouchDelegate; import android.view.View; import android.view.ViewTreeObserver; +import org.mozilla.gecko.BrowserApp.Refreshable; import org.mozilla.gecko.R; import org.mozilla.gecko.Tab; import org.mozilla.gecko.Tabs; import org.mozilla.gecko.widget.ThemedImageButton; import org.mozilla.gecko.widget.ThemedLinearLayout; -public class TabStrip extends ThemedLinearLayout { +public class TabStrip extends ThemedLinearLayout + implements Refreshable { private static final String LOGTAG = "GeckoTabStrip"; private final TabStripView tabStripView; @@ -128,6 +130,7 @@ public class TabStrip extends ThemedLinearLayout { } } + @Override public void refresh() { tabStripView.refresh(); }