diff options
author | John Reck <jreck@android.com> | 2012-09-04 14:43:53 -0700 |
---|---|---|
committer | android code review <noreply-gerritcodereview@google.com> | 2012-09-04 14:43:53 -0700 |
commit | cf00c263557e1bd8ba060938cf8a451f2b92af2c (patch) | |
tree | ba2c9ede4362c5671dba7e94eac0efe20257861c /src/com/android/browser/Controller.java | |
parent | 0570344a1b3187294250be20e212397e8fd42c88 (diff) | |
parent | 9cc2d03bddf3d11804fa5ac06662220f1e21b3ce (diff) | |
download | packages_apps_Browser-cf00c263557e1bd8ba060938cf8a451f2b92af2c.zip packages_apps_Browser-cf00c263557e1bd8ba060938cf8a451f2b92af2c.tar.gz packages_apps_Browser-cf00c263557e1bd8ba060938cf8a451f2b92af2c.tar.bz2 |
Merge "Pause WebView timer when Browser is paused"
Diffstat (limited to 'src/com/android/browser/Controller.java')
-rw-r--r-- | src/com/android/browser/Controller.java | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/com/android/browser/Controller.java b/src/com/android/browser/Controller.java index 4b28eb6..7f40aea 100644 --- a/src/com/android/browser/Controller.java +++ b/src/com/android/browser/Controller.java @@ -860,11 +860,6 @@ public class Controller public void onPageFinished(Tab tab) { mCrashRecoveryHandler.backupState(); mUi.onTabDataChanged(tab); - // pause the WebView timer and release the wake lock if it is finished - // while BrowserActivity is in pause state. - if (mActivityPaused && pauseWebViewTimers(tab)) { - releaseWakeLock(); - } // Performance probe if (false) { @@ -889,6 +884,10 @@ public class Controller // onPageFinished has executed) if (tab.inPageLoad()) { updateInLoadMenuItems(mCachedMenu, tab); + } else if (mActivityPaused && pauseWebViewTimers(tab)) { + // pause the WebView timer and release the wake lock if it is + // finished while BrowserActivity is in pause state. + releaseWakeLock(); } if (!tab.isPrivateBrowsingEnabled() && !TextUtils.isEmpty(tab.getUrl()) |