mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 12:44:42 +00:00
Added message about invalid settings files
Some people try to import K9 settings files
This commit is contained in:
parent
327f004c7a
commit
bfc662ec41
2 changed files with 4 additions and 0 deletions
|
@ -91,6 +91,7 @@ import javax.crypto.BadPaddingException;
|
|||
import javax.crypto.Cipher;
|
||||
import javax.crypto.CipherInputStream;
|
||||
import javax.crypto.CipherOutputStream;
|
||||
import javax.crypto.IllegalBlockSizeException;
|
||||
import javax.crypto.SecretKey;
|
||||
import javax.crypto.SecretKeyFactory;
|
||||
import javax.crypto.spec.IvParameterSpec;
|
||||
|
@ -962,6 +963,8 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
|
|||
protected void onException(Bundle args, Throwable ex) {
|
||||
if (ex.getCause() instanceof BadPaddingException)
|
||||
ToastEx.makeText(ActivitySetup.this, R.string.title_setup_password_invalid, Toast.LENGTH_LONG).show();
|
||||
else if (ex instanceof IOException && ex.getCause() instanceof IllegalBlockSizeException)
|
||||
ToastEx.makeText(ActivitySetup.this, R.string.title_setup_import_invalid, Toast.LENGTH_LONG).show();
|
||||
else if (ex instanceof IllegalArgumentException)
|
||||
ToastEx.makeText(ActivitySetup.this, ex.getMessage(), Toast.LENGTH_LONG).show();
|
||||
else
|
||||
|
|
|
@ -175,6 +175,7 @@
|
|||
<string name="title_setup_password_invalid">Password invalid</string>
|
||||
<string name="title_setup_exported">Settings exported</string>
|
||||
<string name="title_setup_imported">Settings imported</string>
|
||||
<string name="title_setup_import_invalid">Invalid settings file</string>
|
||||
|
||||
<string name="title_setup_notifications">Manage notifications</string>
|
||||
<string name="title_setup_reorder_accounts">Order accounts</string>
|
||||
|
|
Loading…
Reference in a new issue