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()) {
Log.i("Stop with screen off");
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(ActivityBase.this);
prefs.edit().remove("last_authentication").apply();
Helper.clearAuthentication(this);
}
}

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

Loading…
Cancel
Save