summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/browser')
-rw-r--r--src/com/android/browser/BrowserActivity.java1
-rw-r--r--src/com/android/browser/TabScrollView.java6
2 files changed, 6 insertions, 1 deletions
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index 9f1f3ba68..d69140f54 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -1317,7 +1317,6 @@ public class BrowserActivity extends Activity
// doesn't come for action bar buttons
if (item.getItemId() == R.id.newtab) {
openTabToHomePage();
- mHandler.sendMessage(mHandler.obtainMessage(OPEN_BOOKMARKS));
return true;
}
if (!mCanChord) {
diff --git a/src/com/android/browser/TabScrollView.java b/src/com/android/browser/TabScrollView.java
index 13abb505d..b41141679 100644
--- a/src/com/android/browser/TabScrollView.java
+++ b/src/com/android/browser/TabScrollView.java
@@ -113,6 +113,12 @@ public class TabScrollView extends HorizontalScrollView {
}
void removeTab(View tab) {
+ int ix = mContentView.indexOfChild(tab);
+ if (ix == mSelected) {
+ mSelected = -1;
+ } else if (ix < mSelected) {
+ mSelected--;
+ }
mContentView.removeView(tab);
}