case REQUEST_CODE_PICK_FILE:
if (resultCode == RESULT_OK && resultData != null) {
Uri uri = resultData.getData();
try {
if (uri != null) {
<BUG>readKeyFromFile(new File(URI.create(uri.toString())));
} else {</BUG>
String filename = resultData.getDataString();
<BUG>if (filename != null)

readKeyFromFile(new File(URI.create(filename)));

}</BUG>
} catch (IllegalArgumentException e) {

case REQUEST_CODE_PICK_FILE:
if (resultCode == RESULT_OK && resultData != null) {
Uri uri = resultData.getData();
try {
if (uri != null) {
readKeyFromFile(uri);
} else {
String filename = resultData.getDataString();
if (filename != null) {
readKeyFromFile(Uri.parse(filename));
}
}
} catch (IllegalArgumentException e) {
