1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-05 19:42:17 +02:00
This commit is contained in:
lidoxod 2013-07-27 19:56:16 +04:00
parent f43a5db07c
commit c3d00e2dd8
2 changed files with 4 additions and 6 deletions

View file

@ -25,7 +25,6 @@ import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.os.FileObserver;
import android.os.RemoteException;
import org.geometerplus.zlibrary.core.filesystem.ZLFile;
@ -276,7 +275,7 @@ public class LibraryService extends Service {
}
@Override
public boolean saveCover(String book, String url) throws RemoteException {
public boolean saveCover(String book, String url) {
return myCollection.saveCover(SerializerUtil.deserializeBook(book), url);
}
}

View file

@ -714,12 +714,11 @@ public class BookCollection extends AbstractBookCollection {
if (coverBitmap == null) {
return false;
}
File myPath = new File(url);
myPath.mkdirs();
OutputStream outStream = null;
File file = new File(myPath, book.getId() + ".PNG");
File file = new File(url);
File parent = file.getParentFile();
parent.mkdirs();
try {
outStream = new FileOutputStream(file);
coverBitmap.compress(Bitmap.CompressFormat.PNG, 100, outStream);