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:
parent
ec37516424
commit
f9e1fe4079
1 changed files with 8 additions and 2 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue