summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Kolb <kolby@google.com>2011-06-09 11:49:03 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-06-09 11:49:03 -0700
commit998e9823d7b3a12032d90dc49c6411c7fb592e9a (patch)
tree2829e4dcc2d44a054fba0f4d179f1b9ce50093ad /src
parent1abceb53fe52ba26ea2daffbd58934570738563c (diff)
parent66af816cfbbfa2bbf2d35996e8024c8a6dc42a9c (diff)
downloadpackages_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.java10
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(),