SharedPreference를 이용해서 자동로그인은 구현하였는데

 

자동로그인 되어 있는 상태에서 로그아웃 버튼을 선택하면 저장되어있는 정보들을 삭제하여

 

다른 아이디로 로그인할수 있게 구현하였습니다.

 

하지만 이상하게 3번정도 로그아웃하며 그다음부터 계속 자동로그인 됩니다.

 

어디가 문제일까요?

 

public static void logout(){
  if(editor != null){
   System.out.println("날렸습니다 ^^7");
   editor.remove("id");
   editor.remove("pw");
   editor.clear();
   editor.commit();
  }
 }

 

clear하고 commit해줘도 계속 자동로그인 되는 현상...