summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/IntentHandler.java
diff options
context:
space:
mode:
authorMichael Kolb <kolby@google.com>2011-08-04 16:54:31 -0700
committerMichael Kolb <kolby@google.com>2011-08-05 09:57:32 -0700
commite28b347fcc1df6e6bd41cb294d521a4f1e7c5c75 (patch)
treef4cefe11ff78dbca0b2525fb56e4b707c5d55d65 /src/com/android/browser/IntentHandler.java
parentedd390b6e1448a206f514d97c8ff1fcfb58773bd (diff)
downloadpackages_apps_browser-e28b347fcc1df6e6bd41cb294d521a4f1e7c5c75.zip
packages_apps_browser-e28b347fcc1df6e6bd41cb294d521a4f1e7c5c75.tar.gz
packages_apps_browser-e28b347fcc1df6e6bd41cb294d521a4f1e7c5c75.tar.bz2
close external tabs on back
Bug: 4466495 close externally created tabs when the back button is used and no further back history is available Change-Id: If605474d929fb759226a1e1f4125bfaab43e6653
Diffstat (limited to 'src/com/android/browser/IntentHandler.java')
-rw-r--r--src/com/android/browser/IntentHandler.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/com/android/browser/IntentHandler.java b/src/com/android/browser/IntentHandler.java
index 6ed5b72..c76197d 100644
--- a/src/com/android/browser/IntentHandler.java
+++ b/src/com/android/browser/IntentHandler.java
@@ -17,10 +17,6 @@
package com.android.browser;
-import com.android.browser.search.SearchEngine;
-import com.android.common.Search;
-import com.android.common.speech.LoggingEvents;
-
import android.app.Activity;
import android.app.SearchManager;
import android.content.ContentResolver;
@@ -36,6 +32,10 @@ import android.speech.RecognizerResultsIntent;
import android.text.TextUtils;
import android.util.Patterns;
+import com.android.browser.search.SearchEngine;
+import com.android.common.Search;
+import com.android.common.speech.LoggingEvents;
+
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
@@ -187,6 +187,9 @@ public class IntentHandler {
Tab tab = mController.openTab(urlData);
if (tab != null) {
tab.setAppId(appId);
+ if ((intent.getFlags() & Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT) != 0) {
+ tab.setCloseOnBack(true);
+ }
}
}
} else {