mirror of https://github.com/YTVanced/VancedMicroG
Fix SafetyNet default value, show server type in overview (#629)
This commit is contained in:
parent
9e405cd0e0
commit
81f484a439
|
@ -57,7 +57,7 @@ public class SafetyNetPrefs implements SharedPreferences.OnSharedPreferenceChang
|
||||||
|
|
||||||
public void update() {
|
public void update() {
|
||||||
disabled = defaultPreferences.getBoolean(PREF_SNET_DISABLED, true);
|
disabled = defaultPreferences.getBoolean(PREF_SNET_DISABLED, true);
|
||||||
official = defaultPreferences.getBoolean(PREF_SNET_OFFICIAL, true);
|
official = defaultPreferences.getBoolean(PREF_SNET_OFFICIAL, false);
|
||||||
selfSigned = defaultPreferences.getBoolean(PREF_SNET_SELF_SIGNED, false);
|
selfSigned = defaultPreferences.getBoolean(PREF_SNET_SELF_SIGNED, false);
|
||||||
thirdParty = defaultPreferences.getBoolean(PREF_SNET_THIRD_PARTY, false);
|
thirdParty = defaultPreferences.getBoolean(PREF_SNET_THIRD_PARTY, false);
|
||||||
customUrl = defaultPreferences.getString(PREF_SNET_CUSTOM_URL, null);
|
customUrl = defaultPreferences.getString(PREF_SNET_CUSTOM_URL, null);
|
||||||
|
@ -88,6 +88,10 @@ public class SafetyNetPrefs implements SharedPreferences.OnSharedPreferenceChang
|
||||||
return official;
|
return official;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isThirdParty() {
|
||||||
|
return thirdParty;
|
||||||
|
}
|
||||||
|
|
||||||
public String getServiceUrl() {
|
public String getServiceUrl() {
|
||||||
if (official) return OFFICIAL_ATTEST_BASE_URL;
|
if (official) return OFFICIAL_ATTEST_BASE_URL;
|
||||||
return customUrl;
|
return customUrl;
|
||||||
|
|
|
@ -80,7 +80,22 @@ public class SettingsActivity extends AbstractDashboardActivity {
|
||||||
} else {
|
} else {
|
||||||
findPreference(PREF_GCM).setSummary(R.string.abc_capital_off);
|
findPreference(PREF_GCM).setSummary(R.string.abc_capital_off);
|
||||||
}
|
}
|
||||||
findPreference(PREF_SNET).setSummary(SafetyNetPrefs.get(getContext()).isEnabled() ? R.string.service_status_enabled : R.string.service_status_disabled);
|
|
||||||
|
if (SafetyNetPrefs.get(getContext()).isEnabled()) {
|
||||||
|
String snet_info = "";
|
||||||
|
|
||||||
|
if (SafetyNetPrefs.get(getContext()).isOfficial()) {
|
||||||
|
snet_info = getString(R.string.pref_snet_status_official_info);
|
||||||
|
} else if (SafetyNetPrefs.get(getContext()).isSelfSigned()) {
|
||||||
|
snet_info = getString(R.string.pref_snet_status_self_signed_info);
|
||||||
|
} else if (SafetyNetPrefs.get(getContext()).isThirdParty()) {
|
||||||
|
snet_info = getString(R.string.pref_snet_status_third_party_info);
|
||||||
|
}
|
||||||
|
|
||||||
|
findPreference(PREF_SNET).setSummary(getString(R.string.service_status_enabled) + " / " + snet_info);
|
||||||
|
} else {
|
||||||
|
findPreference(PREF_SNET).setSummary(R.string.service_status_disabled);
|
||||||
|
}
|
||||||
|
|
||||||
Preferences unifiedNlPrefs = new Preferences(getContext());
|
Preferences unifiedNlPrefs = new Preferences(getContext());
|
||||||
int backendCount = TextUtils.isEmpty(unifiedNlPrefs.getLocationBackends()) ? 0 :
|
int backendCount = TextUtils.isEmpty(unifiedNlPrefs.getLocationBackends()) ? 0 :
|
||||||
|
|
|
@ -153,11 +153,14 @@ Dies kann einige Minuten dauern."</string>
|
||||||
|
|
||||||
<string name="pref_snet_status_official_title">Offizielle Server nutzen</string>
|
<string name="pref_snet_status_official_title">Offizielle Server nutzen</string>
|
||||||
<string name="pref_snet_status_official_summary">Erfordert eine ungerootetes ROM und den microG DroidGuard Helper</string>
|
<string name="pref_snet_status_official_summary">Erfordert eine ungerootetes ROM und den microG DroidGuard Helper</string>
|
||||||
|
<string name="pref_snet_status_official_info">offizieller Server</string>
|
||||||
<string name="pref_snet_status_third_party_title">Alternativen Server nutzen</string>
|
<string name="pref_snet_status_third_party_title">Alternativen Server nutzen</string>
|
||||||
<string name="pref_snet_status_third_party_summary">Alternative Server können auch SafetyNet-Anfragen beantworten, die nicht durch DroidGuard signiert wurden</string>
|
<string name="pref_snet_status_third_party_summary">Alternative Server können auch SafetyNet-Anfragen beantworten, die nicht durch DroidGuard signiert wurden</string>
|
||||||
|
<string name="pref_snet_status_third_party_info">Dritt-Server</string>
|
||||||
<string name="pref_snet_custom_url_title">Alternative Server URL</string>
|
<string name="pref_snet_custom_url_title">Alternative Server URL</string>
|
||||||
<string name="pref_snet_custom_url_summary">Vollständige URL des alternativen Servers der SafetyNet-Anfragen beantwortet</string>
|
<string name="pref_snet_custom_url_summary">Vollständige URL des alternativen Servers der SafetyNet-Anfragen beantwortet</string>
|
||||||
<string name="pref_snet_self_signed_title">Selbst signieren</string>
|
<string name="pref_snet_self_signed_title">Selbst signieren</string>
|
||||||
<string name="pref_snet_self_signed_summary">Statt einen Server zu nutzen, die SafetyNet signature lokal mit einem eigens erstellten Zertifikat signieren. Die meisten Apps werden diese Signaturen nicht akzeptieren.</string>
|
<string name="pref_snet_self_signed_summary">Statt einen Server zu nutzen, die SafetyNet signature lokal mit einem eigens erstellten Zertifikat signieren. Die meisten Apps werden diese Signaturen nicht akzeptieren.</string>
|
||||||
|
<string name="pref_snet_status_self_signed_info">selbst-signiertes Zertifikat</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -166,11 +166,14 @@ This can take a couple of minutes."</string>
|
||||||
|
|
||||||
<string name="pref_snet_status_official_title">Use official server</string>
|
<string name="pref_snet_status_official_title">Use official server</string>
|
||||||
<string name="pref_snet_status_official_summary">Requires an unrooted system and microG DroidGuard Helper installed</string>
|
<string name="pref_snet_status_official_summary">Requires an unrooted system and microG DroidGuard Helper installed</string>
|
||||||
|
<string name="pref_snet_status_official_info">official server</string>
|
||||||
<string name="pref_snet_status_third_party_title">Use third-party server</string>
|
<string name="pref_snet_status_third_party_title">Use third-party server</string>
|
||||||
<string name="pref_snet_status_third_party_summary">Third-party servers might be able to reply to SafetyNet requests without DroidGuard signature</string>
|
<string name="pref_snet_status_third_party_summary">Third-party servers might be able to reply to SafetyNet requests without DroidGuard signature</string>
|
||||||
|
<string name="pref_snet_status_third_party_info">third-party server</string>
|
||||||
<string name="pref_snet_custom_url_title">Custom server URL</string>
|
<string name="pref_snet_custom_url_title">Custom server URL</string>
|
||||||
<string name="pref_snet_custom_url_summary">Full URL of the third-party server answering SafetyNet attestation requests</string>
|
<string name="pref_snet_custom_url_summary">Full URL of the third-party server answering SafetyNet attestation requests</string>
|
||||||
<string name="pref_snet_self_signed_title">Use self-signed certificate</string>
|
<string name="pref_snet_self_signed_title">Use self-signed certificate</string>
|
||||||
<string name="pref_snet_self_signed_summary">Instead of requesting a server, sign SafetyNet responses locally using a self-signed certificate. Most apps will refuse to use self-signed responses.</string>
|
<string name="pref_snet_self_signed_summary">Instead of requesting a server, sign SafetyNet responses locally using a self-signed certificate. Most apps will refuse to use self-signed responses.</string>
|
||||||
|
<string name="pref_snet_status_self_signed_info">self-signed certificate</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in New Issue