Rabbit-R1/switch port/smali/smali_classes3/io/sentry/protocol/MeasurementValue$Deserializer.smali
2024-05-21 17:08:36 -04:00

170 lines
4.1 KiB
Smali

.class public final Lio/sentry/protocol/MeasurementValue$Deserializer;
.super Ljava/lang/Object;
.source "MeasurementValue.java"
# interfaces
.implements Lio/sentry/JsonDeserializer;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lio/sentry/protocol/MeasurementValue;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "Deserializer"
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/Object;",
"Lio/sentry/JsonDeserializer<",
"Lio/sentry/protocol/MeasurementValue;",
">;"
}
.end annotation
# direct methods
.method public constructor <init>()V
.locals 0
.line 102
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public deserialize(Lio/sentry/JsonObjectReader;Lio/sentry/ILogger;)Lio/sentry/protocol/MeasurementValue;
.locals 4
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/Exception;
}
.end annotation
.line 106
invoke-virtual {p1}, Lio/sentry/JsonObjectReader;->beginObject()V
const/4 p0, 0x0
move-object v0, p0
move-object v1, v0
.line 112
:goto_0
invoke-virtual {p1}, Lio/sentry/JsonObjectReader;->peek()Lio/sentry/vendor/gson/stream/JsonToken;
move-result-object v2
sget-object v3, Lio/sentry/vendor/gson/stream/JsonToken;->NAME:Lio/sentry/vendor/gson/stream/JsonToken;
if-ne v2, v3, :cond_3
.line 113
invoke-virtual {p1}, Lio/sentry/JsonObjectReader;->nextName()Ljava/lang/String;
move-result-object v2
.line 114
invoke-virtual {v2}, Ljava/lang/String;->hashCode()I
const-string v3, "unit"
invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v3
if-nez v3, :cond_2
const-string v3, "value"
invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v3
if-nez v3, :cond_1
if-nez v1, :cond_0
.line 123
new-instance v1, Ljava/util/concurrent/ConcurrentHashMap;
invoke-direct {v1}, Ljava/util/concurrent/ConcurrentHashMap;-><init>()V
.line 125
:cond_0
invoke-virtual {p1, p2, v1, v2}, Lio/sentry/JsonObjectReader;->nextUnknown(Lio/sentry/ILogger;Ljava/util/Map;Ljava/lang/String;)V
goto :goto_0
.line 116
:cond_1
invoke-virtual {p1}, Lio/sentry/JsonObjectReader;->nextObjectOrNull()Ljava/lang/Object;
move-result-object p0
check-cast p0, Ljava/lang/Number;
goto :goto_0
.line 119
:cond_2
invoke-virtual {p1}, Lio/sentry/JsonObjectReader;->nextStringOrNull()Ljava/lang/String;
move-result-object v0
goto :goto_0
.line 130
:cond_3
invoke-virtual {p1}, Lio/sentry/JsonObjectReader;->endObject()V
if-eqz p0, :cond_4
.line 139
new-instance p1, Lio/sentry/protocol/MeasurementValue;
invoke-direct {p1, p0, v0}, Lio/sentry/protocol/MeasurementValue;-><init>(Ljava/lang/Number;Ljava/lang/String;)V
.line 140
invoke-virtual {p1, v1}, Lio/sentry/protocol/MeasurementValue;->setUnknown(Ljava/util/Map;)V
return-object p1
.line 134
:cond_4
new-instance p0, Ljava/lang/IllegalStateException;
const-string p1, "Missing required field \"value\""
invoke-direct {p0, p1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
.line 135
sget-object v0, Lio/sentry/SentryLevel;->ERROR:Lio/sentry/SentryLevel;
invoke-interface {p2, v0, p1, p0}, Lio/sentry/ILogger;->log(Lio/sentry/SentryLevel;Ljava/lang/String;Ljava/lang/Throwable;)V
.line 136
throw p0
.end method
.method public bridge synthetic deserialize(Lio/sentry/JsonObjectReader;Lio/sentry/ILogger;)Ljava/lang/Object;
.locals 0
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/Exception;
}
.end annotation
.line 102
invoke-virtual {p0, p1, p2}, Lio/sentry/protocol/MeasurementValue$Deserializer;->deserialize(Lio/sentry/JsonObjectReader;Lio/sentry/ILogger;)Lio/sentry/protocol/MeasurementValue;
move-result-object p0
return-object p0
.end method