mirror of
https://github.com/android-password-store/Android-Password-Store
synced 2025-08-31 06:15:48 +00:00
check that the data we get is not null
This commit is contained in:
@@ -154,6 +154,9 @@ public class UserPreference extends ActionBarActivity implements Preference.OnPr
|
|||||||
case IMPORT_SSH_KEY:
|
case IMPORT_SSH_KEY:
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
if (data.getData() == null) {
|
||||||
|
throw new IOException("Unable to open file");
|
||||||
|
}
|
||||||
copySshKey(data.getData());
|
copySshKey(data.getData());
|
||||||
Toast.makeText(this, this.getResources().getString(R.string.ssh_key_success_dialog_title), Toast.LENGTH_LONG).show();
|
Toast.makeText(this, this.getResources().getString(R.string.ssh_key_success_dialog_title), Toast.LENGTH_LONG).show();
|
||||||
setResult(RESULT_OK);
|
setResult(RESULT_OK);
|
||||||
|
Reference in New Issue
Block a user