From 6d83b098e660725be661cd3a2e6ae2ff9c538f4a Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Sat, 31 Aug 2019 15:12:04 +0200 Subject: catch IllegalArgumentException when reading backup file --- src/main/java/de/pixart/messenger/services/ImportBackupService.java | 2 ++ src/main/java/de/pixart/messenger/ui/ImportBackupActivity.java | 2 ++ 2 files changed, 4 insertions(+) (limited to 'src/main/java/de/pixart') 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(); } } -- cgit v1.2.3