Fix minor permission error with the PGP backups

This commit is contained in:
Jakob Nixdorf 2017-07-14 15:15:00 +02:00
parent 3e4272c4f4
commit b997c30225
No known key found for this signature in database
GPG key ID: BE99BF86574A7DBC

View file

@ -175,6 +175,18 @@ public class BackupActivity extends AppCompatActivity {
} else {
Toast.makeText(this, R.string.backup_toast_storage_permissions, Toast.LENGTH_LONG).show();
}
} else if (requestCode == PERMISSIONS_REQUEST_READ_IMPORT_PGP) {
if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
importEncryptedWithSelector();
} else {
Toast.makeText(this, R.string.backup_toast_storage_permissions, Toast.LENGTH_LONG).show();
}
} else if (requestCode == PERMISSIONS_REQUEST_WRITE_EXPORT_PGP) {
if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
exportEncryptedWithSelector();
} else {
Toast.makeText(this, R.string.backup_toast_storage_permissions, Toast.LENGTH_LONG).show();
}
} else {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
}