1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-06 03:50:19 +02:00

file opening (from network library, download notification and external programs) has been fixed

This commit is contained in:
Nikolay Pultsin 2010-12-01 11:27:38 +00:00
parent ec37516424
commit f9e1fe4079

View file

@ -98,8 +98,14 @@ public final class FBReader extends ZLAndroidActivity {
@Override @Override
protected ZLFile fileFromIntent(Intent intent) { protected ZLFile fileFromIntent(Intent intent) {
String fileToOpen = intent.getStringExtra(BOOK_PATH_KEY); String filePath = intent.getStringExtra(BOOK_PATH_KEY);
return fileToOpen != null ? ZLFile.createFileByPath(fileToOpen) : null; if (filePath == null) {
final Uri data = intent.getData();
if (data != null) {
filePath = data.getPath();
}
}
return filePath != null ? ZLFile.createFileByPath(filePath) : null;
} }
@Override @Override