diff options
author | John Reck <jreck@android.com> | 2012-09-04 14:56:45 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-09-04 14:56:45 -0700 |
commit | 966beb17e375f3fc5466ec5a1015eda9a4fa5639 (patch) | |
tree | c90791801b77b149d95eab53b94d8d393d541fd9 /src/com/android/browser/Controller.java | |
parent | 2584c31de479fa27971455b1e70b8e58b754c0e9 (diff) | |
parent | cf00c263557e1bd8ba060938cf8a451f2b92af2c (diff) | |
download | packages_apps_Browser-966beb17e375f3fc5466ec5a1015eda9a4fa5639.zip packages_apps_Browser-966beb17e375f3fc5466ec5a1015eda9a4fa5639.tar.gz packages_apps_Browser-966beb17e375f3fc5466ec5a1015eda9a4fa5639.tar.bz2 |
am cf00c263: Merge "Pause WebView timer when Browser is paused"
* commit 'cf00c263557e1bd8ba060938cf8a451f2b92af2c':
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 cf1518c..e84e397 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()) |