Fix a timer issue when backing out of an app tab.
The code was old and assumed that onPause would have an invalid tab and never
pause timers. That is no longer the case.
Bug: 3452002
Change-Id: I98cf6e368b4cf7db05975716d5c21960945d8950
diff --git a/src/com/android/browser/Controller.java b/src/com/android/browser/Controller.java
index c1f1313..6e06e6e 100644
--- a/src/com/android/browser/Controller.java
+++ b/src/com/android/browser/Controller.java
@@ -2372,19 +2372,9 @@
closeTab(current);
} else {
if (current.closeOnExit()) {
- // force the tab's inLoad() to be false as we are going to
- // either finish the activity or remove the tab. This will
- // ensure pauseWebViewTimers() taking action.
- current.clearInPageLoad();
- if (mTabControl.getTabCount() == 1) {
- mActivity.finish();
- return;
- }
- if (mActivityPaused) {
- Log.e(LOGTAG, "BrowserActivity is already paused "
- + "while handing goBackOnePageOrQuit.");
- }
- pauseWebViewTimers(current);
+ // This will finish the activity if there is only one tab
+ // open or it will switch to the next available tab if
+ // available.
closeCurrentTab();
}
/*