mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-05 10:49:24 +02:00
* An NPE during library starting has been fixed (this NPE only occures on systems with locale "not supported" by FBReader (like Spanish, Finnish, Japan, etc.)
This commit is contained in:
parent
b9f5490af9
commit
6dc9b385d8
3 changed files with 21 additions and 4 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
===== 0.7.16 (Nov 11, 2010) =====
|
||||||
|
* Czech resources have been updated
|
||||||
|
* An NPE during library starting has been fixed (this NPE only occures on systems with locale "not supported" by FBReader (like Spanish, Finnish, Japan, etc.)
|
||||||
|
|
||||||
===== 0.7.15 (Nov 11, 2010) =====
|
===== 0.7.15 (Nov 11, 2010) =====
|
||||||
* External TTF fonts are supported (for Android version >= 1.6)
|
* External TTF fonts are supported (for Android version >= 1.6)
|
||||||
* Ukrainian localization (by Dmytro Shevchenko) has been added
|
* Ukrainian localization (by Dmytro Shevchenko) has been added
|
||||||
|
|
|
@ -215,9 +215,6 @@ public final class Library {
|
||||||
collectBooks();
|
collectBooks();
|
||||||
//System.err.println(myBooks.size() + " books " + System.currentTimeMillis() % 20000);
|
//System.err.println(myBooks.size() + " books " + System.currentTimeMillis() % 20000);
|
||||||
for (Book book : myBooks) {
|
for (Book book : myBooks) {
|
||||||
if (book == null) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
bookById.put(book.getId(), book);
|
bookById.put(book.getId(), book);
|
||||||
List<Author> authors = book.authors();
|
List<Author> authors = book.authors();
|
||||||
if (authors.isEmpty()) {
|
if (authors.isEmpty()) {
|
||||||
|
|
|
@ -198,8 +198,24 @@ public final class ZLAndroidLibrary extends ZLibrary {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean exists() {
|
public boolean exists() {
|
||||||
|
try {
|
||||||
|
AssetFileDescriptor descriptor = myApplication.getAssets().openFd(getPath());
|
||||||
|
if (descriptor != null) {
|
||||||
|
descriptor.close();
|
||||||
|
// file exists
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
String[] names = myApplication.getAssets().list(getPath());
|
||||||
|
if (names != null && names.length != 0) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long size() {
|
public long size() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue