Merge "Make sure timers are running during pre-login."
diff --git a/src/com/android/browser/GoogleAccountLogin.java b/src/com/android/browser/GoogleAccountLogin.java
index 3712490..f4ccfd1 100644
--- a/src/com/android/browser/GoogleAccountLogin.java
+++ b/src/com/android/browser/GoogleAccountLogin.java
@@ -41,6 +41,7 @@
import android.preference.PreferenceManager;
import android.util.Log;
import android.webkit.CookieManager;
+import android.webkit.CookieSyncManager;
import android.webkit.WebView;
import android.webkit.WebViewClient;
@@ -86,6 +87,12 @@
mWebView = new WebView(mActivity);
mRunnable = runnable;
+ // XXX: Doing pre-login causes onResume to skip calling
+ // resumeWebViewTimers. So to avoid problems with timers not running, we
+ // duplicate the work here using the off-screen WebView.
+ CookieSyncManager.getInstance().startSync();
+ mWebView.resumeTimers();
+
mWebView.setWebViewClient(new WebViewClient() {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {