Remove GSON lib

This commit is contained in:
Andrei.Rosca 2018-04-29 01:06:34 +02:00
parent 0b29cf086b
commit b494b2ea39
6 changed files with 39 additions and 76 deletions

View file

@ -4,9 +4,8 @@ import android.os.Handler;
import android.os.Looper;
import android.util.Log;
import com.google.gson.Gson;
import java.io.File;
import java.io.Serializable;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.HashMap;
@ -18,7 +17,9 @@ import us.shandian.giga.util.Utility;
import static org.schabi.newpipe.BuildConfig.DEBUG;
public class DownloadMission {
public class DownloadMission implements Serializable {
private static final long serialVersionUID = 0L;
private static final String TAG = DownloadMission.class.getSimpleName();
public interface MissionListener {
@ -79,7 +80,6 @@ public class DownloadMission {
private transient boolean mWritingToFile;
private static final int NO_IDENTIFIER = -1;
private long db_identifier = NO_IDENTIFIER;
public DownloadMission() {
}
@ -308,7 +308,7 @@ public class DownloadMission {
*/
private void doWriteThisToFile() {
synchronized (blockState) {
Utility.writeToFile(getMetaFilename(), new Gson().toJson(this));
Utility.writeToFile(getMetaFilename(), this);
}
}