203 lines
4.7 KiB
Smali
203 lines
4.7 KiB
Smali
.class final Lcom/crashlytics/android/answers/d;
|
|
.super Ljava/lang/Object;
|
|
.source "AnswersEventValidator.java"
|
|
|
|
|
|
# instance fields
|
|
.field final oO:I
|
|
|
|
.field final oP:I
|
|
|
|
.field oQ:Z
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Z)V
|
|
.locals 1
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
const/16 v0, 0x14
|
|
|
|
iput v0, p0, Lcom/crashlytics/android/answers/d;->oO:I
|
|
|
|
const/16 v0, 0x64
|
|
|
|
iput v0, p0, Lcom/crashlytics/android/answers/d;->oP:I
|
|
|
|
iput-boolean p1, p0, Lcom/crashlytics/android/answers/d;->oQ:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private a(Ljava/lang/RuntimeException;)V
|
|
.locals 3
|
|
|
|
iget-boolean v0, p0, Lcom/crashlytics/android/answers/d;->oQ:Z
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
invoke-static {}, Lio/fabric/sdk/android/c;->Cx()Lio/fabric/sdk/android/l;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "Answers"
|
|
|
|
const-string v2, "Invalid user input detected"
|
|
|
|
invoke-interface {v0, v1, v2, p1}, Lio/fabric/sdk/android/l;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
throw p1
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final E(Ljava/lang/String;)Ljava/lang/String;
|
|
.locals 4
|
|
|
|
invoke-virtual {p1}, Ljava/lang/String;->length()I
|
|
|
|
move-result v0
|
|
|
|
iget v1, p0, Lcom/crashlytics/android/answers/d;->oP:I
|
|
|
|
if-le v0, v1, :cond_0
|
|
|
|
sget-object v0, Ljava/util/Locale;->US:Ljava/util/Locale;
|
|
|
|
const/4 v1, 0x1
|
|
|
|
new-array v1, v1, [Ljava/lang/Object;
|
|
|
|
iget v2, p0, Lcom/crashlytics/android/answers/d;->oP:I
|
|
|
|
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v2
|
|
|
|
const/4 v3, 0x0
|
|
|
|
aput-object v2, v1, v3
|
|
|
|
const-string v2, "String is too long, truncating to %d characters"
|
|
|
|
invoke-static {v0, v2, v1}, Ljava/lang/String;->format(Ljava/util/Locale;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Ljava/lang/IllegalArgumentException;
|
|
|
|
invoke-direct {v1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-direct {p0, v1}, Lcom/crashlytics/android/answers/d;->a(Ljava/lang/RuntimeException;)V
|
|
|
|
iget v0, p0, Lcom/crashlytics/android/answers/d;->oP:I
|
|
|
|
invoke-virtual {p1, v3, v0}, Ljava/lang/String;->substring(II)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
:cond_0
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public final a(Ljava/lang/Object;Ljava/lang/String;)Z
|
|
.locals 1
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
new-instance p1, Ljava/lang/NullPointerException;
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string p2, " must not be null"
|
|
|
|
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-direct {p0, p1}, Lcom/crashlytics/android/answers/d;->a(Ljava/lang/RuntimeException;)V
|
|
|
|
const/4 p1, 0x1
|
|
|
|
return p1
|
|
|
|
:cond_0
|
|
const/4 p1, 0x0
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public final a(Ljava/util/Map;Ljava/lang/String;)Z
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/String;",
|
|
"Ljava/lang/Object;",
|
|
">;",
|
|
"Ljava/lang/String;",
|
|
")Z"
|
|
}
|
|
.end annotation
|
|
|
|
invoke-interface {p1}, Ljava/util/Map;->size()I
|
|
|
|
move-result v0
|
|
|
|
iget v1, p0, Lcom/crashlytics/android/answers/d;->oO:I
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-lt v0, v1, :cond_0
|
|
|
|
invoke-interface {p1, p2}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
sget-object p1, Ljava/util/Locale;->US:Ljava/util/Locale;
|
|
|
|
const/4 p2, 0x1
|
|
|
|
new-array v0, p2, [Ljava/lang/Object;
|
|
|
|
iget v1, p0, Lcom/crashlytics/android/answers/d;->oO:I
|
|
|
|
invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v1
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
const-string v1, "Limit of %d attributes reached, skipping attribute"
|
|
|
|
invoke-static {p1, v1, v0}, Ljava/lang/String;->format(Ljava/util/Locale;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance v0, Ljava/lang/IllegalArgumentException;
|
|
|
|
invoke-direct {v0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-direct {p0, v0}, Lcom/crashlytics/android/answers/d;->a(Ljava/lang/RuntimeException;)V
|
|
|
|
return p2
|
|
|
|
:cond_0
|
|
return v2
|
|
.end method
|