Fix crash on loading not yet finished downloads from .giga files

This commit is contained in:
DafabHoid 2018-05-18 18:18:37 +02:00
parent 0a1743251e
commit 882fbf9275

View file

@ -5,6 +5,7 @@ import android.os.Looper;
import android.util.Log;
import java.io.File;
import java.io.ObjectInputStream;
import java.io.Serializable;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
@ -312,6 +313,13 @@ public class DownloadMission implements Serializable {
}
}
private void readObject(ObjectInputStream inputStream)
throws java.io.IOException, ClassNotFoundException
{
inputStream.defaultReadObject();
mListeners = new ArrayList<>();
}
private void deleteThisFromFile() {
new File(getMetaFilename()).delete();
}