2019-07-24 11:27:29 +00:00
.class public abstract L androidx/work/impl/WorkDatabase ;
.super L androidx/room/RoomDatabase ;
.source "WorkDatabase.java"
2019-12-06 03:29:40 +00:00
# annotations
.annotation build L androidx/annotation/RestrictTo ;
value = {
.enum L androidx/annotation/RestrictTo$Scope ;-> LIBRARY_GROUP : L androidx/annotation/RestrictTo$Scope ;
}
.end annotation
.annotation build L androidx/room/Database ;
entities = {
L androidx/work/impl/model/Dependency ;,
L androidx/work/impl/model/WorkSpec ;,
L androidx/work/impl/model/WorkTag ;,
L androidx/work/impl/model/SystemIdInfo ;,
L androidx/work/impl/model/WorkName ;
}
version = 0x6
.end annotation
.annotation build L androidx/room/TypeConverters ;
value = {
L androidx/work/Data ;,
L androidx/work/impl/model/WorkTypeConverters ;
}
.end annotation
2019-07-24 11:27:29 +00:00
# static fields
2019-12-06 03:29:40 +00:00
.field public static final DB_NAME : L java/lang/String ; = "androidx.work.workdb"
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public static final PRUNE_SQL_FORMAT_PREFIX : L java/lang/String ; = "DELETE FROM workspec WHERE state IN (2, 3, 5) AND (period_start_time + minimum_retention_duration) < "
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public static final PRUNE_SQL_FORMAT_SUFFIX : L java/lang/String ; = " AND (SELECT COUNT(*)=0 FROM dependency WHERE prerequisite_id=id AND work_spec_id NOT IN (SELECT id FROM workspec WHERE state IN (2, 3, 5)))"
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public static final PRUNE_THRESHOLD_MILLIS : J
2019-07-24 11:27:29 +00:00
# direct methods
2019-12-06 03:29:40 +00:00
.method public static constructor <clinit> ( ) V
2019-07-24 11:27:29 +00:00
.locals 3
sget-object v0 , L java/util/concurrent/TimeUnit ;-> DAYS : L java/util/concurrent/TimeUnit ;
const-wide/16 v1 , 0x7
invoke-virtual { v0 , v1 , v2 } , L java/util/concurrent/TimeUnit ;-> toMillis ( J ) J
move-result-wide v0
sput-wide v0 , L androidx/work/impl/WorkDatabase ;-> PRUNE_THRESHOLD_MILLIS : J
return-void
.end method
.method public constructor <init> ( ) V
.locals 0
invoke-direct { p0 } , L androidx/room/RoomDatabase ;-> <init> ( ) V
return-void
.end method
2019-10-07 23:23:22 +00:00
.method public static create ( L android/content/Context ;L java/util/concurrent/Executor ;Z ) L androidx/work/impl/WorkDatabase ;
.locals 5
2019-12-06 03:29:40 +00:00
. param p0 # Landroid/content/Context;
.annotation build L androidx/annotation/NonNull ;
.end annotation
. end param
. param p1 # Ljava/util/concurrent/Executor;
.annotation build L androidx/annotation/NonNull ;
.end annotation
. end param
2019-07-24 11:27:29 +00:00
2019-08-30 20:04:20 +00:00
const-class v0 , L androidx/work/impl/WorkDatabase ;
2019-07-24 11:27:29 +00:00
2019-10-07 23:23:22 +00:00
if-eqz p2 , :cond_0
2019-07-24 11:27:29 +00:00
2019-08-30 20:04:20 +00:00
invoke-static { p0 , v0 } , L androidx/room/Room ;-> inMemoryDatabaseBuilder ( L android/content/Context ;L java/lang/Class ;) L androidx/room/RoomDatabase$Builder ;
2019-07-24 11:27:29 +00:00
move-result-object p1
invoke-virtual { p1 } , L androidx/room/RoomDatabase$Builder ;-> allowMainThreadQueries ( ) L androidx/room/RoomDatabase$Builder ;
move-result-object p1
goto :goto_0
:cond_0
2019-10-07 23:23:22 +00:00
const-string p2 , "androidx.work.workdb"
invoke-static { p0 , v0 , p2 } , L androidx/room/Room ;-> databaseBuilder ( L android/content/Context ;L java/lang/Class ;L java/lang/String ;) L androidx/room/RoomDatabase$Builder ;
2019-07-24 11:27:29 +00:00
2019-10-07 23:23:22 +00:00
move-result-object p2
invoke-virtual { p2 , p1 } , L androidx/room/RoomDatabase$Builder ;-> setQueryExecutor ( L java/util/concurrent/Executor ;) L androidx/room/RoomDatabase$Builder ;
2019-07-24 11:27:29 +00:00
move-result-object p1
:goto_0
invoke-static { } , L androidx/work/impl/WorkDatabase ;-> generateCleanupCallback ( ) L androidx/room/RoomDatabase$Callback ;
2019-10-07 23:23:22 +00:00
move-result-object p2
2019-07-24 11:27:29 +00:00
2019-10-07 23:23:22 +00:00
invoke-virtual { p1 , p2 } , L androidx/room/RoomDatabase$Builder ;-> addCallback ( L androidx/room/RoomDatabase$Callback ;) L androidx/room/RoomDatabase$Builder ;
2019-07-24 11:27:29 +00:00
move-result-object p1
2019-10-07 23:23:22 +00:00
const/4 p2 , 0x1
2019-07-24 11:27:29 +00:00
2019-10-07 23:23:22 +00:00
new-array v0 , p2 , [ L androidx/room/migration/Migration ;
2019-07-24 11:27:29 +00:00
2019-10-07 23:23:22 +00:00
sget-object v1 , L androidx/work/impl/WorkDatabaseMigrations ;-> MIGRATION_1_2 : L androidx/room/migration/Migration ;
2019-07-24 11:27:29 +00:00
2019-10-07 23:23:22 +00:00
const/4 v2 , 0x0
2019-07-24 11:27:29 +00:00
2019-10-07 23:23:22 +00:00
aput-object v1 , v0 , v2
2019-07-24 11:27:29 +00:00
2019-10-07 23:23:22 +00:00
invoke-virtual { p1 , v0 } , L androidx/room/RoomDatabase$Builder ;-> addMigrations ( [ L androidx/room/migration/Migration ;) L androidx/room/RoomDatabase$Builder ;
2019-07-24 11:27:29 +00:00
move-result-object p1
2019-10-07 23:23:22 +00:00
new-array v0 , p2 , [ L androidx/room/migration/Migration ;
2019-07-24 11:27:29 +00:00
2019-10-07 23:23:22 +00:00
new-instance v1 , L androidx/work/impl/WorkDatabaseMigrations$WorkMigration ;
2019-07-24 11:27:29 +00:00
2019-10-07 23:23:22 +00:00
const/4 v3 , 0x2
2019-07-24 11:27:29 +00:00
2019-10-07 23:23:22 +00:00
const/4 v4 , 0x3
2019-07-24 11:27:29 +00:00
2019-10-07 23:23:22 +00:00
invoke-direct { v1 , p0 , v3 , v4 } , L androidx/work/impl/WorkDatabaseMigrations$WorkMigration ;-> <init> ( L android/content/Context ;II ) V
2019-07-24 11:27:29 +00:00
2019-10-07 23:23:22 +00:00
aput-object v1 , v0 , v2
2019-07-24 11:27:29 +00:00
2019-10-07 23:23:22 +00:00
invoke-virtual { p1 , v0 } , L androidx/room/RoomDatabase$Builder ;-> addMigrations ( [ L androidx/room/migration/Migration ;) L androidx/room/RoomDatabase$Builder ;
2019-07-24 11:27:29 +00:00
2019-10-07 23:23:22 +00:00
move-result-object p1
2019-07-24 11:27:29 +00:00
2019-10-07 23:23:22 +00:00
new-array v0 , p2 , [ L androidx/room/migration/Migration ;
2019-07-24 11:27:29 +00:00
sget-object v1 , L androidx/work/impl/WorkDatabaseMigrations ;-> MIGRATION_3_4 : L androidx/room/migration/Migration ;
2019-10-07 23:23:22 +00:00
aput-object v1 , v0 , v2
2019-07-24 11:27:29 +00:00
2019-10-07 23:23:22 +00:00
invoke-virtual { p1 , v0 } , L androidx/room/RoomDatabase$Builder ;-> addMigrations ( [ L androidx/room/migration/Migration ;) L androidx/room/RoomDatabase$Builder ;
2019-07-24 11:27:29 +00:00
2019-10-07 23:23:22 +00:00
move-result-object p1
new-array v0 , p2 , [ L androidx/room/migration/Migration ;
sget-object v1 , L androidx/work/impl/WorkDatabaseMigrations ;-> MIGRATION_4_5 : L androidx/room/migration/Migration ;
aput-object v1 , v0 , v2
invoke-virtual { p1 , v0 } , L androidx/room/RoomDatabase$Builder ;-> addMigrations ( [ L androidx/room/migration/Migration ;) L androidx/room/RoomDatabase$Builder ;
move-result-object p1
new-array p2 , p2 , [ L androidx/room/migration/Migration ;
new-instance v0 , L androidx/work/impl/WorkDatabaseMigrations$WorkMigration ;
const/4 v1 , 0x5
2019-07-24 11:27:29 +00:00
2019-10-07 23:23:22 +00:00
const/4 v3 , 0x6
2019-07-24 11:27:29 +00:00
2019-10-07 23:23:22 +00:00
invoke-direct { v0 , p0 , v1 , v3 } , L androidx/work/impl/WorkDatabaseMigrations$WorkMigration ;-> <init> ( L android/content/Context ;II ) V
2019-07-24 11:27:29 +00:00
2019-10-07 23:23:22 +00:00
aput-object v0 , p2 , v2
2019-07-24 11:27:29 +00:00
2019-10-07 23:23:22 +00:00
invoke-virtual { p1 , p2 } , L androidx/room/RoomDatabase$Builder ;-> addMigrations ( [ L androidx/room/migration/Migration ;) L androidx/room/RoomDatabase$Builder ;
2019-07-24 11:27:29 +00:00
move-result-object p0
invoke-virtual { p0 } , L androidx/room/RoomDatabase$Builder ;-> fallbackToDestructiveMigration ( ) L androidx/room/RoomDatabase$Builder ;
move-result-object p0
invoke-virtual { p0 } , L androidx/room/RoomDatabase$Builder ;-> build ( ) L androidx/room/RoomDatabase ;
move-result-object p0
check-cast p0 , L androidx/work/impl/WorkDatabase ;
return-object p0
.end method
2019-12-06 03:29:40 +00:00
.method public static generateCleanupCallback ( ) L androidx/room/RoomDatabase$Callback ;
2019-07-24 11:27:29 +00:00
.locals 1
new-instance v0 , L androidx/work/impl/WorkDatabase$1 ;
invoke-direct { v0 } , L androidx/work/impl/WorkDatabase$1 ;-> <init> ( ) V
return-object v0
.end method
2019-12-06 03:29:40 +00:00
.method public static getPruneDate ( ) J
2019-07-24 11:27:29 +00:00
.locals 4
invoke-static { } , L java/lang/System ;-> currentTimeMillis ( ) J
move-result-wide v0
sget-wide v2 , L androidx/work/impl/WorkDatabase ;-> PRUNE_THRESHOLD_MILLIS : J
sub-long/2addr v0 , v2
return-wide v0
.end method
2019-12-06 03:29:40 +00:00
.method public static getPruneSQL ( ) L java/lang/String ;
2019-07-24 11:27:29 +00:00
.locals 3
2019-12-06 03:29:40 +00:00
const-string v0 , "DELETE FROM workspec WHERE state IN (2, 3, 5) AND (period_start_time + minimum_retention_duration) < "
2019-07-24 11:27:29 +00:00
2020-04-27 20:53:11 +00:00
invoke-static { v0 } , L e/e/b/a/a ;-> a ( L java/lang/String ;) L java/lang/StringBuilder ;
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
move-result-object v0
2019-07-24 11:27:29 +00:00
invoke-static { } , L androidx/work/impl/WorkDatabase ;-> getPruneDate ( ) J
move-result-wide v1
invoke-virtual { v0 , v1 , v2 } , L java/lang/StringBuilder ;-> append ( J ) L java/lang/StringBuilder ;
const-string v1 , " AND (SELECT COUNT(*)=0 FROM dependency WHERE prerequisite_id=id AND work_spec_id NOT IN (SELECT id FROM workspec WHERE state IN (2, 3, 5)))"
invoke-virtual { v0 , v1 } , L java/lang/StringBuilder ;-> append ( L java/lang/String ;) L java/lang/StringBuilder ;
invoke-virtual { v0 } , L java/lang/StringBuilder ;-> toString ( ) L java/lang/String ;
move-result-object v0
return-object v0
.end method
# virtual methods
.method public abstract dependencyDao ( ) L androidx/work/impl/model/DependencyDao ;
.end method
.method public abstract systemIdInfoDao ( ) L androidx/work/impl/model/SystemIdInfoDao ;
.end method
.method public abstract workNameDao ( ) L androidx/work/impl/model/WorkNameDao ;
.end method
.method public abstract workSpecDao ( ) L androidx/work/impl/model/WorkSpecDao ;
.end method
.method public abstract workTagDao ( ) L androidx/work/impl/model/WorkTagDao ;
.end method