YD_AllInOneApp/decompiled/smali/androidx/work/impl/WorkDatabaseMigrations$RescheduleMigration.smali
2026-07-06 19:54:44 +08:00

118 lines
2.9 KiB
Smali

.class public Landroidx/work/impl/WorkDatabaseMigrations$RescheduleMigration;
.super Landroidx/room/migration/Migration;
.source "WorkDatabaseMigrations.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Landroidx/work/impl/WorkDatabaseMigrations;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x9
name = "RescheduleMigration"
.end annotation
# instance fields
.field final mContext:Landroid/content/Context;
# direct methods
.method public constructor <init>(Landroid/content/Context;II)V
.locals 0
.annotation system Ldalvik/annotation/MethodParameters;
accessFlags = {
0x0,
0x0,
0x0
}
names = {
"context",
"startVersion",
"endVersion"
}
.end annotation
.line 137
invoke-direct {p0, p2, p3}, Landroidx/room/migration/Migration;-><init>(II)V
.line 138
iput-object p1, p0, Landroidx/work/impl/WorkDatabaseMigrations$RescheduleMigration;->mContext:Landroid/content/Context;
return-void
.end method
# virtual methods
.method public migrate(Landroidx/sqlite/db/SupportSQLiteDatabase;)V
.locals 5
.annotation system Ldalvik/annotation/MethodParameters;
accessFlags = {
0x0
}
names = {
"database"
}
.end annotation
.line 143
iget v0, p0, Landroidx/work/impl/WorkDatabaseMigrations$RescheduleMigration;->endVersion:I
const-string v1, "reschedule_needed"
const/4 v2, 0x0
const/4 v3, 0x1
const/16 v4, 0xa
if-lt v0, v4, :cond_0
const/4 v0, 0x2
new-array v0, v0, [Ljava/lang/Object;
aput-object v1, v0, v2
.line 144
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
aput-object v1, v0, v3
const-string v1, "INSERT OR REPLACE INTO `Preference` (`key`, `long_value`) VALUES (@key, @long_value)"
invoke-interface {p1, v1, v0}, Landroidx/sqlite/db/SupportSQLiteDatabase;->execSQL(Ljava/lang/String;[Ljava/lang/Object;)V
goto :goto_0
.line 146
:cond_0
iget-object p1, p0, Landroidx/work/impl/WorkDatabaseMigrations$RescheduleMigration;->mContext:Landroid/content/Context;
const-string v0, "androidx.work.util.preferences"
.line 147
invoke-virtual {p1, v0, v2}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
move-result-object p1
.line 151
invoke-interface {p1}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
move-result-object p1
.line 152
invoke-interface {p1, v1, v3}, Landroid/content/SharedPreferences$Editor;->putBoolean(Ljava/lang/String;Z)Landroid/content/SharedPreferences$Editor;
move-result-object p1
.line 153
invoke-interface {p1}, Landroid/content/SharedPreferences$Editor;->apply()V
:goto_0
return-void
.end method