Use classloader in the SavedState of TaskPreference
This commit is contained in:
1 parent
41ef8d2374
commit
334c248acb
1 file changed
+3
-2
@@ -26,6 +26,7 @@ import androidx.annotation.CallSuper;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.customview.view.AbsSavedState;
|
||||
import com.hippo.ehviewer.EhApplication;
|
||||
import com.hippo.ehviewer.R;
|
||||
import com.hippo.preference.DialogPreference;
|
||||
@@ -123,11 +124,11 @@ public abstract class TaskPreference extends DialogPreference {
|
||||
super.onRestoreInstanceState(myState.getSuperState());
|
||||
}
|
||||
|
||||
private static class SavedState extends BaseSavedState {
|
||||
private static class SavedState extends AbsSavedState {
|
||||
int asyncTaskId;
|
||||
|
||||
public SavedState(Parcel source) {
|
||||
super(source);
|
||||
super(source, SavedState.class.getClassLoader());
|
||||
asyncTaskId = source.readInt();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user