Refactoring

pull/157/head
M66B 6 years ago
parent b35a63dff9
commit 6f268c1b56

@ -147,8 +147,7 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
if (pm != null && !pm.isInteractive()) { if (pm != null && !pm.isInteractive()) {
Log.i("Stop with screen off"); Log.i("Stop with screen off");
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(ActivityBase.this); Helper.clearAuthentication(this);
prefs.edit().remove("last_authentication").apply();
} }
} }

@ -751,6 +751,11 @@ public class Helper {
prompt.authenticate(info.build()); prompt.authenticate(info.build());
} }
static void clearAuthentication(Context context) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
prefs.edit().remove("last_authentication").apply();
}
// Miscellaneous // Miscellaneous
static String sanitizeKeyword(String keyword) { static String sanitizeKeyword(String keyword) {

Loading…
Cancel
Save