diff options
Diffstat (limited to 'src/com/android/browser/BrowserActivity.java')
-rw-r--r-- | src/com/android/browser/BrowserActivity.java | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java index 6179da2..0ca4248 100644 --- a/src/com/android/browser/BrowserActivity.java +++ b/src/com/android/browser/BrowserActivity.java @@ -1950,17 +1950,15 @@ public class BrowserActivity extends Activity public void run() { // Remove the AnimatingView. mContentView.removeView(view); - if (mTabOverview != null) { - // Make newIndex visible. - mTabOverview.setCurrentIndex(newIndex); - // Restore the listener. - mTabOverview.setListener(mTabListener); - // Change the menu to TAB_MENU if the - // ImageGrid is interactive. - if (mTabOverview.isLive()) { - mMenuState = R.id.TAB_MENU; - mTabOverview.requestFocus(); - } + // Make newIndex visible. + mTabOverview.setCurrentIndex(newIndex); + // Restore the listener. + mTabOverview.setListener(mTabListener); + // Change the menu to TAB_MENU if the + // ImageGrid is interactive. + if (mTabOverview.isLive()) { + mMenuState = R.id.TAB_MENU; + mTabOverview.requestFocus(); } // If a remove was requested, remove the tab. if (remove) { @@ -1978,12 +1976,10 @@ public class BrowserActivity extends Activity if (currentTab != tab) { mTabControl.setCurrentTab(currentTab); } - if (mTabOverview != null) { - mTabOverview.remove(newIndex); - // Make the current tab visible. - mTabOverview.setCurrentIndex( - mTabControl.getCurrentIndex()); - } + mTabOverview.remove(newIndex); + // Make the current tab visible. + mTabOverview.setCurrentIndex( + mTabControl.getCurrentIndex()); } } }); |