2020-05-17 12:40:10 +00:00
.class public L androidx/room/RoomDatabase$Builder ;
.super L java/lang/Object ;
.source "RoomDatabase.java"
# annotations
.annotation system L dalvik/annotation/EnclosingClass ;
value = L androidx/room/RoomDatabase ;
.end annotation
.annotation system L dalvik/annotation/InnerClass ;
accessFlags = 0x9
name = "Builder"
.end annotation
.annotation system L dalvik/annotation/Signature ;
value = {
"<T:" ,
"Landroidx/room/RoomDatabase;" ,
">" ,
"Ljava/lang/Object;"
}
.end annotation
# instance fields
.field public mAllowDestructiveMigrationOnDowngrade : Z
.field public mAllowMainThreadQueries : Z
.field public mCallbacks : L java/util/ArrayList ;
.annotation system L dalvik/annotation/Signature ;
value = {
"Ljava/util/ArrayList<" ,
"Landroidx/room/RoomDatabase$Callback;" ,
">;"
}
.end annotation
.end field
.field public final mContext : L android/content/Context ;
2020-07-08 16:44:49 +00:00
.field public mCopyFromAssetPath : L java/lang/String ;
.field public mCopyFromFile : L java/io/File ;
2020-05-17 12:40:10 +00:00
.field public final mDatabaseClass : L java/lang/Class ;
.annotation system L dalvik/annotation/Signature ;
value = {
"Ljava/lang/Class<" ,
"TT;>;"
}
.end annotation
.end field
.field public mFactory : L androidx/sqlite/db/SupportSQLiteOpenHelper$Factory ;
.field public mJournalMode : L androidx/room/RoomDatabase$JournalMode ;
.field public final mMigrationContainer : L androidx/room/RoomDatabase$MigrationContainer ;
.field public mMigrationStartAndEndVersions : L java/util/Set ;
.annotation system L dalvik/annotation/Signature ;
value = {
"Ljava/util/Set<" ,
"Ljava/lang/Integer;" ,
">;"
}
.end annotation
.end field
.field public mMigrationsNotRequiredFrom : L java/util/Set ;
.annotation system L dalvik/annotation/Signature ;
value = {
"Ljava/util/Set<" ,
"Ljava/lang/Integer;" ,
">;"
}
.end annotation
.end field
.field public mMultiInstanceInvalidation : Z
.field public final mName : L java/lang/String ;
.field public mQueryExecutor : L java/util/concurrent/Executor ;
.field public mRequireMigration : Z
.field public mTransactionExecutor : L java/util/concurrent/Executor ;
# direct methods
.method public constructor <init> ( L android/content/Context ;L java/lang/Class ;L java/lang/String ;) V
.locals 0
. param p1 # Landroid/content/Context;
.annotation build L androidx/annotation/NonNull ;
.end annotation
. end param
. param p2 # Ljava/lang/Class;
.annotation build L androidx/annotation/NonNull ;
.end annotation
. end param
. param p3 # Ljava/lang/String;
.annotation build L androidx/annotation/Nullable ;
.end annotation
. end param
.annotation system L dalvik/annotation/Signature ;
value = {
"(" ,
"Landroid/content/Context;" ,
"Ljava/lang/Class<" ,
"TT;>;" ,
"Ljava/lang/String;" ,
")V"
}
.end annotation
invoke-direct { p0 } , L java/lang/Object ;-> <init> ( ) V
iput-object p1 , p0 , L androidx/room/RoomDatabase$Builder ;-> mContext : L android/content/Context ;
iput-object p2 , p0 , L androidx/room/RoomDatabase$Builder ;-> mDatabaseClass : L java/lang/Class ;
iput-object p3 , p0 , L androidx/room/RoomDatabase$Builder ;-> mName : L java/lang/String ;
sget-object p1 , L androidx/room/RoomDatabase$JournalMode ;-> AUTOMATIC : L androidx/room/RoomDatabase$JournalMode ;
iput-object p1 , p0 , L androidx/room/RoomDatabase$Builder ;-> mJournalMode : L androidx/room/RoomDatabase$JournalMode ;
const/4 p1 , 0x1
iput-boolean p1 , p0 , L androidx/room/RoomDatabase$Builder ;-> mRequireMigration : Z
new-instance p1 , L androidx/room/RoomDatabase$MigrationContainer ;
invoke-direct { p1 } , L androidx/room/RoomDatabase$MigrationContainer ;-> <init> ( ) V
iput-object p1 , p0 , L androidx/room/RoomDatabase$Builder ;-> mMigrationContainer : L androidx/room/RoomDatabase$MigrationContainer ;
return-void
.end method
# virtual methods
.method public addCallback ( L androidx/room/RoomDatabase$Callback ;) L androidx/room/RoomDatabase$Builder ;
.locals 1
. param p1 # Landroidx/room/RoomDatabase$Callback;
.annotation build L androidx/annotation/NonNull ;
.end annotation
. end param
.annotation build L androidx/annotation/NonNull ;
.end annotation
.annotation system L dalvik/annotation/Signature ;
value = {
"(" ,
"Landroidx/room/RoomDatabase$Callback;" ,
")" ,
"Landroidx/room/RoomDatabase$Builder<" ,
"TT;>;"
}
.end annotation
iget-object v0 , p0 , L androidx/room/RoomDatabase$Builder ;-> mCallbacks : L java/util/ArrayList ;
if-nez v0 , :cond_0
new-instance v0 , L java/util/ArrayList ;
invoke-direct { v0 } , L java/util/ArrayList ;-> <init> ( ) V
iput-object v0 , p0 , L androidx/room/RoomDatabase$Builder ;-> mCallbacks : L java/util/ArrayList ;
:cond_0
iget-object v0 , p0 , L androidx/room/RoomDatabase$Builder ;-> mCallbacks : L java/util/ArrayList ;
invoke-virtual { v0 , p1 } , L java/util/ArrayList ;-> add ( L java/lang/Object ;) Z
return-object p0
.end method
.method public varargs addMigrations ( [ L androidx/room/migration/Migration ;) L androidx/room/RoomDatabase$Builder ;
.locals 5
. param p1 # [Landroidx/room/migration/Migration;
.annotation build L androidx/annotation/NonNull ;
.end annotation
. end param
.annotation build L androidx/annotation/NonNull ;
.end annotation
.annotation system L dalvik/annotation/Signature ;
value = {
"([" ,
"Landroidx/room/migration/Migration;" ,
")" ,
"Landroidx/room/RoomDatabase$Builder<" ,
"TT;>;"
}
.end annotation
iget-object v0 , p0 , L androidx/room/RoomDatabase$Builder ;-> mMigrationStartAndEndVersions : L java/util/Set ;
if-nez v0 , :cond_0
new-instance v0 , L java/util/HashSet ;
invoke-direct { v0 } , L java/util/HashSet ;-> <init> ( ) V
iput-object v0 , p0 , L androidx/room/RoomDatabase$Builder ;-> mMigrationStartAndEndVersions : L java/util/Set ;
:cond_0
array-length v0 , p1
const/4 v1 , 0x0
:goto_0
if-ge v1 , v0 , :cond_1
aget-object v2 , p1 , v1
iget-object v3 , p0 , L androidx/room/RoomDatabase$Builder ;-> mMigrationStartAndEndVersions : L java/util/Set ;
iget v4 , v2 , L androidx/room/migration/Migration ;-> startVersion : I
invoke-static { v4 } , L java/lang/Integer ;-> valueOf ( I ) L java/lang/Integer ;
move-result-object v4
invoke-interface { v3 , v4 } , L java/util/Set ;-> add ( L java/lang/Object ;) Z
iget-object v3 , p0 , L androidx/room/RoomDatabase$Builder ;-> mMigrationStartAndEndVersions : L java/util/Set ;
iget v2 , v2 , L androidx/room/migration/Migration ;-> endVersion : I
invoke-static { v2 } , L java/lang/Integer ;-> valueOf ( I ) L java/lang/Integer ;
move-result-object v2
invoke-interface { v3 , v2 } , L java/util/Set ;-> add ( L java/lang/Object ;) Z
add-int/lit8 v1 , v1 , 0x1
goto :goto_0
:cond_1
iget-object v0 , p0 , L androidx/room/RoomDatabase$Builder ;-> mMigrationContainer : L androidx/room/RoomDatabase$MigrationContainer ;
invoke-virtual { v0 , p1 } , L androidx/room/RoomDatabase$MigrationContainer ;-> addMigrations ( [ L androidx/room/migration/Migration ;) V
return-object p0
.end method
.method public allowMainThreadQueries ( ) L androidx/room/RoomDatabase$Builder ;
.locals 1
.annotation build L androidx/annotation/NonNull ;
.end annotation
.annotation system L dalvik/annotation/Signature ;
value = {
"()" ,
"Landroidx/room/RoomDatabase$Builder<" ,
"TT;>;"
}
.end annotation
const/4 v0 , 0x1
iput-boolean v0 , p0 , L androidx/room/RoomDatabase$Builder ;-> mAllowMainThreadQueries : Z
return-object p0
.end method
.method public build ( ) L androidx/room/RoomDatabase ;
2020-07-08 16:44:49 +00:00
.locals 21
2020-05-17 12:40:10 +00:00
.annotation build L android/annotation/SuppressLint ;
value = {
"RestrictedApi"
}
.end annotation
.annotation build L androidx/annotation/NonNull ;
.end annotation
.annotation system L dalvik/annotation/Signature ;
value = {
"()TT;"
}
.end annotation
2020-07-08 16:44:49 +00:00
move-object/from16 v0 , p0
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
iget-object v1 , v0 , L androidx/room/RoomDatabase$Builder ;-> mContext : L android/content/Context ;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
if-eqz v1 , :cond_c
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
iget-object v1 , v0 , L androidx/room/RoomDatabase$Builder ;-> mDatabaseClass : L java/lang/Class ;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
if-eqz v1 , :cond_b
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
iget-object v1 , v0 , L androidx/room/RoomDatabase$Builder ;-> mQueryExecutor : L java/util/concurrent/Executor ;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
if-nez v1 , :cond_0
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
iget-object v1 , v0 , L androidx/room/RoomDatabase$Builder ;-> mTransactionExecutor : L java/util/concurrent/Executor ;
if-nez v1 , :cond_0
2020-05-17 12:40:10 +00:00
invoke-static { } , L androidx/arch/core/executor/ArchTaskExecutor ;-> getIOThreadExecutor ( ) L java/util/concurrent/Executor ;
2020-07-08 16:44:49 +00:00
move-result-object v1
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
iput-object v1 , v0 , L androidx/room/RoomDatabase$Builder ;-> mTransactionExecutor : L java/util/concurrent/Executor ;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
iput-object v1 , v0 , L androidx/room/RoomDatabase$Builder ;-> mQueryExecutor : L java/util/concurrent/Executor ;
2020-05-17 12:40:10 +00:00
goto :goto_0
:cond_0
2020-07-08 16:44:49 +00:00
iget-object v1 , v0 , L androidx/room/RoomDatabase$Builder ;-> mQueryExecutor : L java/util/concurrent/Executor ;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
if-eqz v1 , :cond_1
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
iget-object v2 , v0 , L androidx/room/RoomDatabase$Builder ;-> mTransactionExecutor : L java/util/concurrent/Executor ;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
if-nez v2 , :cond_1
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
iput-object v1 , v0 , L androidx/room/RoomDatabase$Builder ;-> mTransactionExecutor : L java/util/concurrent/Executor ;
2020-05-17 12:40:10 +00:00
goto :goto_0
:cond_1
2020-07-08 16:44:49 +00:00
iget-object v1 , v0 , L androidx/room/RoomDatabase$Builder ;-> mQueryExecutor : L java/util/concurrent/Executor ;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
if-nez v1 , :cond_2
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
iget-object v1 , v0 , L androidx/room/RoomDatabase$Builder ;-> mTransactionExecutor : L java/util/concurrent/Executor ;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
if-eqz v1 , :cond_2
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
iput-object v1 , v0 , L androidx/room/RoomDatabase$Builder ;-> mQueryExecutor : L java/util/concurrent/Executor ;
2020-05-17 12:40:10 +00:00
:cond_2
:goto_0
2020-07-08 16:44:49 +00:00
iget-object v1 , v0 , L androidx/room/RoomDatabase$Builder ;-> mMigrationStartAndEndVersions : L java/util/Set ;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
if-eqz v1 , :cond_4
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
iget-object v2 , v0 , L androidx/room/RoomDatabase$Builder ;-> mMigrationsNotRequiredFrom : L java/util/Set ;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
if-eqz v2 , :cond_4
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
invoke-interface { v1 } , L java/util/Set ;-> iterator ( ) L java/util/Iterator ;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
move-result-object v1
2020-05-17 12:40:10 +00:00
:goto_1
2020-07-08 16:44:49 +00:00
invoke-interface { v1 } , L java/util/Iterator ;-> hasNext ( ) Z
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
move-result v2
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
if-eqz v2 , :cond_4
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
invoke-interface { v1 } , L java/util/Iterator ;-> next ( ) L java/lang/Object ;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
move-result-object v2
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
check-cast v2 , L java/lang/Integer ;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
iget-object v3 , v0 , L androidx/room/RoomDatabase$Builder ;-> mMigrationsNotRequiredFrom : L java/util/Set ;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
invoke-interface { v3 , v2 } , L java/util/Set ;-> contains ( L java/lang/Object ;) Z
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
move-result v3
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
if-nez v3 , :cond_3
2020-05-17 12:40:10 +00:00
goto :goto_1
:cond_3
2020-07-08 16:44:49 +00:00
new-instance v1 , L java/lang/IllegalArgumentException ;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
new-instance v3 , L java/lang/StringBuilder ;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
invoke-direct { v3 } , L java/lang/StringBuilder ;-> <init> ( ) V
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
const-string v4 , "Inconsistency detected. A Migration was supplied to addMigration(Migration... migrations) that has a start or end version equal to a start version supplied to fallbackToDestructiveMigrationFrom(int... startVersions). Start version: "
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
invoke-virtual { v3 , v4 } , L java/lang/StringBuilder ;-> append ( L java/lang/String ;) L java/lang/StringBuilder ;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
invoke-virtual { v3 , v2 } , L java/lang/StringBuilder ;-> append ( L java/lang/Object ;) L java/lang/StringBuilder ;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
invoke-virtual { v3 } , L java/lang/StringBuilder ;-> toString ( ) L java/lang/String ;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
move-result-object v2
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
invoke-direct { v1 , v2 } , L java/lang/IllegalArgumentException ;-> <init> ( L java/lang/String ;) V
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
throw v1
2020-05-17 12:40:10 +00:00
:cond_4
2020-07-08 16:44:49 +00:00
iget-object v1 , v0 , L androidx/room/RoomDatabase$Builder ;-> mFactory : L androidx/sqlite/db/SupportSQLiteOpenHelper$Factory ;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
if-nez v1 , :cond_5
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
new-instance v1 , L androidx/sqlite/db/framework/FrameworkSQLiteOpenHelperFactory ;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
invoke-direct { v1 } , L androidx/sqlite/db/framework/FrameworkSQLiteOpenHelperFactory ;-> <init> ( ) V
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
iput-object v1 , v0 , L androidx/room/RoomDatabase$Builder ;-> mFactory : L androidx/sqlite/db/SupportSQLiteOpenHelper$Factory ;
2020-05-17 12:40:10 +00:00
:cond_5
2020-07-08 16:44:49 +00:00
iget-object v1 , v0 , L androidx/room/RoomDatabase$Builder ;-> mCopyFromAssetPath : L java/lang/String ;
if-nez v1 , :cond_6
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
iget-object v1 , v0 , L androidx/room/RoomDatabase$Builder ;-> mCopyFromFile : L java/io/File ;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
if-eqz v1 , :cond_9
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
:cond_6
iget-object v1 , v0 , L androidx/room/RoomDatabase$Builder ;-> mName : L java/lang/String ;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
if-eqz v1 , :cond_a
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
iget-object v1 , v0 , L androidx/room/RoomDatabase$Builder ;-> mCopyFromAssetPath : L java/lang/String ;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
if-eqz v1 , :cond_8
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
iget-object v1 , v0 , L androidx/room/RoomDatabase$Builder ;-> mCopyFromFile : L java/io/File ;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
if-nez v1 , :cond_7
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
goto :goto_2
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
:cond_7
new-instance v1 , L java/lang/IllegalArgumentException ;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
const-string v2 , "Both createFromAsset() and createFromFile() was called on this Builder but the database can only be created using one of the two configurations."
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
invoke-direct { v1 , v2 } , L java/lang/IllegalArgumentException ;-> <init> ( L java/lang/String ;) V
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
throw v1
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
:cond_8
:goto_2
new-instance v1 , L androidx/room/SQLiteCopyOpenHelperFactory ;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
iget-object v2 , v0 , L androidx/room/RoomDatabase$Builder ;-> mCopyFromAssetPath : L java/lang/String ;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
iget-object v3 , v0 , L androidx/room/RoomDatabase$Builder ;-> mCopyFromFile : L java/io/File ;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
iget-object v4 , v0 , L androidx/room/RoomDatabase$Builder ;-> mFactory : L androidx/sqlite/db/SupportSQLiteOpenHelper$Factory ;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
invoke-direct { v1 , v2 , v3 , v4 } , L androidx/room/SQLiteCopyOpenHelperFactory ;-> <init> ( L java/lang/String ;L java/io/File ;L androidx/sqlite/db/SupportSQLiteOpenHelper$Factory ;) V
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
iput-object v1 , v0 , L androidx/room/RoomDatabase$Builder ;-> mFactory : L androidx/sqlite/db/SupportSQLiteOpenHelper$Factory ;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
:cond_9
new-instance v1 , L androidx/room/DatabaseConfiguration ;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
iget-object v6 , v0 , L androidx/room/RoomDatabase$Builder ;-> mContext : L android/content/Context ;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
iget-object v7 , v0 , L androidx/room/RoomDatabase$Builder ;-> mName : L java/lang/String ;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
iget-object v8 , v0 , L androidx/room/RoomDatabase$Builder ;-> mFactory : L androidx/sqlite/db/SupportSQLiteOpenHelper$Factory ;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
iget-object v9 , v0 , L androidx/room/RoomDatabase$Builder ;-> mMigrationContainer : L androidx/room/RoomDatabase$MigrationContainer ;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
iget-object v10 , v0 , L androidx/room/RoomDatabase$Builder ;-> mCallbacks : L java/util/ArrayList ;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
iget-boolean v11 , v0 , L androidx/room/RoomDatabase$Builder ;-> mAllowMainThreadQueries : Z
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
iget-object v2 , v0 , L androidx/room/RoomDatabase$Builder ;-> mJournalMode : L androidx/room/RoomDatabase$JournalMode ;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
invoke-virtual { v2 , v6 } , L androidx/room/RoomDatabase$JournalMode ;-> resolve ( L android/content/Context ;) L androidx/room/RoomDatabase$JournalMode ;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
move-result-object v12
iget-object v13 , v0 , L androidx/room/RoomDatabase$Builder ;-> mQueryExecutor : L java/util/concurrent/Executor ;
iget-object v14 , v0 , L androidx/room/RoomDatabase$Builder ;-> mTransactionExecutor : L java/util/concurrent/Executor ;
iget-boolean v15 , v0 , L androidx/room/RoomDatabase$Builder ;-> mMultiInstanceInvalidation : Z
iget-boolean v2 , v0 , L androidx/room/RoomDatabase$Builder ;-> mRequireMigration : Z
iget-boolean v3 , v0 , L androidx/room/RoomDatabase$Builder ;-> mAllowDestructiveMigrationOnDowngrade : Z
iget-object v4 , v0 , L androidx/room/RoomDatabase$Builder ;-> mMigrationsNotRequiredFrom : L java/util/Set ;
iget-object v5 , v0 , L androidx/room/RoomDatabase$Builder ;-> mCopyFromAssetPath : L java/lang/String ;
move-object/from16 v18 , v4
iget-object v4 , v0 , L androidx/room/RoomDatabase$Builder ;-> mCopyFromFile : L java/io/File ;
move-object/from16 v19 , v5
move-object v5 , v1
move/from16 v16 , v2
move/from16 v17 , v3
move-object/from16 v20 , v4
invoke-direct/range { v5 . . v20 } , L androidx/room/DatabaseConfiguration ;-> <init> ( L android/content/Context ;L java/lang/String ;L androidx/sqlite/db/SupportSQLiteOpenHelper$Factory ;L androidx/room/RoomDatabase$MigrationContainer ;L java/util/List ;Z L androidx/room/RoomDatabase$JournalMode ;L java/util/concurrent/Executor ;L java/util/concurrent/Executor ;ZZZ L java/util/Set ;L java/lang/String ;L java/io/File ;) V
iget-object v2 , v0 , L androidx/room/RoomDatabase$Builder ;-> mDatabaseClass : L java/lang/Class ;
const-string v3 , "_Impl"
invoke-static { v2 , v3 } , L androidx/room/Room ;-> getGeneratedImplementation ( L java/lang/Class ;L java/lang/String ;) L java/lang/Object ;
move-result-object v2
check-cast v2 , L androidx/room/RoomDatabase ;
invoke-virtual { v2 , v1 } , L androidx/room/RoomDatabase ;-> init ( L androidx/room/DatabaseConfiguration ;) V
return-object v2
:cond_a
new-instance v1 , L java/lang/IllegalArgumentException ;
const-string v2 , "Cannot create from asset or file for an in-memory database."
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
invoke-direct { v1 , v2 } , L java/lang/IllegalArgumentException ;-> <init> ( L java/lang/String ;) V
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
throw v1
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
:cond_b
new-instance v1 , L java/lang/IllegalArgumentException ;
const-string v2 , "Must provide an abstract class that extends RoomDatabase"
invoke-direct { v1 , v2 } , L java/lang/IllegalArgumentException ;-> <init> ( L java/lang/String ;) V
throw v1
:cond_c
new-instance v1 , L java/lang/IllegalArgumentException ;
const-string v2 , "Cannot provide null context for the database."
invoke-direct { v1 , v2 } , L java/lang/IllegalArgumentException ;-> <init> ( L java/lang/String ;) V
throw v1
.end method
.method public createFromAsset ( L java/lang/String ;) L androidx/room/RoomDatabase$Builder ;
.locals 0
. param p1 # Ljava/lang/String;
.annotation build L androidx/annotation/NonNull ;
.end annotation
. end param
.annotation build L androidx/annotation/NonNull ;
.end annotation
.annotation system L dalvik/annotation/Signature ;
value = {
"(" ,
"Ljava/lang/String;" ,
")" ,
"Landroidx/room/RoomDatabase$Builder<" ,
"TT;>;"
}
.end annotation
iput-object p1 , p0 , L androidx/room/RoomDatabase$Builder ;-> mCopyFromAssetPath : L java/lang/String ;
return-object p0
.end method
.method public createFromFile ( L java/io/File ;) L androidx/room/RoomDatabase$Builder ;
.locals 0
. param p1 # Ljava/io/File;
.annotation build L androidx/annotation/NonNull ;
.end annotation
. end param
.annotation build L androidx/annotation/NonNull ;
.end annotation
.annotation system L dalvik/annotation/Signature ;
value = {
"(" ,
"Ljava/io/File;" ,
")" ,
"Landroidx/room/RoomDatabase$Builder<" ,
"TT;>;"
}
.end annotation
iput-object p1 , p0 , L androidx/room/RoomDatabase$Builder ;-> mCopyFromFile : L java/io/File ;
return-object p0
2020-05-17 12:40:10 +00:00
.end method
.method public enableMultiInstanceInvalidation ( ) L androidx/room/RoomDatabase$Builder ;
.locals 1
.annotation build L androidx/annotation/NonNull ;
.end annotation
.annotation system L dalvik/annotation/Signature ;
value = {
"()" ,
"Landroidx/room/RoomDatabase$Builder<" ,
"TT;>;"
}
.end annotation
iget-object v0 , p0 , L androidx/room/RoomDatabase$Builder ;-> mName : L java/lang/String ;
if-eqz v0 , :cond_0
const/4 v0 , 0x1
goto :goto_0
:cond_0
const/4 v0 , 0x0
:goto_0
iput-boolean v0 , p0 , L androidx/room/RoomDatabase$Builder ;-> mMultiInstanceInvalidation : Z
return-object p0
.end method
.method public fallbackToDestructiveMigration ( ) L androidx/room/RoomDatabase$Builder ;
.locals 1
.annotation build L androidx/annotation/NonNull ;
.end annotation
.annotation system L dalvik/annotation/Signature ;
value = {
"()" ,
"Landroidx/room/RoomDatabase$Builder<" ,
"TT;>;"
}
.end annotation
const/4 v0 , 0x0
iput-boolean v0 , p0 , L androidx/room/RoomDatabase$Builder ;-> mRequireMigration : Z
const/4 v0 , 0x1
iput-boolean v0 , p0 , L androidx/room/RoomDatabase$Builder ;-> mAllowDestructiveMigrationOnDowngrade : Z
return-object p0
.end method
.method public varargs fallbackToDestructiveMigrationFrom ( [I ) L androidx/room/RoomDatabase$Builder ;
.locals 4
.annotation build L androidx/annotation/NonNull ;
.end annotation
.annotation system L dalvik/annotation/Signature ;
value = {
"([I)" ,
"Landroidx/room/RoomDatabase$Builder<" ,
"TT;>;"
}
.end annotation
iget-object v0 , p0 , L androidx/room/RoomDatabase$Builder ;-> mMigrationsNotRequiredFrom : L java/util/Set ;
if-nez v0 , :cond_0
new-instance v0 , L java/util/HashSet ;
array-length v1 , p1
invoke-direct { v0 , v1 } , L java/util/HashSet ;-> <init> ( I ) V
iput-object v0 , p0 , L androidx/room/RoomDatabase$Builder ;-> mMigrationsNotRequiredFrom : L java/util/Set ;
:cond_0
array-length v0 , p1
const/4 v1 , 0x0
:goto_0
if-ge v1 , v0 , :cond_1
aget v2 , p1 , v1
iget-object v3 , p0 , L androidx/room/RoomDatabase$Builder ;-> mMigrationsNotRequiredFrom : L java/util/Set ;
invoke-static { v2 } , L java/lang/Integer ;-> valueOf ( I ) L java/lang/Integer ;
move-result-object v2
invoke-interface { v3 , v2 } , L java/util/Set ;-> add ( L java/lang/Object ;) Z
add-int/lit8 v1 , v1 , 0x1
goto :goto_0
:cond_1
return-object p0
.end method
.method public fallbackToDestructiveMigrationOnDowngrade ( ) L androidx/room/RoomDatabase$Builder ;
.locals 1
.annotation build L androidx/annotation/NonNull ;
.end annotation
.annotation system L dalvik/annotation/Signature ;
value = {
"()" ,
"Landroidx/room/RoomDatabase$Builder<" ,
"TT;>;"
}
.end annotation
const/4 v0 , 0x1
iput-boolean v0 , p0 , L androidx/room/RoomDatabase$Builder ;-> mRequireMigration : Z
iput-boolean v0 , p0 , L androidx/room/RoomDatabase$Builder ;-> mAllowDestructiveMigrationOnDowngrade : Z
return-object p0
.end method
.method public openHelperFactory ( L androidx/sqlite/db/SupportSQLiteOpenHelper$Factory ;) L androidx/room/RoomDatabase$Builder ;
.locals 0
. param p1 # Landroidx/sqlite/db/SupportSQLiteOpenHelper$Factory;
.annotation build L androidx/annotation/Nullable ;
.end annotation
. end param
.annotation build L androidx/annotation/NonNull ;
.end annotation
.annotation system L dalvik/annotation/Signature ;
value = {
"(" ,
"Landroidx/sqlite/db/SupportSQLiteOpenHelper$Factory;" ,
")" ,
"Landroidx/room/RoomDatabase$Builder<" ,
"TT;>;"
}
.end annotation
iput-object p1 , p0 , L androidx/room/RoomDatabase$Builder ;-> mFactory : L androidx/sqlite/db/SupportSQLiteOpenHelper$Factory ;
return-object p0
.end method
.method public setJournalMode ( L androidx/room/RoomDatabase$JournalMode ;) L androidx/room/RoomDatabase$Builder ;
.locals 0
. param p1 # Landroidx/room/RoomDatabase$JournalMode;
.annotation build L androidx/annotation/NonNull ;
.end annotation
. end param
.annotation build L androidx/annotation/NonNull ;
.end annotation
.annotation system L dalvik/annotation/Signature ;
value = {
"(" ,
"Landroidx/room/RoomDatabase$JournalMode;" ,
")" ,
"Landroidx/room/RoomDatabase$Builder<" ,
"TT;>;"
}
.end annotation
iput-object p1 , p0 , L androidx/room/RoomDatabase$Builder ;-> mJournalMode : L androidx/room/RoomDatabase$JournalMode ;
return-object p0
.end method
.method public setQueryExecutor ( L java/util/concurrent/Executor ;) L androidx/room/RoomDatabase$Builder ;
.locals 0
. param p1 # Ljava/util/concurrent/Executor;
.annotation build L androidx/annotation/NonNull ;
.end annotation
. end param
.annotation build L androidx/annotation/NonNull ;
.end annotation
.annotation system L dalvik/annotation/Signature ;
value = {
"(" ,
"Ljava/util/concurrent/Executor;" ,
")" ,
"Landroidx/room/RoomDatabase$Builder<" ,
"TT;>;"
}
.end annotation
iput-object p1 , p0 , L androidx/room/RoomDatabase$Builder ;-> mQueryExecutor : L java/util/concurrent/Executor ;
return-object p0
.end method
.method public setTransactionExecutor ( L java/util/concurrent/Executor ;) L androidx/room/RoomDatabase$Builder ;
.locals 0
. param p1 # Ljava/util/concurrent/Executor;
.annotation build L androidx/annotation/NonNull ;
.end annotation
. end param
.annotation build L androidx/annotation/NonNull ;
.end annotation
.annotation system L dalvik/annotation/Signature ;
value = {
"(" ,
"Ljava/util/concurrent/Executor;" ,
")" ,
"Landroidx/room/RoomDatabase$Builder<" ,
"TT;>;"
}
.end annotation
iput-object p1 , p0 , L androidx/room/RoomDatabase$Builder ;-> mTransactionExecutor : L java/util/concurrent/Executor ;
return-object p0
.end method