70 lines
2.6 KiB
Java
70 lines
2.6 KiB
Java
package com.discord.widgets.chat.input;
|
|
|
|
import android.annotation.SuppressLint;
|
|
import android.net.Uri;
|
|
import android.os.Parcel;
|
|
import androidx.annotation.CallSuper;
|
|
import c.d.b.a.a;
|
|
import com.lytefast.flexinput.model.Attachment;
|
|
import d0.z.d.m;
|
|
/* compiled from: SourcedAttachment.kt */
|
|
public final class SourcedAttachment<T> extends Attachment<T> {
|
|
private final String source;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public SourcedAttachment(long j, Uri uri, String str, T t, String str2) {
|
|
super(j, uri, str, t);
|
|
m.checkNotNullParameter(uri, "uri");
|
|
m.checkNotNullParameter(str, "displayName");
|
|
m.checkNotNullParameter(str2, "source");
|
|
this.source = str2;
|
|
}
|
|
|
|
/* JADX WARNING: Illegal instructions before constructor call */
|
|
public SourcedAttachment(Parcel parcel) {
|
|
this(r2, r0, r5, null, r7);
|
|
m.checkNotNullParameter(parcel, "parcelIn");
|
|
long readLong = parcel.readLong();
|
|
Uri uri = (Uri) parcel.readParcelable(Uri.class.getClassLoader());
|
|
if (uri == null) {
|
|
uri = Uri.EMPTY;
|
|
m.checkNotNullExpressionValue(uri, "Uri.EMPTY");
|
|
}
|
|
String readString = parcel.readString();
|
|
String str = readString != null ? readString : "";
|
|
m.checkNotNullExpressionValue(str, "parcelIn.readString() ?: \"\"");
|
|
String readString2 = parcel.readString();
|
|
String str2 = readString2 != null ? readString2 : "";
|
|
m.checkNotNullExpressionValue(str2, "parcelIn.readString() ?: \"\"");
|
|
}
|
|
|
|
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
|
|
public SourcedAttachment(Attachment<? extends T> attachment, String str) {
|
|
this(attachment.getId(), attachment.getUri(), attachment.getDisplayName(), attachment.getData(), str);
|
|
m.checkNotNullParameter(attachment, "attachment");
|
|
m.checkNotNullParameter(str, "source");
|
|
}
|
|
|
|
public final String getSource() {
|
|
return this.source;
|
|
}
|
|
|
|
@Override // java.lang.Object
|
|
public String toString() {
|
|
StringBuilder K = a.K("SourcedAttachment(uri=");
|
|
K.append(getUri());
|
|
K.append(", data=");
|
|
K.append((Object) getData());
|
|
K.append(')');
|
|
return K.toString();
|
|
}
|
|
|
|
@Override // com.lytefast.flexinput.model.Attachment, android.os.Parcelable
|
|
@SuppressLint({"MissingSuperCall"})
|
|
@CallSuper
|
|
public void writeToParcel(Parcel parcel, int i) {
|
|
m.checkNotNullParameter(parcel, "dest");
|
|
super.writeToParcel(parcel, i);
|
|
parcel.writeString(this.source);
|
|
}
|
|
}
|