summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/android/browser/BrowserActivity.java12
-rw-r--r--src/com/android/browser/TabControl.java5
2 files changed, 16 insertions, 1 deletions
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index 30c8c3d..43f1acd 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -4514,7 +4514,17 @@ public class BrowserActivity extends Activity
String data = intent.getAction();
Bundle extras = intent.getExtras();
if (extras != null && extras.getBoolean("new_window", false)) {
- openTab(data);
+ final TabControl.Tab newTab = openTab(data);
+ if (mSettings.openInBackground() &&
+ newTab != null && mTabOverview != null) {
+ mTabControl.populatePickerData(newTab);
+ mTabControl.setCurrentTab(newTab);
+ mTabOverview.add(newTab);
+ mTabOverview.setCurrentIndex(
+ mTabControl.getCurrentIndex());
+ sendAnimateFromOverview(newTab, false,
+ EMPTY_URL_DATA, TAB_OVERVIEW_DELAY, null);
+ }
} else {
final TabControl.Tab currentTab =
mTabControl.getCurrentTab();
diff --git a/src/com/android/browser/TabControl.java b/src/com/android/browser/TabControl.java
index bdb57fa..274598a 100644
--- a/src/com/android/browser/TabControl.java
+++ b/src/com/android/browser/TabControl.java
@@ -1066,6 +1066,11 @@ class TabControl {
data.mScale = w.getScale();
data.mScrollX = w.getScrollX();
data.mScrollY = w.getScrollY();
+
+ // Remember the old picture if possible.
+ if (t.mPickerData != null) {
+ data.mPicture = t.mPickerData.mPicture;
+ }
t.mPickerData = data;
}