OSDN Git Service

T29635
authorYuji Konishi <yuji.k64613@gmail.com>
Sat, 22 Sep 2012 03:16:45 +0000 (12:16 +0900)
committerYuji Konishi <yuji.k64613@gmail.com>
Sat, 22 Sep 2012 03:16:45 +0000 (12:16 +0900)
source/workspace/EverFolder/src/com/yuji/ef/utility/OAuthUtil.java

index f71aca1..2cc7a69 100644 (file)
@@ -70,24 +70,7 @@ public class OAuthUtil {
                return session;
        }
 
-       public boolean logout(Context context){
-               final String prefix = "evernote.";
-               
-               SharedPreferences sp = getPreferencesForAuthData(context);
-               Editor e = sp.edit();           
-               
-               Map<String, ?> map = sp.getAll();
-               Set<String> set = map.keySet();
-               Iterator<String> it = set.iterator();
-               int len = prefix.length();
-               while (it.hasNext()){
-                       String key = it.next();
-                       if (key.length() >= len && key.substring(0, len).equals(prefix)){
-                               e.remove(key);
-                       }
-               }
-               e.commit();
-               
-               return true;
+       public void logout(Context context){
+           session.logOut(getPreferencesForAuthData(context)); 
        }
 }