WorkInitializer.smali
.class public Lcom/google/android/datatransport/runtime/scheduling/jobscheduling/WorkInitializer;
.super Ljava/lang/Object;
.source "com.google.android.datatransport:transport-runtime@@2.2.0"
# instance fields
.field private final executor:Ljava/util/concurrent/Executor;
.field private final guard:Lcom/google/android/datatransport/runtime/synchronization/SynchronizationGuard;
.field private final scheduler:Lcom/google/android/datatransport/runtime/scheduling/jobscheduling/WorkScheduler;
.field private final store:Lcom/google/android/datatransport/runtime/scheduling/persistence/EventStore;
# direct methods
.method static constructor <clinit>()V
.registers 1
return-void
.end method
.method constructor <init>(Ljava/util/concurrent/Executor;Lcom/google/android/datatransport/runtime/scheduling/persistence/EventStore;Lcom/google/android/datatransport/runtime/scheduling/jobscheduling/WorkScheduler;Lcom/google/android/datatransport/runtime/synchronization/SynchronizationGuard;)V
.registers 5
.param p1, "executor" # Ljava/util/concurrent/Executor;
.param p2, "store" # Lcom/google/android/datatransport/runtime/scheduling/persistence/EventStore;
.param p3, "scheduler" # Lcom/google/android/datatransport/runtime/scheduling/jobscheduling/WorkScheduler;
.param p4, "guard" # Lcom/google/android/datatransport/runtime/synchronization/SynchronizationGuard;
.annotation runtime Ljavax/inject/Inject;
.end annotation
.line 44
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 45
iput-object p1, p0, Lcom/google/android/datatransport/runtime/scheduling/jobscheduling/WorkInitializer;->executor:Ljava/util/concurrent/Executor;
.line 46
iput-object p2, p0, Lcom/google/android/datatransport/runtime/scheduling/jobscheduling/WorkInitializer;->store:Lcom/google/android/datatransport/runtime/scheduling/persistence/EventStore;
.line 47
iput-object p3, p0, Lcom/google/android/datatransport/runtime/scheduling/jobscheduling/WorkInitializer;->scheduler:Lcom/google/android/datatransport/runtime/scheduling/jobscheduling/WorkScheduler;
.line 48
iput-object p4, p0, Lcom/google/android/datatransport/runtime/scheduling/jobscheduling/WorkInitializer;->guard:Lcom/google/android/datatransport/runtime/synchronization/SynchronizationGuard;
.line 49
return-void
.end method
.method static synthetic lambda$ensureContextsScheduled$0(Lcom/google/android/datatransport/runtime/scheduling/jobscheduling/WorkInitializer;)Ljava/lang/Object;
.registers 5
.param p0, "this" # Lcom/google/android/datatransport/runtime/scheduling/jobscheduling/WorkInitializer;
.line 56
iget-object v0, p0, Lcom/google/android/datatransport/runtime/scheduling/jobscheduling/WorkInitializer;->store:Lcom/google/android/datatransport/runtime/scheduling/persistence/EventStore;
invoke-interface {v0}, Lcom/google/android/datatransport/runtime/scheduling/persistence/EventStore;->loadActiveContexts()Ljava/lang/Iterable;
move-result-object v0
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
move-result-object v0
:goto_a
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_1d
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcom/google/android/datatransport/runtime/TransportContext;
.line 57
.local v1, "context":Lcom/google/android/datatransport/runtime/TransportContext;
iget-object v2, p0, Lcom/google/android/datatransport/runtime/scheduling/jobscheduling/WorkInitializer;->scheduler:Lcom/google/android/datatransport/runtime/scheduling/jobscheduling/WorkScheduler;
const/4 v3, 0x1
invoke-interface {v2, v1, v3}, Lcom/google/android/datatransport/runtime/scheduling/jobscheduling/WorkScheduler;->schedule(Lcom/google/android/datatransport/runtime/TransportContext;I)V
.line 58
.end local v1 # "context":Lcom/google/android/datatransport/runtime/TransportContext;
goto :goto_a
.line 59
:cond_1d
const/4 v0, 0x0
return-object v0
.end method
.method static synthetic lambda$ensureContextsScheduled$1(Lcom/google/android/datatransport/runtime/scheduling/jobscheduling/WorkInitializer;)V
.registers 3
.param p0, "this" # Lcom/google/android/datatransport/runtime/scheduling/jobscheduling/WorkInitializer;
.line 54
iget-object v0, p0, Lcom/google/android/datatransport/runtime/scheduling/jobscheduling/WorkInitializer;->guard:Lcom/google/android/datatransport/runtime/synchronization/SynchronizationGuard;
invoke-static {p0}, Lcom/google/android/datatransport/runtime/scheduling/jobscheduling/WorkInitializer$$Lambda$2;->lambdaFactory$(Lcom/google/android/datatransport/runtime/scheduling/jobscheduling/WorkInitializer;)Lcom/google/android/datatransport/runtime/synchronization/SynchronizationGuard$CriticalSection;
move-result-object v1
invoke-interface {v0, v1}, Lcom/google/android/datatransport/runtime/synchronization/SynchronizationGuard;->runCriticalSection(Lcom/google/android/datatransport/runtime/synchronization/SynchronizationGuard$CriticalSection;)Ljava/lang/Object;
return-void
.end method
# virtual methods
.method public ensureContextsScheduled()V
.registers 3
.line 52
iget-object v0, p0, Lcom/google/android/datatransport/runtime/scheduling/jobscheduling/WorkInitializer;->executor:Ljava/util/concurrent/Executor;
invoke-static {p0}, Lcom/google/android/datatransport/runtime/scheduling/jobscheduling/WorkInitializer$$Lambda$1;->lambdaFactory$(Lcom/google/android/datatransport/runtime/scheduling/jobscheduling/WorkInitializer;)Ljava/lang/Runnable;
move-result-object v1
invoke-interface {v0, v1}, Ljava/util/concurrent/Executor;->execute(Ljava/lang/Runnable;)V
.line 61
return-void
.end method