Rabbit-R1/android (non root)/smali/smali_classes3/io/sentry/config/AbstractPropertiesProvider.smali
2024-05-21 17:08:36 -04:00

225 lines
5.7 KiB
Smali

.class abstract Lio/sentry/config/AbstractPropertiesProvider;
.super Ljava/lang/Object;
.source "AbstractPropertiesProvider.java"
# interfaces
.implements Lio/sentry/config/PropertiesProvider;
# instance fields
.field private final prefix:Ljava/lang/String;
.field private final properties:Ljava/util/Properties;
# direct methods
.method protected constructor <init>(Ljava/lang/String;Ljava/util/Properties;)V
.locals 1
.line 19
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const-string v0, "prefix is required"
.line 20
invoke-static {p1, v0}, Lio/sentry/util/Objects;->requireNonNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Ljava/lang/String;
iput-object p1, p0, Lio/sentry/config/AbstractPropertiesProvider;->prefix:Ljava/lang/String;
const-string p1, "properties are required"
.line 21
invoke-static {p2, p1}, Lio/sentry/util/Objects;->requireNonNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Ljava/util/Properties;
iput-object p1, p0, Lio/sentry/config/AbstractPropertiesProvider;->properties:Ljava/util/Properties;
return-void
.end method
.method protected constructor <init>(Ljava/util/Properties;)V
.locals 1
const-string v0, ""
.line 25
invoke-direct {p0, v0, p1}, Lio/sentry/config/AbstractPropertiesProvider;-><init>(Ljava/lang/String;Ljava/util/Properties;)V
return-void
.end method
# virtual methods
.method public getMap(Ljava/lang/String;)Ljava/util/Map;
.locals 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/String;",
")",
"Ljava/util/Map<",
"Ljava/lang/String;",
"Ljava/lang/String;",
">;"
}
.end annotation
.line 44
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
iget-object v1, p0, Lio/sentry/config/AbstractPropertiesProvider;->prefix:Ljava/lang/String;
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p1
const-string v0, "."
invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p1
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
.line 46
new-instance v0, Ljava/util/HashMap;
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
iget-object p0, p0, Lio/sentry/config/AbstractPropertiesProvider;->properties:Ljava/util/Properties;
.line 47
invoke-virtual {p0}, Ljava/util/Properties;->entrySet()Ljava/util/Set;
move-result-object p0
invoke-interface {p0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object p0
:cond_0
:goto_0
invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_1
invoke-interface {p0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Ljava/util/Map$Entry;
.line 48
invoke-interface {v1}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
move-result-object v2
instance-of v2, v2, Ljava/lang/String;
if-eqz v2, :cond_0
invoke-interface {v1}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
move-result-object v2
instance-of v2, v2, Ljava/lang/String;
if-eqz v2, :cond_0
.line 49
invoke-interface {v1}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
move-result-object v2
check-cast v2, Ljava/lang/String;
.line 50
invoke-virtual {v2, p1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
move-result v3
if-eqz v3, :cond_0
.line 51
invoke-interface {v1}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
move-result-object v1
check-cast v1, Ljava/lang/String;
const-string v3, "\""
invoke-static {v1, v3}, Lio/sentry/util/StringUtils;->removeSurrounding(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
.line 52
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result v3
invoke-virtual {v2, v3}, Ljava/lang/String;->substring(I)Ljava/lang/String;
move-result-object v2
invoke-interface {v0, v2, v1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
goto :goto_0
:cond_1
return-object v0
.end method
.method public getProperty(Ljava/lang/String;)Ljava/lang/String;
.locals 2
iget-object v0, p0, Lio/sentry/config/AbstractPropertiesProvider;->properties:Ljava/util/Properties;
.line 30
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
iget-object p0, p0, Lio/sentry/config/AbstractPropertiesProvider;->prefix:Ljava/lang/String;
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p0
invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p0
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
invoke-virtual {v0, p0}, Ljava/util/Properties;->getProperty(Ljava/lang/String;)Ljava/lang/String;
move-result-object p0
const-string p1, "\""
invoke-static {p0, p1}, Lio/sentry/util/StringUtils;->removeSurrounding(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object p0
return-object p0
.end method