옵션메뉴를 하나 달아서 메뉴를 클릭시 preferences에 저장된 값을 초기화 시키고 싶은데요

아래와 같이 옵션메뉴 추가해서 클릭시 토스트를 띄우는 것은 되는데 초기화가 되질 않습니다.

방법이 잘못되었나요?

 

public boolean onCreateOptionsMenu(Menu menu){
     super.onCreateOptionsMenu(menu);
     
     MenuItem m = menu.add(0, 0, 0, "초기화");
     
     return true;
    }
   
    public boolean onOptionsItemSelected(MenuItem item){
     
     
     pref = getSharedPreferences("pref", Activity.MODE_PRIVATE);
     SharedPreferences.Editor editor = pref.edit();
     
       
        editor.clear();
        editor.commit();
       
     
        Toast.makeText(this, "초기화 되었슴돠", Toast.LENGTH_LONG).show();
     return true;
    }