Fix several bugs surrounding the "go" screen and closing tabs.
http://b/issue?id=2053635 : Home page should appear when last tab is closed
http://b/issue?id=2049620 : click on a link opening a new window should skip the landing page
http://b/issue?id=2042079 : When I open a new tab, then hit back get strange state
Now if you close the last tab, it will bring up the "go" screen.
If you hit back, it closes the browser; otherwise it will go where
the user specifies. When opening a new tab, if the user hits
back, it will close this new tab. This also prevents the "go"
screen from coming up unnecessarily when a link opens in a new
window.
diff --git a/src/com/android/browser/TitleBarSet.java b/src/com/android/browser/TitleBarSet.java
index ba8c300..d26f0af 100644
--- a/src/com/android/browser/TitleBarSet.java
+++ b/src/com/android/browser/TitleBarSet.java
@@ -194,7 +194,7 @@
mBrowserActivity.closeCurrentWindow();
}
} else {
- mBrowserActivity.bookmarksOrHistoryPicker(false);
+ mBrowserActivity.bookmarksOrHistoryPicker(false, false);
}
return true;
}
@@ -228,6 +228,7 @@
View.OnClickListener listener = new View.OnClickListener() {
public void onClick(View v) {
ba.openTabAndShow(BrowserActivity.EMPTY_URL_DATA, false, null);
+ ba.bookmarksOrHistoryPicker(false, true);
}
};
mNewButton.findViewById(R.id.button).setOnClickListener(listener);