Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cbec2b07 authored by Jonathan Klee's avatar Jonathan Klee
Browse files

Merge remote-tracking branch 'upstream/master'

parents 0b0ffa77 02849180
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -93,7 +93,7 @@ class SettingsProvider : ContentProvider() {

    private fun queryCheckIn(p: Array<out String>): Cursor = MatrixCursor(p).addRow(p) { key ->
        when (key) {
            CheckIn.ENABLED -> getSettingsBoolean(key, true)
            CheckIn.ENABLED -> getSettingsBoolean(key, false)
            CheckIn.ANDROID_ID -> checkInPrefs.getLong(key, 0)
            CheckIn.DIGEST -> checkInPrefs.getString(key, CheckIn.INITIAL_DIGEST)
                ?: CheckIn.INITIAL_DIGEST
+2 −2
Original line number Diff line number Diff line
@@ -74,8 +74,8 @@ class SafetyNetAppPreferencesFragment : PreferenceFragmentCompat() {
                    summary.requestType
                ).let { (text, icon) ->
                    preference.summary = when (summary.requestType) {
                        ATTESTATION -> "Attestation: $text"
                        RECAPTCHA -> "ReCaptcha: $text"
                        ATTESTATION -> getString(R.string.pref_safetynet_recent_attestation_summary, text)
                        RECAPTCHA -> getString(R.string.pref_safetynet_recent_recaptcha_summary, text)
                    }
                    preference.icon = icon
                }
+8 −2
Original line number Diff line number Diff line
@@ -67,8 +67,14 @@ fun formatSummaryForSafetyNetResult(context: Context, result: String?, status: S
            }
        }
        SafetyNetRequestType.RECAPTCHA -> {
            if (status?.isSuccess != true) return context.getString(R.string.pref_test_summary_failed, status?.statusMessage) to ContextCompat.getDrawable(context, R.drawable.ic_circle_error)
            if (result == null) return context.getString(R.string.pref_test_summary_failed, "No result") to ContextCompat.getDrawable(context, R.drawable.ic_circle_warn)
            if (status?.isSuccess != true) {
                return context.getString(R.string.pref_test_summary_failed, status?.statusMessage) to
                        ContextCompat.getDrawable(context, R.drawable.ic_circle_error)
            }
            if (result == null) {
                return context.getString(R.string.pref_test_summary_failed, context.getString(R.string.pref_safetynet_test_no_result)) to
                        ContextCompat.getDrawable(context, R.drawable.ic_circle_warn)
            }
            val (success, errorCodes) = try {
                JSONObject(result).let {
                        it.optBoolean("success", false) to
+11 −0
Original line number Diff line number Diff line
@@ -185,6 +185,16 @@
    <string name="pref_safetynet_recent_eval_type">Metodo analisi</string>
    <string name="pref_safetynet_recent_advice">Avviso</string>
    <string name="pref_safetynet_recent_copy_json">Copia dati JSON JWS</string>
    <string name="pref_safetynet_recent_uses">Utilizzi recenti</string>
    <string name="pref_safetynet_recent_attestation_summary">Attestazione: %s</string>
    <string name="pref_safetynet_recent_recaptcha_summary">ReCaptcha: %s</string>
    <string name="pref_safetynet_recent_copied">Copiato negli appunti!</string>
    <string name="pref_safetynet_test_not_completed">Non ancora completato</string>
    <string name="pref_safetynet_test_no_result">Nessun risultato</string>
    <string name="pref_safetynet_test_invalid_json">JSON non valido</string>
    <string name="pref_safetynet_test_integrity_cts_passed">Integrità e CTS superati</string>
    <string name="pref_safetynet_test_cts_failed">CTS non superato</string>
    <string name="pref_safetynet_test_integrity_failed">Integrità non superata</string>
    <string name="pref_device_registration_device_profile_category">Profilo Dispositivo</string>
    <string name="pref_device_registration_select_profile_title">Scegli profilo</string>
    <string name="pref_device_registration_import_custom_profile_summary">Importa profilo dispositivo da file</string>
@@ -193,4 +203,5 @@
    <string name="safetynet_last_run_at">Ultimo utilizzo: <xliff:g example="Yesterday, 02:20 PM">%1$s</xliff:g></string>
    <string name="menu_clear_recent_requests">Cancella richieste recenti</string>
    <string name="prefcat_safetynet_apps_title">App che usano SafetyNet</string>
    <string name="pref_recaptcha_enterprise_test_title">Prova ReCAPTCHA Enterprise</string>
</resources>
+2 −0
Original line number Diff line number Diff line
@@ -198,6 +198,8 @@ This can take a couple of minutes."</string>
    <string name="pref_device_registration_device_profile_category">Device profile</string>

    <string name="pref_safetynet_recent_uses">Recent uses</string>
    <string name="pref_safetynet_recent_attestation_summary">Attestation: %s</string>
    <string name="pref_safetynet_recent_recaptcha_summary">ReCaptcha: %s</string>
    <string name="pref_safetynet_recent_copy_json">Copy JSON JWS data</string>
    <string name="pref_safetynet_recent_advice">Advice</string>
    <string name="pref_safetynet_recent_eval_type">Evaluation type</string>
Loading