apkfuckery/com.discord/smali/androidx/room/util/ViewInfo.smali
2020-09-09 19:21:20 +00:00

261 lines
6.1 KiB
Smali

.class public Landroidx/room/util/ViewInfo;
.super Ljava/lang/Object;
.source "ViewInfo.java"
# annotations
.annotation build Landroidx/annotation/RestrictTo;
value = {
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP_PREFIX:Landroidx/annotation/RestrictTo$Scope;
}
.end annotation
# instance fields
.field public final name:Ljava/lang/String;
.field public final sql:Ljava/lang/String;
# direct methods
.method public constructor <init>(Ljava/lang/String;Ljava/lang/String;)V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Landroidx/room/util/ViewInfo;->name:Ljava/lang/String;
iput-object p2, p0, Landroidx/room/util/ViewInfo;->sql:Ljava/lang/String;
return-void
.end method
.method public static read(Landroidx/sqlite/db/SupportSQLiteDatabase;Ljava/lang/String;)Landroidx/room/util/ViewInfo;
.locals 2
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "SELECT name, sql FROM sqlite_master WHERE type = \'view\' AND name = \'"
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v1, "\'"
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
invoke-interface {p0, v0}, Landroidx/sqlite/db/SupportSQLiteDatabase;->query(Ljava/lang/String;)Landroid/database/Cursor;
move-result-object p0
:try_start_0
invoke-interface {p0}, Landroid/database/Cursor;->moveToFirst()Z
move-result v0
if-eqz v0, :cond_0
new-instance p1, Landroidx/room/util/ViewInfo;
const/4 v0, 0x0
invoke-interface {p0, v0}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;
move-result-object v0
const/4 v1, 0x1
invoke-interface {p0, v1}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;
move-result-object v1
invoke-direct {p1, v0, v1}, Landroidx/room/util/ViewInfo;-><init>(Ljava/lang/String;Ljava/lang/String;)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
invoke-interface {p0}, Landroid/database/Cursor;->close()V
return-object p1
:cond_0
:try_start_1
new-instance v0, Landroidx/room/util/ViewInfo;
const/4 v1, 0x0
invoke-direct {v0, p1, v1}, Landroidx/room/util/ViewInfo;-><init>(Ljava/lang/String;Ljava/lang/String;)V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
invoke-interface {p0}, Landroid/database/Cursor;->close()V
return-object v0
:catchall_0
move-exception p1
invoke-interface {p0}, Landroid/database/Cursor;->close()V
throw p1
.end method
# virtual methods
.method public equals(Ljava/lang/Object;)Z
.locals 4
const/4 v0, 0x1
if-ne p0, p1, :cond_0
return v0
:cond_0
const/4 v1, 0x0
if-eqz p1, :cond_5
const-class v2, Landroidx/room/util/ViewInfo;
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v3
if-eq v2, v3, :cond_1
goto :goto_2
:cond_1
check-cast p1, Landroidx/room/util/ViewInfo;
iget-object v2, p0, Landroidx/room/util/ViewInfo;->name:Ljava/lang/String;
if-eqz v2, :cond_2
iget-object v3, p1, Landroidx/room/util/ViewInfo;->name:Ljava/lang/String;
invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_4
goto :goto_0
:cond_2
iget-object v2, p1, Landroidx/room/util/ViewInfo;->name:Ljava/lang/String;
if-nez v2, :cond_4
:goto_0
iget-object v2, p0, Landroidx/room/util/ViewInfo;->sql:Ljava/lang/String;
if-eqz v2, :cond_3
iget-object p1, p1, Landroidx/room/util/ViewInfo;->sql:Ljava/lang/String;
invoke-virtual {v2, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result p1
if-eqz p1, :cond_4
goto :goto_1
:cond_3
iget-object p1, p1, Landroidx/room/util/ViewInfo;->sql:Ljava/lang/String;
if-nez p1, :cond_4
goto :goto_1
:cond_4
const/4 v0, 0x0
:goto_1
return v0
:cond_5
:goto_2
return v1
.end method
.method public hashCode()I
.locals 3
iget-object v0, p0, Landroidx/room/util/ViewInfo;->name:Ljava/lang/String;
const/4 v1, 0x0
if-eqz v0, :cond_0
invoke-virtual {v0}, Ljava/lang/String;->hashCode()I
move-result v0
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
mul-int/lit8 v0, v0, 0x1f
iget-object v2, p0, Landroidx/room/util/ViewInfo;->sql:Ljava/lang/String;
if-eqz v2, :cond_1
invoke-virtual {v2}, Ljava/lang/String;->hashCode()I
move-result v1
:cond_1
add-int/2addr v0, v1
return v0
.end method
.method public toString()Ljava/lang/String;
.locals 3
const-string v0, "ViewInfo{name=\'"
invoke-static {v0}, Lf/e/b/a/a;->E(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
iget-object v1, p0, Landroidx/room/util/ViewInfo;->name:Ljava/lang/String;
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const/16 v1, 0x27
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
const-string v2, ", sql=\'"
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v2, p0, Landroidx/room/util/ViewInfo;->sql:Ljava/lang/String;
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
const/16 v1, 0x7d
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
return-object v0
.end method