catch security exception when importing backup

This commit is contained in:
Daniel Gultsch 2022-03-12 17:57:32 +01:00
parent 1969a23726
commit 7731a864fd

View file

@ -134,6 +134,8 @@ public class ImportBackupActivity extends ActionBarActivity implements ServiceCo
} catch (final IOException | IllegalArgumentException e) {
Log.d(Config.LOGTAG, "unable to open backup file " + uri, e);
Snackbar.make(binding.coordinator, R.string.not_a_backup_file, Snackbar.LENGTH_LONG).show();
} catch (final SecurityException e) {
Snackbar.make(binding.coordinator, R.string.sharing_application_not_grant_permission, Snackbar.LENGTH_LONG).show();
}
}