diff --git a/app/src/main/java/foundation/e/drive/operations/RemoveFileOperation.java b/app/src/main/java/foundation/e/drive/operations/RemoveFileOperation.java index e70841c948155fbb2443fe37abfb6aa8de43c1af..d1f4570b13065ac99d5c495109667c6caff9e005 100644 --- a/app/src/main/java/foundation/e/drive/operations/RemoveFileOperation.java +++ b/app/src/main/java/foundation/e/drive/operations/RemoveFileOperation.java @@ -8,10 +8,6 @@ package foundation.e.drive.operations; -import android.os.Parcel; -import android.os.Parcelable; - -import com.owncloud.android.lib.common.operations.RemoteOperation; import com.owncloud.android.lib.resources.files.RemoveFileRemoteOperation; import foundation.e.drive.models.SyncedFileState; @@ -21,44 +17,16 @@ import foundation.e.drive.models.SyncedFileState; * Created by Vincent on 19/06/2018. * Class to be able to wrap concerned SyncedFileState in operation, so it can be retrieve at the end */ -public class RemoveFileOperation extends RemoveFileRemoteOperation implements Parcelable { +public class RemoveFileOperation extends RemoveFileRemoteOperation { - private SyncedFileState mSyncedFileState; + private SyncedFileState syncedFileState; public RemoveFileOperation(SyncedFileState syncedFileState) { - super( syncedFileState.getRemotePath() ); - this.mSyncedFileState = syncedFileState; - } - - protected RemoveFileOperation(Parcel in) { - super(in.readString()); - mSyncedFileState = in.readParcelable(SyncedFileState.class.getClassLoader()); - } - - @Override - public void writeToParcel(Parcel dest, int flags) { - dest.writeString(mSyncedFileState.getRemotePath()); - dest.writeParcelable(mSyncedFileState, flags); + super(syncedFileState.getRemotePath()); + this.syncedFileState = syncedFileState; } - @Override - public int describeContents() { - return 0; - } - - public static final Creator CREATOR = new Creator() { - @Override - public RemoveFileOperation createFromParcel(Parcel in) { - return new RemoveFileOperation(in); - } - - @Override - public RemoveFileOperation[] newArray(int size) { - return new RemoveFileOperation[size]; - } - }; - public SyncedFileState getSyncedFileState() { - return mSyncedFileState; + return syncedFileState; } }