本文整理汇总了Java中com.loopj.android.http.PersistentCookieStore.clear方法的典型用法代码示例。如果您正苦于以下问题:Java PersistentCookieStore.clear方法的具体用法?Java PersistentCookieStore.clear怎么用?Java PersistentCookieStore.clear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.loopj.android.http.PersistentCookieStore
的用法示例。
在下文中一共展示了PersistentCookieStore.clear方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onOptionsItemSelected
import com.loopj.android.http.PersistentCookieStore; //导入方法依赖的package包/类
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
// �û�������ť
if (id == R.id.feedback) {
FeedbackAgent agent = new FeedbackAgent(MainActivity.this);
agent.startFeedbackActivity();
}
if (id == R.id.logout) {
sharedPreferences.clear();
PersistentCookieStore cookieStore = new PersistentCookieStore(
MainActivity.this);
cookieStore.clear();
Intent intent = new Intent(this, MainActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
return true;
}
return super.onOptionsItemSelected(item);
}
示例2: cleanUpInfo
import com.loopj.android.http.PersistentCookieStore; //导入方法依赖的package包/类
/**
* 退出的时候清除数据
*/
public void cleanUpInfo() {
//清楚所有缓存
DataPool dp = new DataPool(DataPool.SP_Name_Publicer, this);
dp.removeAll();
DataPool dp1 = new DataPool(DataPool.SP_Name_Employer, this);
dp1.removeAll();
PersistentCookieStore cs = new PersistentCookieStore(this);
cs.clear();
}
示例3: cleanUpInfo
import com.loopj.android.http.PersistentCookieStore; //导入方法依赖的package包/类
public void cleanUpInfo() {
// 清除所有缓存
DataPool dp = new DataPool(DataPool.SP_Name_User, this);
dp.removeAll();
PersistentCookieStore cs = new PersistentCookieStore(this);
cs.clear();
}
示例4: cleanUpInfo
import com.loopj.android.http.PersistentCookieStore; //导入方法依赖的package包/类
/**
* 退出账号时清除数据,有点耗时,推荐该操作放在线程
* files/下数据未清除
*/
public void cleanUpInfo() {
// 清楚所有缓存
DataPool dp = new DataPool(DataPool.SP_Name_User, this);
dp.removeAll();
dp = new DataPool(AppCache.Cache_Name, this);
dp.removeAll();
FileUtils.deleteFilesInFolder(getFilesDir().getAbsolutePath());
PersistentCookieStore cs = new PersistentCookieStore(this);
cs.clear();
ImageLoader.getInstance().clearDiscCache();
ImageLoader.getInstance().clearMemoryCache();
}
示例5: logout
import com.loopj.android.http.PersistentCookieStore; //导入方法依赖的package包/类
public void logout() {
userPref.clear();
PersistentCookieStore myCookieStore = new PersistentCookieStore(context);
myCookieStore.clear();
client.setCookieStore(myCookieStore);
}
示例6: logout
import com.loopj.android.http.PersistentCookieStore; //导入方法依赖的package包/类
public static void logout(Context context){
PersistentCookieStore cookieStore = new PersistentCookieStore(context);
cookieStore.clear();
}