diff options
author | Michael Kolb <kolby@google.com> | 2011-06-09 11:49:03 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-06-09 11:49:03 -0700 |
commit | 998e9823d7b3a12032d90dc49c6411c7fb592e9a (patch) | |
tree | 2829e4dcc2d44a054fba0f4d179f1b9ce50093ad /src | |
parent | 1abceb53fe52ba26ea2daffbd58934570738563c (diff) | |
parent | 66af816cfbbfa2bbf2d35996e8024c8a6dc42a9c (diff) | |
download | packages_apps_Browser-998e9823d7b3a12032d90dc49c6411c7fb592e9a.zip packages_apps_Browser-998e9823d7b3a12032d90dc49c6411c7fb592e9a.tar.gz packages_apps_Browser-998e9823d7b3a12032d90dc49c6411c7fb592e9a.tar.bz2 |
Merge "fix close last page bug"
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/browser/NavScreen.java | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/com/android/browser/NavScreen.java b/src/com/android/browser/NavScreen.java index 6ef759f..eeca95a 100644 --- a/src/com/android/browser/NavScreen.java +++ b/src/com/android/browser/NavScreen.java @@ -169,16 +169,12 @@ public class NavScreen extends RelativeLayout implements OnClickListener { private void onCloseTab(Tab tab) { if (tab != null) { - mUiController.closeTab(tab); - if (mUiController.getTabControl().getTabCount() == 0) { - openNewTab(); - } else { - mAdapter.notifyDataSetChanged(); - } + switchToSelected(); + mUiController.closeCurrentTab(); + mAdapter.notifyDataSetChanged(); } } - private void openNewTab() { // need to call openTab explicitely with setactive false Tab tab = mUiController.openTab(BrowserSettings.getInstance().getHomePage(), |