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
diff --git a/src/com/android/browser/Controller.java b/src/com/android/browser/Controller.java
index 142375d..89b700b 100644
--- a/src/com/android/browser/Controller.java
+++ b/src/com/android/browser/Controller.java
@@ -2415,6 +2415,9 @@
// Now we close the other tab
closeTab(current);
} else {
+ if ((current.getAppId() != null) || current.closeOnBack()) {
+ closeCurrentTab();
+ }
/*
* Instead of finishing the activity, simply push this to the back
* of the stack and let ActivityManager to choose the foreground