@Override public synchronized void add(URI uri, HttpCookie cookie) { if (logVerbose) { Log.i(LOG_TAG, "add(URI " + uri + ", HttpCookie " + cookie + ")"); } store.add(uri, cookie); persist(); }
private void importCookies(Map<URI, List<SerializableCookie>> cookiesToRestore) { Map<URI, List<HttpCookie>> restoredCookies = new HashMap<URI, List<HttpCookie>>(); if (null != cookiesToRestore) { for (URI uri : cookiesToRestore.keySet()) { restoredCookies.put( uri, SerializableHttpCookieAdapter.deserialize(cookiesToRestore.get(uri))); } for (URI uri : restoredCookies.keySet()) { for (HttpCookie cookie : restoredCookies.get(uri)) { store.add(uri, cookie); } } } }