Loading src/com/owncloud/android/lib/resources/shares/OCShare.java +13 −2 Original line number Diff line number Diff line Loading @@ -99,6 +99,7 @@ public class OCShare implements Parcelable, Serializable { private long mUserId; private long mRemoteId; private String mShareLink; private boolean mIsPasswordProtected; public OCShare() { super(); Loading Loading @@ -133,6 +134,7 @@ public class OCShare implements Parcelable, Serializable { mUserId = -1; mRemoteId = -1; mShareLink = ""; mIsPasswordProtected = false; } /// Getters and Setters Loading Loading @@ -257,8 +259,16 @@ public class OCShare implements Parcelable, Serializable { this.mShareLink = (shareLink != null) ? shareLink : ""; } public void setIsPasswordProtected(boolean isPasswordProtected) { this.mIsPasswordProtected = isPasswordProtected; } public boolean isPasswordProtected() { return ShareType.PUBLIC_LINK.equals(mShareType) && mShareWith.length() > 0; if (!ShareType.PUBLIC_LINK.equals(mShareType)) { return mIsPasswordProtected; } else { return mShareWith.length() > 0; } } /** Loading Loading @@ -306,6 +316,7 @@ public class OCShare implements Parcelable, Serializable { mUserId = source.readLong(); mRemoteId = source.readLong(); mShareLink = source.readString(); mIsPasswordProtected = source.readInt() == 0; } Loading @@ -332,6 +343,6 @@ public class OCShare implements Parcelable, Serializable { dest.writeLong(mUserId); dest.writeLong(mRemoteId); dest.writeString(mShareLink); dest.writeInt(mIsPasswordProtected ? 1 : 0); } } Loading
src/com/owncloud/android/lib/resources/shares/OCShare.java +13 −2 Original line number Diff line number Diff line Loading @@ -99,6 +99,7 @@ public class OCShare implements Parcelable, Serializable { private long mUserId; private long mRemoteId; private String mShareLink; private boolean mIsPasswordProtected; public OCShare() { super(); Loading Loading @@ -133,6 +134,7 @@ public class OCShare implements Parcelable, Serializable { mUserId = -1; mRemoteId = -1; mShareLink = ""; mIsPasswordProtected = false; } /// Getters and Setters Loading Loading @@ -257,8 +259,16 @@ public class OCShare implements Parcelable, Serializable { this.mShareLink = (shareLink != null) ? shareLink : ""; } public void setIsPasswordProtected(boolean isPasswordProtected) { this.mIsPasswordProtected = isPasswordProtected; } public boolean isPasswordProtected() { return ShareType.PUBLIC_LINK.equals(mShareType) && mShareWith.length() > 0; if (!ShareType.PUBLIC_LINK.equals(mShareType)) { return mIsPasswordProtected; } else { return mShareWith.length() > 0; } } /** Loading Loading @@ -306,6 +316,7 @@ public class OCShare implements Parcelable, Serializable { mUserId = source.readLong(); mRemoteId = source.readLong(); mShareLink = source.readString(); mIsPasswordProtected = source.readInt() == 0; } Loading @@ -332,6 +343,6 @@ public class OCShare implements Parcelable, Serializable { dest.writeLong(mUserId); dest.writeLong(mRemoteId); dest.writeString(mShareLink); dest.writeInt(mIsPasswordProtected ? 1 : 0); } }