Code example for BrowserCompatSpec

0
	private final SharedPreferences prefs;
 
	private boolean persistCookies;
 
	public CookieJar(Context ctx) {
		cookieSpec = new BrowserCompatSpec();
		prefs = ctx.getSharedPreferences("droidparts_restclient_cookies",
				MODE_PRIVATE);
	} 
 
	public void setPersistent(boolean persistent) {
		persistCookies = persistent;
		if (persistCookies) {
			cookies.clear();
			restoreCookies(); 
		} 
	} 
 
	// HttpURLConnection 
 
	@Override