apkfuckery/com.discord/smali/androidx/versionedparcelable/VersionedParcelStream.smali
2019-05-03 20:53:54 +02:00

1398 lines
37 KiB
Smali

.class Landroidx/versionedparcelable/VersionedParcelStream;
.super Landroidx/versionedparcelable/VersionedParcel;
.source "VersionedParcelStream.java"
# annotations
.annotation build Landroidx/annotation/RestrictTo;
value = {
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY:Landroidx/annotation/RestrictTo$Scope;
}
.end annotation
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Landroidx/versionedparcelable/VersionedParcelStream$InputBuffer;,
Landroidx/versionedparcelable/VersionedParcelStream$FieldBuffer;
}
.end annotation
# static fields
.field private static final TYPE_BOOLEAN:I = 0x5
.field private static final TYPE_BOOLEAN_ARRAY:I = 0x6
.field private static final TYPE_DOUBLE:I = 0x7
.field private static final TYPE_DOUBLE_ARRAY:I = 0x8
.field private static final TYPE_FLOAT:I = 0xd
.field private static final TYPE_FLOAT_ARRAY:I = 0xe
.field private static final TYPE_INT:I = 0x9
.field private static final TYPE_INT_ARRAY:I = 0xa
.field private static final TYPE_LONG:I = 0xb
.field private static final TYPE_LONG_ARRAY:I = 0xc
.field private static final TYPE_NULL:I = 0x0
.field private static final TYPE_STRING:I = 0x3
.field private static final TYPE_STRING_ARRAY:I = 0x4
.field private static final TYPE_SUB_BUNDLE:I = 0x1
.field private static final TYPE_SUB_PERSISTABLE_BUNDLE:I = 0x2
.field private static final UTF_16:Ljava/nio/charset/Charset;
# instance fields
.field private final mCachedFields:Landroid/util/SparseArray;
.annotation system Ldalvik/annotation/Signature;
value = {
"Landroid/util/SparseArray<",
"Landroidx/versionedparcelable/VersionedParcelStream$InputBuffer;",
">;"
}
.end annotation
.end field
.field private mCurrentInput:Ljava/io/DataInputStream;
.field private mCurrentOutput:Ljava/io/DataOutputStream;
.field private mFieldBuffer:Landroidx/versionedparcelable/VersionedParcelStream$FieldBuffer;
.field private mIgnoreParcelables:Z
.field private final mMasterInput:Ljava/io/DataInputStream;
.field private final mMasterOutput:Ljava/io/DataOutputStream;
# direct methods
.method static constructor <clinit>()V
.locals 1
const-string v0, "UTF-16"
invoke-static {v0}, Ljava/nio/charset/Charset;->forName(Ljava/lang/String;)Ljava/nio/charset/Charset;
move-result-object v0
sput-object v0, Landroidx/versionedparcelable/VersionedParcelStream;->UTF_16:Ljava/nio/charset/Charset;
return-void
.end method
.method public constructor <init>(Ljava/io/InputStream;Ljava/io/OutputStream;)V
.locals 2
invoke-direct {p0}, Landroidx/versionedparcelable/VersionedParcel;-><init>()V
new-instance v0, Landroid/util/SparseArray;
invoke-direct {v0}, Landroid/util/SparseArray;-><init>()V
iput-object v0, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mCachedFields:Landroid/util/SparseArray;
const/4 v0, 0x0
if-eqz p1, :cond_0
new-instance v1, Ljava/io/DataInputStream;
invoke-direct {v1, p1}, Ljava/io/DataInputStream;-><init>(Ljava/io/InputStream;)V
goto :goto_0
:cond_0
move-object v1, v0
:goto_0
iput-object v1, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mMasterInput:Ljava/io/DataInputStream;
if-eqz p2, :cond_1
new-instance v0, Ljava/io/DataOutputStream;
invoke-direct {v0, p2}, Ljava/io/DataOutputStream;-><init>(Ljava/io/OutputStream;)V
:cond_1
iput-object v0, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mMasterOutput:Ljava/io/DataOutputStream;
iget-object p1, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mMasterInput:Ljava/io/DataInputStream;
iput-object p1, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mCurrentInput:Ljava/io/DataInputStream;
iget-object p1, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mMasterOutput:Ljava/io/DataOutputStream;
iput-object p1, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mCurrentOutput:Ljava/io/DataOutputStream;
return-void
.end method
.method private readObject(ILjava/lang/String;Landroid/os/Bundle;)V
.locals 2
packed-switch p1, :pswitch_data_0
new-instance p2, Ljava/lang/RuntimeException;
invoke-static {p1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object p1
const-string p3, "Unknown type "
invoke-virtual {p3, p1}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
move-result-object p1
invoke-direct {p2, p1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V
throw p2
:pswitch_0
invoke-virtual {p0}, Landroidx/versionedparcelable/VersionedParcelStream;->readFloatArray()[F
move-result-object p1
invoke-virtual {p3, p2, p1}, Landroid/os/Bundle;->putFloatArray(Ljava/lang/String;[F)V
return-void
:pswitch_1
invoke-virtual {p0}, Landroidx/versionedparcelable/VersionedParcelStream;->readFloat()F
move-result p1
invoke-virtual {p3, p2, p1}, Landroid/os/Bundle;->putFloat(Ljava/lang/String;F)V
return-void
:pswitch_2
invoke-virtual {p0}, Landroidx/versionedparcelable/VersionedParcelStream;->readLongArray()[J
move-result-object p1
invoke-virtual {p3, p2, p1}, Landroid/os/Bundle;->putLongArray(Ljava/lang/String;[J)V
return-void
:pswitch_3
invoke-virtual {p0}, Landroidx/versionedparcelable/VersionedParcelStream;->readLong()J
move-result-wide v0
invoke-virtual {p3, p2, v0, v1}, Landroid/os/Bundle;->putLong(Ljava/lang/String;J)V
return-void
:pswitch_4
invoke-virtual {p0}, Landroidx/versionedparcelable/VersionedParcelStream;->readIntArray()[I
move-result-object p1
invoke-virtual {p3, p2, p1}, Landroid/os/Bundle;->putIntArray(Ljava/lang/String;[I)V
return-void
:pswitch_5
invoke-virtual {p0}, Landroidx/versionedparcelable/VersionedParcelStream;->readInt()I
move-result p1
invoke-virtual {p3, p2, p1}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V
return-void
:pswitch_6
invoke-virtual {p0}, Landroidx/versionedparcelable/VersionedParcelStream;->readDoubleArray()[D
move-result-object p1
invoke-virtual {p3, p2, p1}, Landroid/os/Bundle;->putDoubleArray(Ljava/lang/String;[D)V
return-void
:pswitch_7
invoke-virtual {p0}, Landroidx/versionedparcelable/VersionedParcelStream;->readDouble()D
move-result-wide v0
invoke-virtual {p3, p2, v0, v1}, Landroid/os/Bundle;->putDouble(Ljava/lang/String;D)V
return-void
:pswitch_8
invoke-virtual {p0}, Landroidx/versionedparcelable/VersionedParcelStream;->readBooleanArray()[Z
move-result-object p1
invoke-virtual {p3, p2, p1}, Landroid/os/Bundle;->putBooleanArray(Ljava/lang/String;[Z)V
return-void
:pswitch_9
invoke-virtual {p0}, Landroidx/versionedparcelable/VersionedParcelStream;->readBoolean()Z
move-result p1
invoke-virtual {p3, p2, p1}, Landroid/os/Bundle;->putBoolean(Ljava/lang/String;Z)V
return-void
:pswitch_a
const/4 p1, 0x0
new-array p1, p1, [Ljava/lang/String;
invoke-virtual {p0, p1}, Landroidx/versionedparcelable/VersionedParcelStream;->readArray([Ljava/lang/Object;)[Ljava/lang/Object;
move-result-object p1
check-cast p1, [Ljava/lang/String;
invoke-virtual {p3, p2, p1}, Landroid/os/Bundle;->putStringArray(Ljava/lang/String;[Ljava/lang/String;)V
return-void
:pswitch_b
invoke-virtual {p0}, Landroidx/versionedparcelable/VersionedParcelStream;->readString()Ljava/lang/String;
move-result-object p1
invoke-virtual {p3, p2, p1}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
return-void
:pswitch_c
invoke-virtual {p0}, Landroidx/versionedparcelable/VersionedParcelStream;->readBundle()Landroid/os/Bundle;
move-result-object p1
invoke-virtual {p3, p2, p1}, Landroid/os/Bundle;->putBundle(Ljava/lang/String;Landroid/os/Bundle;)V
return-void
:pswitch_d
invoke-virtual {p0}, Landroidx/versionedparcelable/VersionedParcelStream;->readBundle()Landroid/os/Bundle;
move-result-object p1
invoke-virtual {p3, p2, p1}, Landroid/os/Bundle;->putBundle(Ljava/lang/String;Landroid/os/Bundle;)V
return-void
:pswitch_e
const/4 p1, 0x0
invoke-virtual {p3, p2, p1}, Landroid/os/Bundle;->putParcelable(Ljava/lang/String;Landroid/os/Parcelable;)V
return-void
nop
:pswitch_data_0
.packed-switch 0x0
:pswitch_e
:pswitch_d
:pswitch_c
:pswitch_b
:pswitch_a
:pswitch_9
:pswitch_8
:pswitch_7
:pswitch_6
:pswitch_5
:pswitch_4
:pswitch_3
:pswitch_2
:pswitch_1
:pswitch_0
.end packed-switch
.end method
.method private writeObject(Ljava/lang/Object;)V
.locals 3
if-nez p1, :cond_0
const/4 p1, 0x0
invoke-virtual {p0, p1}, Landroidx/versionedparcelable/VersionedParcelStream;->writeInt(I)V
return-void
:cond_0
instance-of v0, p1, Landroid/os/Bundle;
if-eqz v0, :cond_1
const/4 v0, 0x1
invoke-virtual {p0, v0}, Landroidx/versionedparcelable/VersionedParcelStream;->writeInt(I)V
check-cast p1, Landroid/os/Bundle;
invoke-virtual {p0, p1}, Landroidx/versionedparcelable/VersionedParcelStream;->writeBundle(Landroid/os/Bundle;)V
return-void
:cond_1
instance-of v0, p1, Ljava/lang/String;
if-eqz v0, :cond_2
const/4 v0, 0x3
invoke-virtual {p0, v0}, Landroidx/versionedparcelable/VersionedParcelStream;->writeInt(I)V
check-cast p1, Ljava/lang/String;
invoke-virtual {p0, p1}, Landroidx/versionedparcelable/VersionedParcelStream;->writeString(Ljava/lang/String;)V
return-void
:cond_2
instance-of v0, p1, [Ljava/lang/String;
if-eqz v0, :cond_3
const/4 v0, 0x4
invoke-virtual {p0, v0}, Landroidx/versionedparcelable/VersionedParcelStream;->writeInt(I)V
check-cast p1, [Ljava/lang/String;
check-cast p1, [Ljava/lang/String;
invoke-virtual {p0, p1}, Landroidx/versionedparcelable/VersionedParcelStream;->writeArray([Ljava/lang/Object;)V
return-void
:cond_3
instance-of v0, p1, Ljava/lang/Boolean;
if-eqz v0, :cond_4
const/4 v0, 0x5
invoke-virtual {p0, v0}, Landroidx/versionedparcelable/VersionedParcelStream;->writeInt(I)V
check-cast p1, Ljava/lang/Boolean;
invoke-virtual {p1}, Ljava/lang/Boolean;->booleanValue()Z
move-result p1
invoke-virtual {p0, p1}, Landroidx/versionedparcelable/VersionedParcelStream;->writeBoolean(Z)V
return-void
:cond_4
instance-of v0, p1, [Z
if-eqz v0, :cond_5
const/4 v0, 0x6
invoke-virtual {p0, v0}, Landroidx/versionedparcelable/VersionedParcelStream;->writeInt(I)V
check-cast p1, [Z
check-cast p1, [Z
invoke-virtual {p0, p1}, Landroidx/versionedparcelable/VersionedParcelStream;->writeBooleanArray([Z)V
return-void
:cond_5
instance-of v0, p1, Ljava/lang/Double;
if-eqz v0, :cond_6
const/4 v0, 0x7
invoke-virtual {p0, v0}, Landroidx/versionedparcelable/VersionedParcelStream;->writeInt(I)V
check-cast p1, Ljava/lang/Double;
invoke-virtual {p1}, Ljava/lang/Double;->doubleValue()D
move-result-wide v0
invoke-virtual {p0, v0, v1}, Landroidx/versionedparcelable/VersionedParcelStream;->writeDouble(D)V
return-void
:cond_6
instance-of v0, p1, [D
if-eqz v0, :cond_7
const/16 v0, 0x8
invoke-virtual {p0, v0}, Landroidx/versionedparcelable/VersionedParcelStream;->writeInt(I)V
check-cast p1, [D
check-cast p1, [D
invoke-virtual {p0, p1}, Landroidx/versionedparcelable/VersionedParcelStream;->writeDoubleArray([D)V
return-void
:cond_7
instance-of v0, p1, Ljava/lang/Integer;
if-eqz v0, :cond_8
const/16 v0, 0x9
invoke-virtual {p0, v0}, Landroidx/versionedparcelable/VersionedParcelStream;->writeInt(I)V
check-cast p1, Ljava/lang/Integer;
invoke-virtual {p1}, Ljava/lang/Integer;->intValue()I
move-result p1
invoke-virtual {p0, p1}, Landroidx/versionedparcelable/VersionedParcelStream;->writeInt(I)V
return-void
:cond_8
instance-of v0, p1, [I
if-eqz v0, :cond_9
const/16 v0, 0xa
invoke-virtual {p0, v0}, Landroidx/versionedparcelable/VersionedParcelStream;->writeInt(I)V
check-cast p1, [I
check-cast p1, [I
invoke-virtual {p0, p1}, Landroidx/versionedparcelable/VersionedParcelStream;->writeIntArray([I)V
return-void
:cond_9
instance-of v0, p1, Ljava/lang/Long;
if-eqz v0, :cond_a
const/16 v0, 0xb
invoke-virtual {p0, v0}, Landroidx/versionedparcelable/VersionedParcelStream;->writeInt(I)V
check-cast p1, Ljava/lang/Long;
invoke-virtual {p1}, Ljava/lang/Long;->longValue()J
move-result-wide v0
invoke-virtual {p0, v0, v1}, Landroidx/versionedparcelable/VersionedParcelStream;->writeLong(J)V
return-void
:cond_a
instance-of v0, p1, [J
if-eqz v0, :cond_b
const/16 v0, 0xc
invoke-virtual {p0, v0}, Landroidx/versionedparcelable/VersionedParcelStream;->writeInt(I)V
check-cast p1, [J
check-cast p1, [J
invoke-virtual {p0, p1}, Landroidx/versionedparcelable/VersionedParcelStream;->writeLongArray([J)V
return-void
:cond_b
instance-of v0, p1, Ljava/lang/Float;
if-eqz v0, :cond_c
const/16 v0, 0xd
invoke-virtual {p0, v0}, Landroidx/versionedparcelable/VersionedParcelStream;->writeInt(I)V
check-cast p1, Ljava/lang/Float;
invoke-virtual {p1}, Ljava/lang/Float;->floatValue()F
move-result p1
invoke-virtual {p0, p1}, Landroidx/versionedparcelable/VersionedParcelStream;->writeFloat(F)V
return-void
:cond_c
instance-of v0, p1, [F
if-eqz v0, :cond_d
const/16 v0, 0xe
invoke-virtual {p0, v0}, Landroidx/versionedparcelable/VersionedParcelStream;->writeInt(I)V
check-cast p1, [F
check-cast p1, [F
invoke-virtual {p0, p1}, Landroidx/versionedparcelable/VersionedParcelStream;->writeFloatArray([F)V
return-void
:cond_d
new-instance v0, Ljava/lang/IllegalArgumentException;
new-instance v1, Ljava/lang/StringBuilder;
const-string v2, "Unsupported type "
invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object p1
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {v0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v0
.end method
# virtual methods
.method public closeField()V
.locals 2
iget-object v0, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mFieldBuffer:Landroidx/versionedparcelable/VersionedParcelStream$FieldBuffer;
if-eqz v0, :cond_1
:try_start_0
iget-object v0, v0, Landroidx/versionedparcelable/VersionedParcelStream$FieldBuffer;->mOutput:Ljava/io/ByteArrayOutputStream;
invoke-virtual {v0}, Ljava/io/ByteArrayOutputStream;->size()I
move-result v0
if-eqz v0, :cond_0
iget-object v0, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mFieldBuffer:Landroidx/versionedparcelable/VersionedParcelStream$FieldBuffer;
invoke-virtual {v0}, Landroidx/versionedparcelable/VersionedParcelStream$FieldBuffer;->flushField()V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
:cond_0
const/4 v0, 0x0
iput-object v0, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mFieldBuffer:Landroidx/versionedparcelable/VersionedParcelStream$FieldBuffer;
goto :goto_0
:catch_0
move-exception v0
new-instance v1, Landroidx/versionedparcelable/VersionedParcel$ParcelException;
invoke-direct {v1, v0}, Landroidx/versionedparcelable/VersionedParcel$ParcelException;-><init>(Ljava/lang/Throwable;)V
throw v1
:cond_1
:goto_0
return-void
.end method
.method protected createSubParcel()Landroidx/versionedparcelable/VersionedParcel;
.locals 3
new-instance v0, Landroidx/versionedparcelable/VersionedParcelStream;
iget-object v1, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mCurrentInput:Ljava/io/DataInputStream;
iget-object v2, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mCurrentOutput:Ljava/io/DataOutputStream;
invoke-direct {v0, v1, v2}, Landroidx/versionedparcelable/VersionedParcelStream;-><init>(Ljava/io/InputStream;Ljava/io/OutputStream;)V
return-object v0
.end method
.method public isStream()Z
.locals 1
const/4 v0, 0x1
return v0
.end method
.method public readBoolean()Z
.locals 2
:try_start_0
iget-object v0, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mCurrentInput:Ljava/io/DataInputStream;
invoke-virtual {v0}, Ljava/io/DataInputStream;->readBoolean()Z
move-result v0
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return v0
:catch_0
move-exception v0
new-instance v1, Landroidx/versionedparcelable/VersionedParcel$ParcelException;
invoke-direct {v1, v0}, Landroidx/versionedparcelable/VersionedParcel$ParcelException;-><init>(Ljava/lang/Throwable;)V
throw v1
.end method
.method public readBundle()Landroid/os/Bundle;
.locals 5
invoke-virtual {p0}, Landroidx/versionedparcelable/VersionedParcelStream;->readInt()I
move-result v0
if-gez v0, :cond_0
const/4 v0, 0x0
return-object v0
:cond_0
new-instance v1, Landroid/os/Bundle;
invoke-direct {v1}, Landroid/os/Bundle;-><init>()V
const/4 v2, 0x0
:goto_0
if-ge v2, v0, :cond_1
invoke-virtual {p0}, Landroidx/versionedparcelable/VersionedParcelStream;->readString()Ljava/lang/String;
move-result-object v3
invoke-virtual {p0}, Landroidx/versionedparcelable/VersionedParcelStream;->readInt()I
move-result v4
invoke-direct {p0, v4, v3, v1}, Landroidx/versionedparcelable/VersionedParcelStream;->readObject(ILjava/lang/String;Landroid/os/Bundle;)V
add-int/lit8 v2, v2, 0x1
goto :goto_0
:cond_1
return-object v1
.end method
.method public readByteArray()[B
.locals 2
:try_start_0
iget-object v0, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mCurrentInput:Ljava/io/DataInputStream;
invoke-virtual {v0}, Ljava/io/DataInputStream;->readInt()I
move-result v0
if-lez v0, :cond_0
new-array v0, v0, [B
iget-object v1, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mCurrentInput:Ljava/io/DataInputStream;
invoke-virtual {v1, v0}, Ljava/io/DataInputStream;->readFully([B)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-object v0
:cond_0
const/4 v0, 0x0
return-object v0
:catch_0
move-exception v0
new-instance v1, Landroidx/versionedparcelable/VersionedParcel$ParcelException;
invoke-direct {v1, v0}, Landroidx/versionedparcelable/VersionedParcel$ParcelException;-><init>(Ljava/lang/Throwable;)V
throw v1
.end method
.method public readDouble()D
.locals 2
:try_start_0
iget-object v0, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mCurrentInput:Ljava/io/DataInputStream;
invoke-virtual {v0}, Ljava/io/DataInputStream;->readDouble()D
move-result-wide v0
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-wide v0
:catch_0
move-exception v0
new-instance v1, Landroidx/versionedparcelable/VersionedParcel$ParcelException;
invoke-direct {v1, v0}, Landroidx/versionedparcelable/VersionedParcel$ParcelException;-><init>(Ljava/lang/Throwable;)V
throw v1
.end method
.method public readField(I)Z
.locals 5
iget-object v0, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mCachedFields:Landroid/util/SparseArray;
invoke-virtual {v0, p1}, Landroid/util/SparseArray;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroidx/versionedparcelable/VersionedParcelStream$InputBuffer;
const/4 v1, 0x1
if-eqz v0, :cond_0
iget-object v2, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mCachedFields:Landroid/util/SparseArray;
invoke-virtual {v2, p1}, Landroid/util/SparseArray;->remove(I)V
iget-object p1, v0, Landroidx/versionedparcelable/VersionedParcelStream$InputBuffer;->mInputStream:Ljava/io/DataInputStream;
iput-object p1, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mCurrentInput:Ljava/io/DataInputStream;
return v1
:cond_0
:goto_0
:try_start_0
iget-object v0, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mMasterInput:Ljava/io/DataInputStream;
invoke-virtual {v0}, Ljava/io/DataInputStream;->readInt()I
move-result v0
const v2, 0xffff
and-int v3, v0, v2
if-ne v3, v2, :cond_1
iget-object v3, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mMasterInput:Ljava/io/DataInputStream;
invoke-virtual {v3}, Ljava/io/DataInputStream;->readInt()I
move-result v3
:cond_1
new-instance v4, Landroidx/versionedparcelable/VersionedParcelStream$InputBuffer;
shr-int/lit8 v0, v0, 0x10
and-int/2addr v0, v2
iget-object v2, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mMasterInput:Ljava/io/DataInputStream;
invoke-direct {v4, v0, v3, v2}, Landroidx/versionedparcelable/VersionedParcelStream$InputBuffer;-><init>(IILjava/io/DataInputStream;)V
iget v0, v4, Landroidx/versionedparcelable/VersionedParcelStream$InputBuffer;->mFieldId:I
if-ne v0, p1, :cond_2
iget-object p1, v4, Landroidx/versionedparcelable/VersionedParcelStream$InputBuffer;->mInputStream:Ljava/io/DataInputStream;
iput-object p1, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mCurrentInput:Ljava/io/DataInputStream;
return v1
:cond_2
iget-object v0, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mCachedFields:Landroid/util/SparseArray;
iget v2, v4, Landroidx/versionedparcelable/VersionedParcelStream$InputBuffer;->mFieldId:I
invoke-virtual {v0, v2, v4}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
:catch_0
const/4 p1, 0x0
return p1
.end method
.method public readFloat()F
.locals 2
:try_start_0
iget-object v0, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mCurrentInput:Ljava/io/DataInputStream;
invoke-virtual {v0}, Ljava/io/DataInputStream;->readFloat()F
move-result v0
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return v0
:catch_0
move-exception v0
new-instance v1, Landroidx/versionedparcelable/VersionedParcel$ParcelException;
invoke-direct {v1, v0}, Landroidx/versionedparcelable/VersionedParcel$ParcelException;-><init>(Ljava/lang/Throwable;)V
throw v1
.end method
.method public readInt()I
.locals 2
:try_start_0
iget-object v0, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mCurrentInput:Ljava/io/DataInputStream;
invoke-virtual {v0}, Ljava/io/DataInputStream;->readInt()I
move-result v0
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return v0
:catch_0
move-exception v0
new-instance v1, Landroidx/versionedparcelable/VersionedParcel$ParcelException;
invoke-direct {v1, v0}, Landroidx/versionedparcelable/VersionedParcel$ParcelException;-><init>(Ljava/lang/Throwable;)V
throw v1
.end method
.method public readLong()J
.locals 2
:try_start_0
iget-object v0, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mCurrentInput:Ljava/io/DataInputStream;
invoke-virtual {v0}, Ljava/io/DataInputStream;->readLong()J
move-result-wide v0
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-wide v0
:catch_0
move-exception v0
new-instance v1, Landroidx/versionedparcelable/VersionedParcel$ParcelException;
invoke-direct {v1, v0}, Landroidx/versionedparcelable/VersionedParcel$ParcelException;-><init>(Ljava/lang/Throwable;)V
throw v1
.end method
.method public readParcelable()Landroid/os/Parcelable;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"<T::",
"Landroid/os/Parcelable;",
">()TT;"
}
.end annotation
const/4 v0, 0x0
return-object v0
.end method
.method public readString()Ljava/lang/String;
.locals 3
:try_start_0
iget-object v0, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mCurrentInput:Ljava/io/DataInputStream;
invoke-virtual {v0}, Ljava/io/DataInputStream;->readInt()I
move-result v0
if-lez v0, :cond_0
new-array v0, v0, [B
iget-object v1, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mCurrentInput:Ljava/io/DataInputStream;
invoke-virtual {v1, v0}, Ljava/io/DataInputStream;->readFully([B)V
new-instance v1, Ljava/lang/String;
sget-object v2, Landroidx/versionedparcelable/VersionedParcelStream;->UTF_16:Ljava/nio/charset/Charset;
invoke-direct {v1, v0, v2}, Ljava/lang/String;-><init>([BLjava/nio/charset/Charset;)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-object v1
:cond_0
const/4 v0, 0x0
return-object v0
:catch_0
move-exception v0
new-instance v1, Landroidx/versionedparcelable/VersionedParcel$ParcelException;
invoke-direct {v1, v0}, Landroidx/versionedparcelable/VersionedParcel$ParcelException;-><init>(Ljava/lang/Throwable;)V
throw v1
.end method
.method public readStrongBinder()Landroid/os/IBinder;
.locals 1
const/4 v0, 0x0
return-object v0
.end method
.method public setOutputField(I)V
.locals 2
invoke-virtual {p0}, Landroidx/versionedparcelable/VersionedParcelStream;->closeField()V
new-instance v0, Landroidx/versionedparcelable/VersionedParcelStream$FieldBuffer;
iget-object v1, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mMasterOutput:Ljava/io/DataOutputStream;
invoke-direct {v0, p1, v1}, Landroidx/versionedparcelable/VersionedParcelStream$FieldBuffer;-><init>(ILjava/io/DataOutputStream;)V
iput-object v0, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mFieldBuffer:Landroidx/versionedparcelable/VersionedParcelStream$FieldBuffer;
iget-object p1, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mFieldBuffer:Landroidx/versionedparcelable/VersionedParcelStream$FieldBuffer;
iget-object p1, p1, Landroidx/versionedparcelable/VersionedParcelStream$FieldBuffer;->mDataStream:Ljava/io/DataOutputStream;
iput-object p1, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mCurrentOutput:Ljava/io/DataOutputStream;
return-void
.end method
.method public setSerializationFlags(ZZ)V
.locals 0
if-eqz p1, :cond_0
iput-boolean p2, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mIgnoreParcelables:Z
return-void
:cond_0
new-instance p1, Ljava/lang/RuntimeException;
const-string p2, "Serialization of this object is not allowed"
invoke-direct {p1, p2}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public writeBoolean(Z)V
.locals 1
:try_start_0
iget-object v0, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mCurrentOutput:Ljava/io/DataOutputStream;
invoke-virtual {v0, p1}, Ljava/io/DataOutputStream;->writeBoolean(Z)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-void
:catch_0
move-exception p1
new-instance v0, Landroidx/versionedparcelable/VersionedParcel$ParcelException;
invoke-direct {v0, p1}, Landroidx/versionedparcelable/VersionedParcel$ParcelException;-><init>(Ljava/lang/Throwable;)V
throw v0
.end method
.method public writeBundle(Landroid/os/Bundle;)V
.locals 3
if-eqz p1, :cond_1
:try_start_0
invoke-virtual {p1}, Landroid/os/Bundle;->keySet()Ljava/util/Set;
move-result-object v0
iget-object v1, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mCurrentOutput:Ljava/io/DataOutputStream;
invoke-interface {v0}, Ljava/util/Set;->size()I
move-result v2
invoke-virtual {v1, v2}, Ljava/io/DataOutputStream;->writeInt(I)V
invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object v0
:goto_0
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_0
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Ljava/lang/String;
invoke-virtual {p0, v1}, Landroidx/versionedparcelable/VersionedParcelStream;->writeString(Ljava/lang/String;)V
invoke-virtual {p1, v1}, Landroid/os/Bundle;->get(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v1
invoke-direct {p0, v1}, Landroidx/versionedparcelable/VersionedParcelStream;->writeObject(Ljava/lang/Object;)V
goto :goto_0
:cond_0
return-void
:cond_1
iget-object p1, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mCurrentOutput:Ljava/io/DataOutputStream;
const/4 v0, -0x1
invoke-virtual {p1, v0}, Ljava/io/DataOutputStream;->writeInt(I)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-void
:catch_0
move-exception p1
new-instance v0, Landroidx/versionedparcelable/VersionedParcel$ParcelException;
invoke-direct {v0, p1}, Landroidx/versionedparcelable/VersionedParcel$ParcelException;-><init>(Ljava/lang/Throwable;)V
throw v0
return-void
.end method
.method public writeByteArray([B)V
.locals 2
if-eqz p1, :cond_0
:try_start_0
iget-object v0, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mCurrentOutput:Ljava/io/DataOutputStream;
array-length v1, p1
invoke-virtual {v0, v1}, Ljava/io/DataOutputStream;->writeInt(I)V
iget-object v0, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mCurrentOutput:Ljava/io/DataOutputStream;
invoke-virtual {v0, p1}, Ljava/io/DataOutputStream;->write([B)V
return-void
:cond_0
iget-object p1, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mCurrentOutput:Ljava/io/DataOutputStream;
const/4 v0, -0x1
invoke-virtual {p1, v0}, Ljava/io/DataOutputStream;->writeInt(I)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-void
:catch_0
move-exception p1
new-instance v0, Landroidx/versionedparcelable/VersionedParcel$ParcelException;
invoke-direct {v0, p1}, Landroidx/versionedparcelable/VersionedParcel$ParcelException;-><init>(Ljava/lang/Throwable;)V
throw v0
.end method
.method public writeByteArray([BII)V
.locals 1
if-eqz p1, :cond_0
:try_start_0
iget-object v0, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mCurrentOutput:Ljava/io/DataOutputStream;
invoke-virtual {v0, p3}, Ljava/io/DataOutputStream;->writeInt(I)V
iget-object v0, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mCurrentOutput:Ljava/io/DataOutputStream;
invoke-virtual {v0, p1, p2, p3}, Ljava/io/DataOutputStream;->write([BII)V
return-void
:cond_0
iget-object p1, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mCurrentOutput:Ljava/io/DataOutputStream;
const/4 p2, -0x1
invoke-virtual {p1, p2}, Ljava/io/DataOutputStream;->writeInt(I)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-void
:catch_0
move-exception p1
new-instance p2, Landroidx/versionedparcelable/VersionedParcel$ParcelException;
invoke-direct {p2, p1}, Landroidx/versionedparcelable/VersionedParcel$ParcelException;-><init>(Ljava/lang/Throwable;)V
throw p2
.end method
.method public writeDouble(D)V
.locals 1
:try_start_0
iget-object v0, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mCurrentOutput:Ljava/io/DataOutputStream;
invoke-virtual {v0, p1, p2}, Ljava/io/DataOutputStream;->writeDouble(D)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-void
:catch_0
move-exception p1
new-instance p2, Landroidx/versionedparcelable/VersionedParcel$ParcelException;
invoke-direct {p2, p1}, Landroidx/versionedparcelable/VersionedParcel$ParcelException;-><init>(Ljava/lang/Throwable;)V
throw p2
.end method
.method public writeFloat(F)V
.locals 1
:try_start_0
iget-object v0, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mCurrentOutput:Ljava/io/DataOutputStream;
invoke-virtual {v0, p1}, Ljava/io/DataOutputStream;->writeFloat(F)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-void
:catch_0
move-exception p1
new-instance v0, Landroidx/versionedparcelable/VersionedParcel$ParcelException;
invoke-direct {v0, p1}, Landroidx/versionedparcelable/VersionedParcel$ParcelException;-><init>(Ljava/lang/Throwable;)V
throw v0
.end method
.method public writeInt(I)V
.locals 1
:try_start_0
iget-object v0, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mCurrentOutput:Ljava/io/DataOutputStream;
invoke-virtual {v0, p1}, Ljava/io/DataOutputStream;->writeInt(I)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-void
:catch_0
move-exception p1
new-instance v0, Landroidx/versionedparcelable/VersionedParcel$ParcelException;
invoke-direct {v0, p1}, Landroidx/versionedparcelable/VersionedParcel$ParcelException;-><init>(Ljava/lang/Throwable;)V
throw v0
.end method
.method public writeLong(J)V
.locals 1
:try_start_0
iget-object v0, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mCurrentOutput:Ljava/io/DataOutputStream;
invoke-virtual {v0, p1, p2}, Ljava/io/DataOutputStream;->writeLong(J)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-void
:catch_0
move-exception p1
new-instance p2, Landroidx/versionedparcelable/VersionedParcel$ParcelException;
invoke-direct {p2, p1}, Landroidx/versionedparcelable/VersionedParcel$ParcelException;-><init>(Ljava/lang/Throwable;)V
throw p2
.end method
.method public writeParcelable(Landroid/os/Parcelable;)V
.locals 1
iget-boolean p1, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mIgnoreParcelables:Z
if-eqz p1, :cond_0
return-void
:cond_0
new-instance p1, Ljava/lang/RuntimeException;
const-string v0, "Parcelables cannot be written to an OutputStream"
invoke-direct {p1, v0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public writeString(Ljava/lang/String;)V
.locals 2
if-eqz p1, :cond_0
:try_start_0
sget-object v0, Landroidx/versionedparcelable/VersionedParcelStream;->UTF_16:Ljava/nio/charset/Charset;
invoke-virtual {p1, v0}, Ljava/lang/String;->getBytes(Ljava/nio/charset/Charset;)[B
move-result-object p1
iget-object v0, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mCurrentOutput:Ljava/io/DataOutputStream;
array-length v1, p1
invoke-virtual {v0, v1}, Ljava/io/DataOutputStream;->writeInt(I)V
iget-object v0, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mCurrentOutput:Ljava/io/DataOutputStream;
invoke-virtual {v0, p1}, Ljava/io/DataOutputStream;->write([B)V
return-void
:cond_0
iget-object p1, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mCurrentOutput:Ljava/io/DataOutputStream;
const/4 v0, -0x1
invoke-virtual {p1, v0}, Ljava/io/DataOutputStream;->writeInt(I)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-void
:catch_0
move-exception p1
new-instance v0, Landroidx/versionedparcelable/VersionedParcel$ParcelException;
invoke-direct {v0, p1}, Landroidx/versionedparcelable/VersionedParcel$ParcelException;-><init>(Ljava/lang/Throwable;)V
throw v0
.end method
.method public writeStrongBinder(Landroid/os/IBinder;)V
.locals 1
iget-boolean p1, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mIgnoreParcelables:Z
if-eqz p1, :cond_0
return-void
:cond_0
new-instance p1, Ljava/lang/RuntimeException;
const-string v0, "Binders cannot be written to an OutputStream"
invoke-direct {p1, v0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public writeStrongInterface(Landroid/os/IInterface;)V
.locals 1
iget-boolean p1, p0, Landroidx/versionedparcelable/VersionedParcelStream;->mIgnoreParcelables:Z
if-eqz p1, :cond_0
return-void
:cond_0
new-instance p1, Ljava/lang/RuntimeException;
const-string v0, "Binders cannot be written to an OutputStream"
invoke-direct {p1, v0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V
throw p1
.end method