From dd595e5da7b0f38d5f5c07646767441cd9241095 Mon Sep 17 00:00:00 2001 From: vincent Bourgmayer Date: Wed, 23 Mar 2022 09:57:20 +0100 Subject: [PATCH 1/2] remove implementation of Parcelable --- .../drive/operations/RemoveFileOperation.java | 34 +------------------ 1 file changed, 1 insertion(+), 33 deletions(-) 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 e70841c9..07135799 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,7 +17,7 @@ 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; @@ -30,34 +26,6 @@ public class RemoveFileOperation extends RemoveFileRemoteOperation implements Pa 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); - } - - @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; } -- GitLab From 7ac83361d092d5f55035d298c7c3fecc78dc0e47 Mon Sep 17 00:00:00 2001 From: vincent Bourgmayer Date: Wed, 23 Mar 2022 10:01:18 +0100 Subject: [PATCH 2/2] change variable name to fit with single convention --- .../e/drive/operations/RemoveFileOperation.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 07135799..d1f4570b 100644 --- a/app/src/main/java/foundation/e/drive/operations/RemoveFileOperation.java +++ b/app/src/main/java/foundation/e/drive/operations/RemoveFileOperation.java @@ -19,14 +19,14 @@ import foundation.e.drive.models.SyncedFileState; */ public class RemoveFileOperation extends RemoveFileRemoteOperation { - private SyncedFileState mSyncedFileState; + private SyncedFileState syncedFileState; public RemoveFileOperation(SyncedFileState syncedFileState) { - super( syncedFileState.getRemotePath() ); - this.mSyncedFileState = syncedFileState; + super(syncedFileState.getRemotePath()); + this.syncedFileState = syncedFileState; } public SyncedFileState getSyncedFileState() { - return mSyncedFileState; + return syncedFileState; } } -- GitLab