title: WebView not accepting some cookies
body: <p>I'm loading a website in Webview which uses some cookies to store session. I've written following lines to accept cookies</p>
  
  <pre><code>CookieSyncManager.createInstance(this);
  CookieSyncManager.getInstance().startSync();
  CookieManager.getInstance().setAcceptCookie(true);
  if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.LOLLIPOP) {
      CookieManager.setAcceptFileSchemeCookies(true);
      CookieManager.getInstance().setAcceptThirdPartyCookies(webView, true);
  }
  webView.loadUrl("https://www.irctc.co.in/nget/train-search");
  </code></pre>
  
  <p>At one stage (after payment from payment gateway), <code>shouldOverrideUrlLoading</code> method is called and after that it's supposed to land to transaction success page but it keeps going to login page. This is my method:</p>
  
  <pre><code>@Override
  public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request) {
      Log.d(TAG, "The URL is loaded in webview itself");
      return false;
  }
  </code></pre>
  
  <p>Using Chrome Developer Tools, I can see following cookies for website
  <a href="https://i.stack.imgur.com/a2h7Y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/a2h7Y.png" alt="Cookies used by website"></a></p>
  
  <p>When I call method <code>CookieManager.getInstance().getCookie(url)</code> I can see that the cookies <strong>JESESSIONID</strong> and <strong>SLB_Cookie</strong> are present in webview, but not sure about that <strong>Local storage</strong> cookie. Also, if I remove the <strong>Local storage</strong> cookie in Chrome, I'm getting the exact same page (login page) instead of transaction success page like WebView. So I think if by any means if I check whether the Local Storage cookie is present in webview or not, and if not present then if I add it, my job would be done. But I'm not able to achieve either of the task.</p>