|
@@ -92,6 +92,8 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
|
|
|
|
|
|
private boolean mShareWithSharee;
|
|
|
|
|
|
+ private boolean mIsFavorite;
|
|
|
+
|
|
|
/**
|
|
|
* URI to the local path of the file contents, if stored in the device; cached after first call
|
|
|
* to {@link #getStorageUri()}
|
|
@@ -151,7 +153,7 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
|
|
|
mIsDownloading = source.readInt() == 1;
|
|
|
mEtagInConflict = source.readString();
|
|
|
mShareWithSharee = source.readInt() == 1;
|
|
|
-
|
|
|
+ mIsFavorite = source.readInt() == 1;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -178,6 +180,15 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
|
|
|
dest.writeInt(mIsDownloading ? 1 : 0);
|
|
|
dest.writeString(mEtagInConflict);
|
|
|
dest.writeInt(mShareWithSharee ? 1 : 0);
|
|
|
+ dest.writeInt(mIsFavorite ? 1 : 0);
|
|
|
+ }
|
|
|
+
|
|
|
+ public boolean getIsFavorite() {
|
|
|
+ return mIsFavorite;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setFavorite(boolean mIsFavorite) {
|
|
|
+ this.mIsFavorite = mIsFavorite;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -423,6 +434,7 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
|
|
|
mIsDownloading = false;
|
|
|
mEtagInConflict = null;
|
|
|
mShareWithSharee = false;
|
|
|
+ mIsFavorite = false;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -570,10 +582,10 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
|
|
|
@Override
|
|
|
public String toString() {
|
|
|
String asString = "[id=%s, name=%s, mime=%s, downloaded=%s, local=%s, remote=%s, " +
|
|
|
- "parentId=%s, favorite=%s etag=%s]";
|
|
|
+ "parentId=%s, availableOffline=%s etag=%s favourite=%s]";
|
|
|
asString = String.format(asString, mId, getFileName(), mMimeType, isDown(),
|
|
|
mLocalPath, mRemotePath, mParentId, mAvailableOffline,
|
|
|
- mEtag);
|
|
|
+ mEtag, mIsFavorite);
|
|
|
return asString;
|
|
|
}
|
|
|
|