public boolean isPasswordProtected() { if (!ShareType.PUBLIC_LINK.equals(shareType)) { return isPasswordProtected; } else { return shareWith.length() > 0; } }
@Override public void writeToParcel(Parcel dest, int flags) { dest.writeLong(mId); dest.writeLong(mFileSource); dest.writeLong(mItemSource); dest.writeString((mShareType == null) ? "" : mShareType.name()); dest.writeString(mShareWith); dest.writeString(mPath); dest.writeInt(mPermissions); dest.writeLong(mSharedDate); dest.writeLong(mExpirationDate); dest.writeString(mToken); dest.writeString(mSharedWithDisplayName); dest.writeInt(mIsFolder ? 1 : 0); dest.writeLong(mUserId); dest.writeLong(mRemoteId); dest.writeString(mShareLink); dest.writeString(mName); }
public void readFromParcel(Parcel source) { mId = source.readLong(); mFileSource = source.readLong(); mItemSource = source.readLong(); try { mShareType = ShareType.valueOf(source.readString()); } catch (IllegalArgumentException x) { mShareType = ShareType.NO_SHARED; } mShareWith = source.readString(); mPath = source.readString(); mPermissions = source.readInt(); mSharedDate = source.readLong(); mExpirationDate = source.readLong(); mToken = source.readString(); mSharedWithDisplayName = source.readString(); mIsFolder = source.readInt() == 0; mUserId = source.readLong(); mRemoteId = source.readLong(); mShareLink = source.readString(); mName = source.readString(); }
FormBody.Builder formBodyBuilder = new FormBody.Builder() .add(PARAM_PATH, mRemoteFilePath) .add(PARAM_SHARE_TYPE, Integer.toString(mShareType.getValue())) .add(PARAM_SHARE_WITH, mShareWith);
share.setShareType(ShareType.fromValue(value));
post.addParameter(PARAM_SHARE_TYPE, Integer.toString(mShareType.getValue())); post.addParameter(PARAM_SHARE_WITH, mShareWith); if (mPublicUpload) {
share.setShareType(ShareType.fromValue(value));
public boolean isPasswordProtected() { return ShareType.PUBLIC_LINK.equals(mShareType) && mShareWith.length() > 0; }
@Override public void writeToParcel(Parcel dest, int flags) { dest.writeLong(id); dest.writeLong(fileSource); dest.writeLong(itemSource); dest.writeString((shareType == null) ? "" : shareType.name()); dest.writeString(shareWith); dest.writeString(path); dest.writeInt(permissions); dest.writeLong(sharedDate); dest.writeLong(expirationDate); dest.writeString(token); dest.writeString(sharedWithDisplayName); dest.writeInt(isFolder ? 1 : 0); dest.writeLong(userId); dest.writeLong(remoteId); dest.writeString(shareLink); dest.writeInt(isPasswordProtected ? 1 : 0); dest.writeInt(hideFileDownload ? 1 : 0); } }
public void readFromParcel(Parcel source) { id = source.readLong(); fileSource = source.readLong(); itemSource = source.readLong(); try { shareType = ShareType.valueOf(source.readString()); } catch (IllegalArgumentException x) { shareType = ShareType.NO_SHARED; } shareWith = source.readString(); path = source.readString(); permissions = source.readInt(); sharedDate = source.readLong(); expirationDate = source.readLong(); token = source.readString(); sharedWithDisplayName = source.readString(); isFolder = source.readInt() == 0; userId = source.readLong(); remoteId = source.readLong(); shareLink = source.readString(); isPasswordProtected = source.readInt() == 1; hideFileDownload = source.readInt() == 1; }