|
|
@ -74,6 +74,7 @@ public class FragmentOptionsEncryption extends FragmentBase implements SharedPre
|
|
|
|
private SwitchCompat swAutocrypt;
|
|
|
|
private SwitchCompat swAutocrypt;
|
|
|
|
private SwitchCompat swAutocryptMutual;
|
|
|
|
private SwitchCompat swAutocryptMutual;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private SwitchCompat swCheckCertificate;
|
|
|
|
private Button btnManageCertificates;
|
|
|
|
private Button btnManageCertificates;
|
|
|
|
private Button btnImportKey;
|
|
|
|
private Button btnImportKey;
|
|
|
|
private Button btnManageKeys;
|
|
|
|
private Button btnManageKeys;
|
|
|
@ -85,7 +86,8 @@ public class FragmentOptionsEncryption extends FragmentBase implements SharedPre
|
|
|
|
|
|
|
|
|
|
|
|
private final static String[] RESET_OPTIONS = new String[]{
|
|
|
|
private final static String[] RESET_OPTIONS = new String[]{
|
|
|
|
"sign_default", "encrypt_default", "auto_decrypt",
|
|
|
|
"sign_default", "encrypt_default", "auto_decrypt",
|
|
|
|
"openpgp_provider", "autocrypt", "autocrypt_mutual"
|
|
|
|
"openpgp_provider", "autocrypt", "autocrypt_mutual",
|
|
|
|
|
|
|
|
"check_certificate"
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
@ -107,6 +109,7 @@ public class FragmentOptionsEncryption extends FragmentBase implements SharedPre
|
|
|
|
swAutocrypt = view.findViewById(R.id.swAutocrypt);
|
|
|
|
swAutocrypt = view.findViewById(R.id.swAutocrypt);
|
|
|
|
swAutocryptMutual = view.findViewById(R.id.swAutocryptMutual);
|
|
|
|
swAutocryptMutual = view.findViewById(R.id.swAutocryptMutual);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
swCheckCertificate = view.findViewById(R.id.swCheckCertificate);
|
|
|
|
btnManageCertificates = view.findViewById(R.id.btnManageCertificates);
|
|
|
|
btnManageCertificates = view.findViewById(R.id.btnManageCertificates);
|
|
|
|
btnImportKey = view.findViewById(R.id.btnImportKey);
|
|
|
|
btnImportKey = view.findViewById(R.id.btnImportKey);
|
|
|
|
btnManageKeys = view.findViewById(R.id.btnManageKeys);
|
|
|
|
btnManageKeys = view.findViewById(R.id.btnManageKeys);
|
|
|
@ -190,6 +193,13 @@ public class FragmentOptionsEncryption extends FragmentBase implements SharedPre
|
|
|
|
|
|
|
|
|
|
|
|
// S/MIME
|
|
|
|
// S/MIME
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
swCheckCertificate.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
|
|
|
|
|
prefs.edit().putBoolean("check_certificate", checked).apply();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
btnManageCertificates.setOnClickListener(new View.OnClickListener() {
|
|
|
|
btnManageCertificates.setOnClickListener(new View.OnClickListener() {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void onClick(View v) {
|
|
|
|
public void onClick(View v) {
|
|
|
@ -343,6 +353,8 @@ public class FragmentOptionsEncryption extends FragmentBase implements SharedPre
|
|
|
|
swAutocrypt.setChecked(prefs.getBoolean("autocrypt", true));
|
|
|
|
swAutocrypt.setChecked(prefs.getBoolean("autocrypt", true));
|
|
|
|
swAutocryptMutual.setChecked(prefs.getBoolean("autocrypt_mutual", true));
|
|
|
|
swAutocryptMutual.setChecked(prefs.getBoolean("autocrypt_mutual", true));
|
|
|
|
swAutocryptMutual.setEnabled(swAutocrypt.isChecked());
|
|
|
|
swAutocryptMutual.setEnabled(swAutocrypt.isChecked());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
swCheckCertificate.setChecked(prefs.getBoolean("check_certificate", true));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void testOpenPgp(String pkg) {
|
|
|
|
private void testOpenPgp(String pkg) {
|
|
|
|