diff options
author | Christian Schneppe <christian@pix-art.de> | 2019-08-31 15:12:04 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2019-08-31 15:12:04 +0200 |
commit | 6d83b098e660725be661cd3a2e6ae2ff9c538f4a (patch) | |
tree | 0c471ab7a3068437d90dd143cf5c99f85158335c /src/main/java | |
parent | a65e9edef1eba87fd527ab9bb49d89a2edf9bca0 (diff) |
catch IllegalArgumentException when reading backup file
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/de/pixart/messenger/services/ImportBackupService.java | 2 | ||||
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/ImportBackupActivity.java | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/services/ImportBackupService.java b/src/main/java/de/pixart/messenger/services/ImportBackupService.java index fe1fd414b..79616305b 100644 --- a/src/main/java/de/pixart/messenger/services/ImportBackupService.java +++ b/src/main/java/de/pixart/messenger/services/ImportBackupService.java @@ -139,6 +139,8 @@ public class ImportBackupService extends Service { } } catch (IOException e) { Log.d(Config.LOGTAG, "unable to read backup file ", e); + } catch (IllegalArgumentException e) { + Log.d(Config.LOGTAG, "unable to read backup file ", e); } } } diff --git a/src/main/java/de/pixart/messenger/ui/ImportBackupActivity.java b/src/main/java/de/pixart/messenger/ui/ImportBackupActivity.java index 3b7744088..cc5b35e11 100644 --- a/src/main/java/de/pixart/messenger/ui/ImportBackupActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ImportBackupActivity.java @@ -139,6 +139,8 @@ public class ImportBackupActivity extends XmppActivity implements ServiceConnect showEnterPasswordDialog(backupFile, finishOnCancel); } catch (IOException e) { Snackbar.make(binding.coordinator, R.string.not_a_backup_file, Snackbar.LENGTH_LONG).show(); + } catch (IllegalArgumentException e) { + Snackbar.make(binding.coordinator, R.string.not_a_backup_file, Snackbar.LENGTH_LONG).show(); } } |