Fix http://b/issue?id=2052775. According to the comment, we try to call
pauseWebView(). But as mActivityInPause is false, pauseWebView doesn't do
anything. This cause inbalanced pause/resume and the WebCoreThread's timer
is never put on hold even Browser is in the background.
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index 93ba1b1..b58af66 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -2544,8 +2544,17 @@
                         return;
                     }
                     // call pauseWebView() now, we won't be able to call it in
-                    // onPause() as the WebView won't be valid.
+                    // onPause() as the WebView won't be valid. Temporarily
+                    // change mActivityInPause to be true as pauseWebView() will
+                    // do nothing if mActivityInPause is false.
+                    boolean savedState = mActivityInPause;
+                    if (savedState) {
+                        Log.e(LOGTAG, "BrowserActivity is already paused " +
+                                "while handing goBackOnePageOrQuit.");
+                    }
+                    mActivityInPause = true;
                     pauseWebView();
+                    mActivityInPause = savedState;
                     removeTabFromContentView(current);
                     mTabControl.removeTab(current);
                 }