Skip to content
This repository has been archived by the owner on Oct 18, 2021. It is now read-only.

Commit

Permalink
Enhancement: ability to query isAllActionDontShowAgain isAnyActionDon…
Browse files Browse the repository at this point in the history
…tShowAgain
  • Loading branch information
tabebqena committed Feb 18, 2020
1 parent 9b45671 commit cb53a4d
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,24 @@ public static void setDontShowAgain(Context mContext, KillerManager.Actions acti
public static boolean isDontShowAgain(Context mContext, KillerManager.Actions action){
return getSharedPreferences(mContext).getBoolean(DONT_SHOW_AGAIN+action.toString(),false);
}

public static boolean isAllDontShowAgain(Context context){
for ( KillerManager.Actions action : KillerManager.Actions.values()){
if ( ! isDontShowAgain(context, action)){
return false;
}
}
return true;
}

public static boolean isAnyDontShowAgain(Context context){
for ( KillerManager.Actions action : KillerManager.Actions.values()){
if ( isDontShowAgain(context, action)){
return true;
}
}
return false;
}


}

0 comments on commit cb53a4d

Please sign in to comment.