title: CookieManager and CookieSyncManager not syncing cookies to webview in ICS (works on all previous API levels)
body: <p><strong>Background:</strong></p>
  
  <p>I'm acquireing cookies through my app and use them internally by making requests to http. Users can switch to webview any given time, in which case I sync/inject cookies to <a href="http://developer.android.com/reference/android/webkit/WebView.html" rel="noreferrer">webView</a>.</p>
  
  <p>Code for synchronizing cookies to webview using <a href="http://developer.android.com/reference/android/webkit/CookieSyncManager.html" rel="noreferrer">CookieSyncManager</a>:</p>
  
  <pre><code>CookieSyncManager.createInstance(a);
  CookieManager cm = CookieManager.getInstance();
  cm.setCookie(domain, cookieName + "=" + cookieValue);
  CookieSyncManager.getInstance().sync();
  </code></pre>
  
  <p>This works on <strong>all</strong> API levels <strong>except</strong> API 15+ (Android 4.0, Ice Cream Sandwich). The <a href="http://developer.android.com/reference/android/webkit/CookieManager.html" rel="noreferrer">CookieManager</a> API is not deprecated. </p>
  
  <p>What is causing this problem and are there any workarounds?</p>