369 lines
9.5 KiB
Smali
369 lines
9.5 KiB
Smali
.class public Landroidx/work/impl/model/DependencyDao_Impl;
|
|
.super Ljava/lang/Object;
|
|
.source "DependencyDao_Impl.java"
|
|
|
|
# interfaces
|
|
.implements Landroidx/work/impl/model/DependencyDao;
|
|
|
|
|
|
# instance fields
|
|
.field private final __db:Landroidx/room/RoomDatabase;
|
|
|
|
.field private final __insertionAdapterOfDependency:Landroidx/room/EntityInsertionAdapter;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroidx/room/RoomDatabase;)V
|
|
.locals 1
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-object p1, p0, Landroidx/work/impl/model/DependencyDao_Impl;->__db:Landroidx/room/RoomDatabase;
|
|
|
|
new-instance v0, Landroidx/work/impl/model/DependencyDao_Impl$1;
|
|
|
|
invoke-direct {v0, p0, p1}, Landroidx/work/impl/model/DependencyDao_Impl$1;-><init>(Landroidx/work/impl/model/DependencyDao_Impl;Landroidx/room/RoomDatabase;)V
|
|
|
|
iput-object v0, p0, Landroidx/work/impl/model/DependencyDao_Impl;->__insertionAdapterOfDependency:Landroidx/room/EntityInsertionAdapter;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public getDependentWorkIds(Ljava/lang/String;)Ljava/util/List;
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/String;",
|
|
")",
|
|
"Ljava/util/List<",
|
|
"Ljava/lang/String;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x1
|
|
|
|
const-string v1, "SELECT work_spec_id FROM dependency WHERE prerequisite_id=?"
|
|
|
|
invoke-static {v1, v0}, Landroidx/room/RoomSQLiteQuery;->acquire(Ljava/lang/String;I)Landroidx/room/RoomSQLiteQuery;
|
|
|
|
move-result-object v1
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
invoke-virtual {v1, v0}, Landroidx/room/RoomSQLiteQuery;->bindNull(I)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-virtual {v1, v0, p1}, Landroidx/room/RoomSQLiteQuery;->bindString(ILjava/lang/String;)V
|
|
|
|
:goto_0
|
|
iget-object p1, p0, Landroidx/work/impl/model/DependencyDao_Impl;->__db:Landroidx/room/RoomDatabase;
|
|
|
|
invoke-virtual {p1, v1}, Landroidx/room/RoomDatabase;->query(Landroidx/sqlite/db/SupportSQLiteQuery;)Landroid/database/Cursor;
|
|
|
|
move-result-object p1
|
|
|
|
:try_start_0
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
invoke-interface {p1}, Landroid/database/Cursor;->getCount()I
|
|
|
|
move-result v2
|
|
|
|
invoke-direct {v0, v2}, Ljava/util/ArrayList;-><init>(I)V
|
|
|
|
:goto_1
|
|
invoke-interface {p1}, Landroid/database/Cursor;->moveToNext()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-interface {p1, v2}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-interface {v0, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
invoke-interface {p1}, Landroid/database/Cursor;->close()V
|
|
|
|
invoke-virtual {v1}, Landroidx/room/RoomSQLiteQuery;->release()V
|
|
|
|
return-object v0
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
invoke-interface {p1}, Landroid/database/Cursor;->close()V
|
|
|
|
invoke-virtual {v1}, Landroidx/room/RoomSQLiteQuery;->release()V
|
|
|
|
goto :goto_3
|
|
|
|
:goto_2
|
|
throw v0
|
|
|
|
:goto_3
|
|
goto :goto_2
|
|
.end method
|
|
|
|
.method public getPrerequisites(Ljava/lang/String;)Ljava/util/List;
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/String;",
|
|
")",
|
|
"Ljava/util/List<",
|
|
"Ljava/lang/String;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x1
|
|
|
|
const-string v1, "SELECT prerequisite_id FROM dependency WHERE work_spec_id=?"
|
|
|
|
invoke-static {v1, v0}, Landroidx/room/RoomSQLiteQuery;->acquire(Ljava/lang/String;I)Landroidx/room/RoomSQLiteQuery;
|
|
|
|
move-result-object v1
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
invoke-virtual {v1, v0}, Landroidx/room/RoomSQLiteQuery;->bindNull(I)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-virtual {v1, v0, p1}, Landroidx/room/RoomSQLiteQuery;->bindString(ILjava/lang/String;)V
|
|
|
|
:goto_0
|
|
iget-object p1, p0, Landroidx/work/impl/model/DependencyDao_Impl;->__db:Landroidx/room/RoomDatabase;
|
|
|
|
invoke-virtual {p1, v1}, Landroidx/room/RoomDatabase;->query(Landroidx/sqlite/db/SupportSQLiteQuery;)Landroid/database/Cursor;
|
|
|
|
move-result-object p1
|
|
|
|
:try_start_0
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
invoke-interface {p1}, Landroid/database/Cursor;->getCount()I
|
|
|
|
move-result v2
|
|
|
|
invoke-direct {v0, v2}, Ljava/util/ArrayList;-><init>(I)V
|
|
|
|
:goto_1
|
|
invoke-interface {p1}, Landroid/database/Cursor;->moveToNext()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-interface {p1, v2}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-interface {v0, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
invoke-interface {p1}, Landroid/database/Cursor;->close()V
|
|
|
|
invoke-virtual {v1}, Landroidx/room/RoomSQLiteQuery;->release()V
|
|
|
|
return-object v0
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
invoke-interface {p1}, Landroid/database/Cursor;->close()V
|
|
|
|
invoke-virtual {v1}, Landroidx/room/RoomSQLiteQuery;->release()V
|
|
|
|
goto :goto_3
|
|
|
|
:goto_2
|
|
throw v0
|
|
|
|
:goto_3
|
|
goto :goto_2
|
|
.end method
|
|
|
|
.method public hasCompletedAllPrerequisites(Ljava/lang/String;)Z
|
|
.locals 4
|
|
|
|
const/4 v0, 0x1
|
|
|
|
const-string v1, "SELECT COUNT(*)=0 FROM dependency WHERE work_spec_id=? AND prerequisite_id IN (SELECT id FROM workspec WHERE state!=2)"
|
|
|
|
invoke-static {v1, v0}, Landroidx/room/RoomSQLiteQuery;->acquire(Ljava/lang/String;I)Landroidx/room/RoomSQLiteQuery;
|
|
|
|
move-result-object v1
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
invoke-virtual {v1, v0}, Landroidx/room/RoomSQLiteQuery;->bindNull(I)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-virtual {v1, v0, p1}, Landroidx/room/RoomSQLiteQuery;->bindString(ILjava/lang/String;)V
|
|
|
|
:goto_0
|
|
iget-object p1, p0, Landroidx/work/impl/model/DependencyDao_Impl;->__db:Landroidx/room/RoomDatabase;
|
|
|
|
invoke-virtual {p1, v1}, Landroidx/room/RoomDatabase;->query(Landroidx/sqlite/db/SupportSQLiteQuery;)Landroid/database/Cursor;
|
|
|
|
move-result-object p1
|
|
|
|
:try_start_0
|
|
invoke-interface {p1}, Landroid/database/Cursor;->moveToFirst()Z
|
|
|
|
move-result v2
|
|
|
|
const/4 v3, 0x0
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
invoke-interface {p1, v3}, Landroid/database/Cursor;->getInt(I)I
|
|
|
|
move-result v2
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
const/4 v3, 0x1
|
|
|
|
:cond_1
|
|
invoke-interface {p1}, Landroid/database/Cursor;->close()V
|
|
|
|
invoke-virtual {v1}, Landroidx/room/RoomSQLiteQuery;->release()V
|
|
|
|
return v3
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
invoke-interface {p1}, Landroid/database/Cursor;->close()V
|
|
|
|
invoke-virtual {v1}, Landroidx/room/RoomSQLiteQuery;->release()V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public hasDependents(Ljava/lang/String;)Z
|
|
.locals 4
|
|
|
|
const/4 v0, 0x1
|
|
|
|
const-string v1, "SELECT COUNT(*)>0 FROM dependency WHERE prerequisite_id=?"
|
|
|
|
invoke-static {v1, v0}, Landroidx/room/RoomSQLiteQuery;->acquire(Ljava/lang/String;I)Landroidx/room/RoomSQLiteQuery;
|
|
|
|
move-result-object v1
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
invoke-virtual {v1, v0}, Landroidx/room/RoomSQLiteQuery;->bindNull(I)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-virtual {v1, v0, p1}, Landroidx/room/RoomSQLiteQuery;->bindString(ILjava/lang/String;)V
|
|
|
|
:goto_0
|
|
iget-object p1, p0, Landroidx/work/impl/model/DependencyDao_Impl;->__db:Landroidx/room/RoomDatabase;
|
|
|
|
invoke-virtual {p1, v1}, Landroidx/room/RoomDatabase;->query(Landroidx/sqlite/db/SupportSQLiteQuery;)Landroid/database/Cursor;
|
|
|
|
move-result-object p1
|
|
|
|
:try_start_0
|
|
invoke-interface {p1}, Landroid/database/Cursor;->moveToFirst()Z
|
|
|
|
move-result v2
|
|
|
|
const/4 v3, 0x0
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
invoke-interface {p1, v3}, Landroid/database/Cursor;->getInt(I)I
|
|
|
|
move-result v2
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
const/4 v3, 0x1
|
|
|
|
:cond_1
|
|
invoke-interface {p1}, Landroid/database/Cursor;->close()V
|
|
|
|
invoke-virtual {v1}, Landroidx/room/RoomSQLiteQuery;->release()V
|
|
|
|
return v3
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
invoke-interface {p1}, Landroid/database/Cursor;->close()V
|
|
|
|
invoke-virtual {v1}, Landroidx/room/RoomSQLiteQuery;->release()V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public insertDependency(Landroidx/work/impl/model/Dependency;)V
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Landroidx/work/impl/model/DependencyDao_Impl;->__db:Landroidx/room/RoomDatabase;
|
|
|
|
invoke-virtual {v0}, Landroidx/room/RoomDatabase;->beginTransaction()V
|
|
|
|
:try_start_0
|
|
iget-object v0, p0, Landroidx/work/impl/model/DependencyDao_Impl;->__insertionAdapterOfDependency:Landroidx/room/EntityInsertionAdapter;
|
|
|
|
invoke-virtual {v0, p1}, Landroidx/room/EntityInsertionAdapter;->insert(Ljava/lang/Object;)V
|
|
|
|
iget-object p1, p0, Landroidx/work/impl/model/DependencyDao_Impl;->__db:Landroidx/room/RoomDatabase;
|
|
|
|
invoke-virtual {p1}, Landroidx/room/RoomDatabase;->setTransactionSuccessful()V
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
iget-object p1, p0, Landroidx/work/impl/model/DependencyDao_Impl;->__db:Landroidx/room/RoomDatabase;
|
|
|
|
invoke-virtual {p1}, Landroidx/room/RoomDatabase;->endTransaction()V
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
iget-object v0, p0, Landroidx/work/impl/model/DependencyDao_Impl;->__db:Landroidx/room/RoomDatabase;
|
|
|
|
invoke-virtual {v0}, Landroidx/room/RoomDatabase;->endTransaction()V
|
|
|
|
throw p1
|
|
.end method
|