Add tests for the Ripple panic trigger action

This commit is contained in:
Alexander Bakker 2022-02-17 14:25:32 +01:00
parent 43c064bb26
commit d1d5df8051
6 changed files with 90 additions and 30 deletions

View file

@ -9,15 +9,13 @@ import android.preference.PreferenceManager;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.ArrayList;
import java.util.Collections;
import org.json.JSONObject;
import java.util.Date;
import java.util.List;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.UUID;
@ -63,6 +61,10 @@ public class Preferences {
return _prefs.getBoolean("pref_panic_trigger", false);
}
public void setIsPanicTriggerEnabled(boolean enabled) {
_prefs.edit().putBoolean("pref_panic_trigger", enabled).apply();
}
public boolean isSecureScreenEnabled() {
// screen security should be enabled by default, but not for debug builds
return _prefs.getBoolean("pref_secure_screen", !BuildConfig.DEBUG);