95 lines
3.0 KiB
Java
95 lines
3.0 KiB
Java
package com.facebook.share.model;
|
|
|
|
import android.os.Parcel;
|
|
import android.os.Parcelable;
|
|
import com.facebook.share.model.ShareContent;
|
|
import com.facebook.share.model.SharePhoto;
|
|
import java.util.ArrayList;
|
|
import java.util.Collections;
|
|
import java.util.Iterator;
|
|
import java.util.List;
|
|
|
|
/* loaded from: classes.dex */
|
|
public final class SharePhotoContent extends ShareContent<SharePhotoContent, Builder> {
|
|
public static final Parcelable.Creator<SharePhotoContent> CREATOR = new Parcelable.Creator<SharePhotoContent>() { // from class: com.facebook.share.model.SharePhotoContent.1
|
|
/* JADX WARN: Can't rename method to resolve collision */
|
|
@Override // android.os.Parcelable.Creator
|
|
public SharePhotoContent createFromParcel(Parcel parcel) {
|
|
return new SharePhotoContent(parcel);
|
|
}
|
|
|
|
/* JADX WARN: Can't rename method to resolve collision */
|
|
@Override // android.os.Parcelable.Creator
|
|
public SharePhotoContent[] newArray(int i) {
|
|
return new SharePhotoContent[i];
|
|
}
|
|
};
|
|
private final List<SharePhoto> photos;
|
|
|
|
public static class Builder extends ShareContent.Builder<SharePhotoContent, Builder> {
|
|
private final List<SharePhoto> f = new ArrayList();
|
|
|
|
public Builder b(List<SharePhoto> list) {
|
|
if (list != null) {
|
|
Iterator<SharePhoto> it = list.iterator();
|
|
while (it.hasNext()) {
|
|
a(it.next());
|
|
}
|
|
}
|
|
return this;
|
|
}
|
|
|
|
public Builder c(List<SharePhoto> list) {
|
|
this.f.clear();
|
|
b(list);
|
|
return this;
|
|
}
|
|
|
|
public Builder a(SharePhoto sharePhoto) {
|
|
if (sharePhoto != null) {
|
|
this.f.add(new SharePhoto.Builder().a(sharePhoto).a());
|
|
}
|
|
return this;
|
|
}
|
|
|
|
public SharePhotoContent a() {
|
|
return new SharePhotoContent(this);
|
|
}
|
|
|
|
public Builder a(SharePhotoContent sharePhotoContent) {
|
|
if (sharePhotoContent == null) {
|
|
return this;
|
|
}
|
|
super.a((Builder) sharePhotoContent);
|
|
Builder builder = this;
|
|
builder.b(sharePhotoContent.getPhotos());
|
|
return builder;
|
|
}
|
|
}
|
|
|
|
@Override // com.facebook.share.model.ShareContent, android.os.Parcelable
|
|
public int describeContents() {
|
|
return 0;
|
|
}
|
|
|
|
public List<SharePhoto> getPhotos() {
|
|
return this.photos;
|
|
}
|
|
|
|
@Override // com.facebook.share.model.ShareContent, android.os.Parcelable
|
|
public void writeToParcel(Parcel parcel, int i) {
|
|
super.writeToParcel(parcel, i);
|
|
SharePhoto.Builder.a(parcel, i, this.photos);
|
|
}
|
|
|
|
private SharePhotoContent(Builder builder) {
|
|
super(builder);
|
|
this.photos = Collections.unmodifiableList(builder.f);
|
|
}
|
|
|
|
SharePhotoContent(Parcel parcel) {
|
|
super(parcel);
|
|
this.photos = Collections.unmodifiableList(SharePhoto.Builder.c(parcel));
|
|
}
|
|
}
|