mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-03 09:49:19 +02:00
Fix
This commit is contained in:
parent
9587e38660
commit
53f57f1032
3 changed files with 14 additions and 14 deletions
|
@ -471,8 +471,7 @@ public class BookCollectionShadow extends AbstractBookCollection implements Serv
|
|||
return false;
|
||||
}
|
||||
try {
|
||||
myInterface.saveCover(SerializerUtil.serialize(book), url);
|
||||
return true;
|
||||
return myInterface.saveCover(SerializerUtil.serialize(book), url);
|
||||
} catch (RemoteException e) {
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
|
|
|
@ -277,8 +277,7 @@ public class LibraryService extends Service {
|
|||
|
||||
@Override
|
||||
public boolean saveCover(String book, String url) throws RemoteException {
|
||||
myCollection.saveCover(SerializerUtil.deserializeBook(book), url);
|
||||
return true;
|
||||
return myCollection.saveCover(SerializerUtil.deserializeBook(book), url);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -720,16 +720,18 @@ public class BookCollection extends AbstractBookCollection {
|
|||
|
||||
OutputStream outStream = null;
|
||||
File file = new File(myPath, book.getId() + ".PNG");
|
||||
try {
|
||||
outStream = new FileOutputStream(file);
|
||||
coverBitmap.compress(Bitmap.CompressFormat.PNG, 100, outStream);
|
||||
outStream.flush();
|
||||
outStream.close();
|
||||
} catch (FileNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
try {
|
||||
outStream = new FileOutputStream(file);
|
||||
coverBitmap.compress(Bitmap.CompressFormat.PNG, 100, outStream);
|
||||
outStream.flush();
|
||||
outStream.close();
|
||||
} catch (FileNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue