306 lines
10 KiB
Smali
306 lines
10 KiB
Smali
|
.class public Landroidx/sqlite/db/framework/FrameworkSQLiteOpenHelper$OpenHelper;
|
||
|
.super Landroid/database/sqlite/SQLiteOpenHelper;
|
||
|
.source "FrameworkSQLiteOpenHelper.java"
|
||
|
|
||
|
|
||
|
# annotations
|
||
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
||
|
value = Landroidx/sqlite/db/framework/FrameworkSQLiteOpenHelper;
|
||
|
.end annotation
|
||
|
|
||
|
.annotation system Ldalvik/annotation/InnerClass;
|
||
|
accessFlags = 0x9
|
||
|
name = "OpenHelper"
|
||
|
.end annotation
|
||
|
|
||
|
|
||
|
# instance fields
|
||
|
.field public final mCallback:Landroidx/sqlite/db/SupportSQLiteOpenHelper$Callback;
|
||
|
|
||
|
.field public final mDbRef:[Landroidx/sqlite/db/framework/FrameworkSQLiteDatabase;
|
||
|
|
||
|
.field public mMigrated:Z
|
||
|
|
||
|
|
||
|
# direct methods
|
||
|
.method public constructor <init>(Landroid/content/Context;Ljava/lang/String;[Landroidx/sqlite/db/framework/FrameworkSQLiteDatabase;Landroidx/sqlite/db/SupportSQLiteOpenHelper$Callback;)V
|
||
|
.locals 6
|
||
|
|
||
|
iget v4, p4, Landroidx/sqlite/db/SupportSQLiteOpenHelper$Callback;->version:I
|
||
|
|
||
|
new-instance v5, Landroidx/sqlite/db/framework/FrameworkSQLiteOpenHelper$OpenHelper$1;
|
||
|
|
||
|
invoke-direct {v5, p4, p3}, Landroidx/sqlite/db/framework/FrameworkSQLiteOpenHelper$OpenHelper$1;-><init>(Landroidx/sqlite/db/SupportSQLiteOpenHelper$Callback;[Landroidx/sqlite/db/framework/FrameworkSQLiteDatabase;)V
|
||
|
|
||
|
const/4 v3, 0x0
|
||
|
|
||
|
move-object v0, p0
|
||
|
|
||
|
move-object v1, p1
|
||
|
|
||
|
move-object v2, p2
|
||
|
|
||
|
invoke-direct/range {v0 .. v5}, Landroid/database/sqlite/SQLiteOpenHelper;-><init>(Landroid/content/Context;Ljava/lang/String;Landroid/database/sqlite/SQLiteDatabase$CursorFactory;ILandroid/database/DatabaseErrorHandler;)V
|
||
|
|
||
|
iput-object p4, p0, Landroidx/sqlite/db/framework/FrameworkSQLiteOpenHelper$OpenHelper;->mCallback:Landroidx/sqlite/db/SupportSQLiteOpenHelper$Callback;
|
||
|
|
||
|
iput-object p3, p0, Landroidx/sqlite/db/framework/FrameworkSQLiteOpenHelper$OpenHelper;->mDbRef:[Landroidx/sqlite/db/framework/FrameworkSQLiteDatabase;
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public static getWrappedDb([Landroidx/sqlite/db/framework/FrameworkSQLiteDatabase;Landroid/database/sqlite/SQLiteDatabase;)Landroidx/sqlite/db/framework/FrameworkSQLiteDatabase;
|
||
|
.locals 2
|
||
|
|
||
|
const/4 v0, 0x0
|
||
|
|
||
|
aget-object v1, p0, v0
|
||
|
|
||
|
if-eqz v1, :cond_0
|
||
|
|
||
|
invoke-virtual {v1, p1}, Landroidx/sqlite/db/framework/FrameworkSQLiteDatabase;->isDelegate(Landroid/database/sqlite/SQLiteDatabase;)Z
|
||
|
|
||
|
move-result v1
|
||
|
|
||
|
if-nez v1, :cond_1
|
||
|
|
||
|
:cond_0
|
||
|
new-instance v1, Landroidx/sqlite/db/framework/FrameworkSQLiteDatabase;
|
||
|
|
||
|
invoke-direct {v1, p1}, Landroidx/sqlite/db/framework/FrameworkSQLiteDatabase;-><init>(Landroid/database/sqlite/SQLiteDatabase;)V
|
||
|
|
||
|
aput-object v1, p0, v0
|
||
|
|
||
|
:cond_1
|
||
|
aget-object p0, p0, v0
|
||
|
|
||
|
return-object p0
|
||
|
.end method
|
||
|
|
||
|
|
||
|
# virtual methods
|
||
|
.method public declared-synchronized close()V
|
||
|
.locals 3
|
||
|
|
||
|
monitor-enter p0
|
||
|
|
||
|
:try_start_0
|
||
|
invoke-super {p0}, Landroid/database/sqlite/SQLiteOpenHelper;->close()V
|
||
|
|
||
|
iget-object v0, p0, Landroidx/sqlite/db/framework/FrameworkSQLiteOpenHelper$OpenHelper;->mDbRef:[Landroidx/sqlite/db/framework/FrameworkSQLiteDatabase;
|
||
|
|
||
|
const/4 v1, 0x0
|
||
|
|
||
|
const/4 v2, 0x0
|
||
|
|
||
|
aput-object v2, v0, v1
|
||
|
:try_end_0
|
||
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
||
|
|
||
|
monitor-exit p0
|
||
|
|
||
|
return-void
|
||
|
|
||
|
:catchall_0
|
||
|
move-exception v0
|
||
|
|
||
|
monitor-exit p0
|
||
|
|
||
|
throw v0
|
||
|
.end method
|
||
|
|
||
|
.method public declared-synchronized getReadableSupportDatabase()Landroidx/sqlite/db/SupportSQLiteDatabase;
|
||
|
.locals 2
|
||
|
|
||
|
monitor-enter p0
|
||
|
|
||
|
const/4 v0, 0x0
|
||
|
|
||
|
:try_start_0
|
||
|
iput-boolean v0, p0, Landroidx/sqlite/db/framework/FrameworkSQLiteOpenHelper$OpenHelper;->mMigrated:Z
|
||
|
|
||
|
invoke-super {p0}, Landroid/database/sqlite/SQLiteOpenHelper;->getReadableDatabase()Landroid/database/sqlite/SQLiteDatabase;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
iget-boolean v1, p0, Landroidx/sqlite/db/framework/FrameworkSQLiteOpenHelper$OpenHelper;->mMigrated:Z
|
||
|
|
||
|
if-eqz v1, :cond_0
|
||
|
|
||
|
invoke-virtual {p0}, Landroidx/sqlite/db/framework/FrameworkSQLiteOpenHelper$OpenHelper;->close()V
|
||
|
|
||
|
invoke-virtual {p0}, Landroidx/sqlite/db/framework/FrameworkSQLiteOpenHelper$OpenHelper;->getReadableSupportDatabase()Landroidx/sqlite/db/SupportSQLiteDatabase;
|
||
|
|
||
|
move-result-object v0
|
||
|
:try_end_0
|
||
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
||
|
|
||
|
monitor-exit p0
|
||
|
|
||
|
return-object v0
|
||
|
|
||
|
:cond_0
|
||
|
:try_start_1
|
||
|
invoke-virtual {p0, v0}, Landroidx/sqlite/db/framework/FrameworkSQLiteOpenHelper$OpenHelper;->getWrappedDb(Landroid/database/sqlite/SQLiteDatabase;)Landroidx/sqlite/db/framework/FrameworkSQLiteDatabase;
|
||
|
|
||
|
move-result-object v0
|
||
|
:try_end_1
|
||
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
||
|
|
||
|
monitor-exit p0
|
||
|
|
||
|
return-object v0
|
||
|
|
||
|
:catchall_0
|
||
|
move-exception v0
|
||
|
|
||
|
monitor-exit p0
|
||
|
|
||
|
throw v0
|
||
|
.end method
|
||
|
|
||
|
.method public getWrappedDb(Landroid/database/sqlite/SQLiteDatabase;)Landroidx/sqlite/db/framework/FrameworkSQLiteDatabase;
|
||
|
.locals 1
|
||
|
|
||
|
iget-object v0, p0, Landroidx/sqlite/db/framework/FrameworkSQLiteOpenHelper$OpenHelper;->mDbRef:[Landroidx/sqlite/db/framework/FrameworkSQLiteDatabase;
|
||
|
|
||
|
invoke-static {v0, p1}, Landroidx/sqlite/db/framework/FrameworkSQLiteOpenHelper$OpenHelper;->getWrappedDb([Landroidx/sqlite/db/framework/FrameworkSQLiteDatabase;Landroid/database/sqlite/SQLiteDatabase;)Landroidx/sqlite/db/framework/FrameworkSQLiteDatabase;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
return-object p1
|
||
|
.end method
|
||
|
|
||
|
.method public declared-synchronized getWritableSupportDatabase()Landroidx/sqlite/db/SupportSQLiteDatabase;
|
||
|
.locals 2
|
||
|
|
||
|
monitor-enter p0
|
||
|
|
||
|
const/4 v0, 0x0
|
||
|
|
||
|
:try_start_0
|
||
|
iput-boolean v0, p0, Landroidx/sqlite/db/framework/FrameworkSQLiteOpenHelper$OpenHelper;->mMigrated:Z
|
||
|
|
||
|
invoke-super {p0}, Landroid/database/sqlite/SQLiteOpenHelper;->getWritableDatabase()Landroid/database/sqlite/SQLiteDatabase;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
iget-boolean v1, p0, Landroidx/sqlite/db/framework/FrameworkSQLiteOpenHelper$OpenHelper;->mMigrated:Z
|
||
|
|
||
|
if-eqz v1, :cond_0
|
||
|
|
||
|
invoke-virtual {p0}, Landroidx/sqlite/db/framework/FrameworkSQLiteOpenHelper$OpenHelper;->close()V
|
||
|
|
||
|
invoke-virtual {p0}, Landroidx/sqlite/db/framework/FrameworkSQLiteOpenHelper$OpenHelper;->getWritableSupportDatabase()Landroidx/sqlite/db/SupportSQLiteDatabase;
|
||
|
|
||
|
move-result-object v0
|
||
|
:try_end_0
|
||
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
||
|
|
||
|
monitor-exit p0
|
||
|
|
||
|
return-object v0
|
||
|
|
||
|
:cond_0
|
||
|
:try_start_1
|
||
|
invoke-virtual {p0, v0}, Landroidx/sqlite/db/framework/FrameworkSQLiteOpenHelper$OpenHelper;->getWrappedDb(Landroid/database/sqlite/SQLiteDatabase;)Landroidx/sqlite/db/framework/FrameworkSQLiteDatabase;
|
||
|
|
||
|
move-result-object v0
|
||
|
:try_end_1
|
||
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
||
|
|
||
|
monitor-exit p0
|
||
|
|
||
|
return-object v0
|
||
|
|
||
|
:catchall_0
|
||
|
move-exception v0
|
||
|
|
||
|
monitor-exit p0
|
||
|
|
||
|
throw v0
|
||
|
.end method
|
||
|
|
||
|
.method public onConfigure(Landroid/database/sqlite/SQLiteDatabase;)V
|
||
|
.locals 1
|
||
|
|
||
|
iget-object v0, p0, Landroidx/sqlite/db/framework/FrameworkSQLiteOpenHelper$OpenHelper;->mCallback:Landroidx/sqlite/db/SupportSQLiteOpenHelper$Callback;
|
||
|
|
||
|
invoke-virtual {p0, p1}, Landroidx/sqlite/db/framework/FrameworkSQLiteOpenHelper$OpenHelper;->getWrappedDb(Landroid/database/sqlite/SQLiteDatabase;)Landroidx/sqlite/db/framework/FrameworkSQLiteDatabase;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
invoke-virtual {v0, p1}, Landroidx/sqlite/db/SupportSQLiteOpenHelper$Callback;->onConfigure(Landroidx/sqlite/db/SupportSQLiteDatabase;)V
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public onCreate(Landroid/database/sqlite/SQLiteDatabase;)V
|
||
|
.locals 1
|
||
|
|
||
|
iget-object v0, p0, Landroidx/sqlite/db/framework/FrameworkSQLiteOpenHelper$OpenHelper;->mCallback:Landroidx/sqlite/db/SupportSQLiteOpenHelper$Callback;
|
||
|
|
||
|
invoke-virtual {p0, p1}, Landroidx/sqlite/db/framework/FrameworkSQLiteOpenHelper$OpenHelper;->getWrappedDb(Landroid/database/sqlite/SQLiteDatabase;)Landroidx/sqlite/db/framework/FrameworkSQLiteDatabase;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
invoke-virtual {v0, p1}, Landroidx/sqlite/db/SupportSQLiteOpenHelper$Callback;->onCreate(Landroidx/sqlite/db/SupportSQLiteDatabase;)V
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public onDowngrade(Landroid/database/sqlite/SQLiteDatabase;II)V
|
||
|
.locals 1
|
||
|
|
||
|
const/4 v0, 0x1
|
||
|
|
||
|
iput-boolean v0, p0, Landroidx/sqlite/db/framework/FrameworkSQLiteOpenHelper$OpenHelper;->mMigrated:Z
|
||
|
|
||
|
iget-object v0, p0, Landroidx/sqlite/db/framework/FrameworkSQLiteOpenHelper$OpenHelper;->mCallback:Landroidx/sqlite/db/SupportSQLiteOpenHelper$Callback;
|
||
|
|
||
|
invoke-virtual {p0, p1}, Landroidx/sqlite/db/framework/FrameworkSQLiteOpenHelper$OpenHelper;->getWrappedDb(Landroid/database/sqlite/SQLiteDatabase;)Landroidx/sqlite/db/framework/FrameworkSQLiteDatabase;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
invoke-virtual {v0, p1, p2, p3}, Landroidx/sqlite/db/SupportSQLiteOpenHelper$Callback;->onDowngrade(Landroidx/sqlite/db/SupportSQLiteDatabase;II)V
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public onOpen(Landroid/database/sqlite/SQLiteDatabase;)V
|
||
|
.locals 1
|
||
|
|
||
|
iget-boolean v0, p0, Landroidx/sqlite/db/framework/FrameworkSQLiteOpenHelper$OpenHelper;->mMigrated:Z
|
||
|
|
||
|
if-nez v0, :cond_0
|
||
|
|
||
|
iget-object v0, p0, Landroidx/sqlite/db/framework/FrameworkSQLiteOpenHelper$OpenHelper;->mCallback:Landroidx/sqlite/db/SupportSQLiteOpenHelper$Callback;
|
||
|
|
||
|
invoke-virtual {p0, p1}, Landroidx/sqlite/db/framework/FrameworkSQLiteOpenHelper$OpenHelper;->getWrappedDb(Landroid/database/sqlite/SQLiteDatabase;)Landroidx/sqlite/db/framework/FrameworkSQLiteDatabase;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
invoke-virtual {v0, p1}, Landroidx/sqlite/db/SupportSQLiteOpenHelper$Callback;->onOpen(Landroidx/sqlite/db/SupportSQLiteDatabase;)V
|
||
|
|
||
|
:cond_0
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public onUpgrade(Landroid/database/sqlite/SQLiteDatabase;II)V
|
||
|
.locals 1
|
||
|
|
||
|
const/4 v0, 0x1
|
||
|
|
||
|
iput-boolean v0, p0, Landroidx/sqlite/db/framework/FrameworkSQLiteOpenHelper$OpenHelper;->mMigrated:Z
|
||
|
|
||
|
iget-object v0, p0, Landroidx/sqlite/db/framework/FrameworkSQLiteOpenHelper$OpenHelper;->mCallback:Landroidx/sqlite/db/SupportSQLiteOpenHelper$Callback;
|
||
|
|
||
|
invoke-virtual {p0, p1}, Landroidx/sqlite/db/framework/FrameworkSQLiteOpenHelper$OpenHelper;->getWrappedDb(Landroid/database/sqlite/SQLiteDatabase;)Landroidx/sqlite/db/framework/FrameworkSQLiteDatabase;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
invoke-virtual {v0, p1, p2, p3}, Landroidx/sqlite/db/SupportSQLiteOpenHelper$Callback;->onUpgrade(Landroidx/sqlite/db/SupportSQLiteDatabase;II)V
|
||
|
|
||
|
return-void
|
||
|
.end method
|