.class public abstract Landroidx/core/app/JobIntentService; .super Landroid/app/Service; .source "SourceFile" # annotations .annotation system Ldalvik/annotation/MemberClasses; value = { Landroidx/core/app/JobIntentService$JobServiceEngineImpl;, Landroidx/core/app/JobIntentService$CompatJobEngine;, Landroidx/core/app/JobIntentService$WorkEnqueuer;, Landroidx/core/app/JobIntentService$CompatWorkItem;, Landroidx/core/app/JobIntentService$JobWorkEnqueuer;, Landroidx/core/app/JobIntentService$CompatWorkEnqueuer;, Landroidx/core/app/JobIntentService$CommandProcessor;, Landroidx/core/app/JobIntentService$GenericWorkItem; } .end annotation .annotation runtime Ljava/lang/Deprecated; .end annotation # static fields .field static final DEBUG:Z = false .field static final TAG:Ljava/lang/String; = "JobIntentService" .field static final sClassWorkEnqueuer:Ljava/util/HashMap; .annotation system Ldalvik/annotation/Signature; value = { "Ljava/util/HashMap<", "Landroid/content/ComponentName;", "Landroidx/core/app/JobIntentService$WorkEnqueuer;", ">;" } .end annotation .end field .field static final sLock:Ljava/lang/Object; # instance fields .field final mCompatQueue:Ljava/util/ArrayList; .annotation system Ldalvik/annotation/Signature; value = { "Ljava/util/ArrayList<", "Landroidx/core/app/JobIntentService$CompatWorkItem;", ">;" } .end annotation .end field .field mCompatWorkEnqueuer:Landroidx/core/app/JobIntentService$WorkEnqueuer; .field mCurProcessor:Landroidx/core/app/JobIntentService$CommandProcessor; .field mDestroyed:Z .field mInterruptIfStopped:Z .field mJobImpl:Landroidx/core/app/JobIntentService$CompatJobEngine; .field mStopped:Z # direct methods .method static constructor ()V .locals 1 .line 109 new-instance v0, Ljava/lang/Object; invoke-direct {v0}, Ljava/lang/Object;->()V sput-object v0, Landroidx/core/app/JobIntentService;->sLock:Ljava/lang/Object; .line 110 new-instance v0, Ljava/util/HashMap; invoke-direct {v0}, Ljava/util/HashMap;->()V sput-object v0, Landroidx/core/app/JobIntentService;->sClassWorkEnqueuer:Ljava/util/HashMap; return-void .end method .method public constructor ()V .locals 1 .line 420 invoke-direct {p0}, Landroid/app/Service;->()V const/4 v0, 0x0 iput-boolean v0, p0, Landroidx/core/app/JobIntentService;->mInterruptIfStopped:Z iput-boolean v0, p0, Landroidx/core/app/JobIntentService;->mStopped:Z iput-boolean v0, p0, Landroidx/core/app/JobIntentService;->mDestroyed:Z const/4 v0, 0x0 iput-object v0, p0, Landroidx/core/app/JobIntentService;->mCompatQueue:Ljava/util/ArrayList; return-void .end method .method public static enqueueWork(Landroid/content/Context;Landroid/content/ComponentName;ILandroid/content/Intent;)V .locals 2 .param p0 # Landroid/content/Context; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .param p1 # Landroid/content/ComponentName; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .param p3 # Landroid/content/Intent; .annotation build Landroidx/annotation/NonNull; .end annotation .end param if-eqz p3, :cond_0 sget-object v0, Landroidx/core/app/JobIntentService;->sLock:Ljava/lang/Object; .line 524 monitor-enter v0 const/4 v1, 0x1 .line 525 :try_start_0 invoke-static {p0, p1, v1, p2}, Landroidx/core/app/JobIntentService;->getWorkEnqueuer(Landroid/content/Context;Landroid/content/ComponentName;ZI)Landroidx/core/app/JobIntentService$WorkEnqueuer; move-result-object p0 .line 526 invoke-virtual {p0, p2}, Landroidx/core/app/JobIntentService$WorkEnqueuer;->ensureJobId(I)V .line 527 invoke-virtual {p0, p3}, Landroidx/core/app/JobIntentService$WorkEnqueuer;->enqueueWork(Landroid/content/Intent;)V .line 528 monitor-exit v0 return-void :catchall_0 move-exception p0 monitor-exit v0 :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 throw p0 .line 522 :cond_0 new-instance p0, Ljava/lang/IllegalArgumentException; const-string p1, "work must not be null" invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;->(Ljava/lang/String;)V throw p0 .end method .method public static enqueueWork(Landroid/content/Context;Ljava/lang/Class;ILandroid/content/Intent;)V .locals 1 .param p0 # Landroid/content/Context; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .param p1 # Ljava/lang/Class; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .param p3 # Landroid/content/Intent; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .annotation system Ldalvik/annotation/Signature; value = { "(", "Landroid/content/Context;", "Ljava/lang/Class<", "*>;I", "Landroid/content/Intent;", ")V" } .end annotation .line 505 new-instance v0, Landroid/content/ComponentName; invoke-direct {v0, p0, p1}, Landroid/content/ComponentName;->(Landroid/content/Context;Ljava/lang/Class;)V invoke-static {p0, v0, p2, p3}, Landroidx/core/app/JobIntentService;->enqueueWork(Landroid/content/Context;Landroid/content/ComponentName;ILandroid/content/Intent;)V return-void .end method .method public static getWorkEnqueuer(Landroid/content/Context;Landroid/content/ComponentName;ZI)Landroidx/core/app/JobIntentService$WorkEnqueuer; .locals 2 sget-object v0, Landroidx/core/app/JobIntentService;->sClassWorkEnqueuer:Ljava/util/HashMap; .line 533 invoke-virtual {v0, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object; move-result-object v1 check-cast v1, Landroidx/core/app/JobIntentService$WorkEnqueuer; if-nez v1, :cond_1 if-eqz p2, :cond_0 .line 539 new-instance v1, Landroidx/core/app/JobIntentService$JobWorkEnqueuer; invoke-direct {v1, p0, p1, p3}, Landroidx/core/app/JobIntentService$JobWorkEnqueuer;->(Landroid/content/Context;Landroid/content/ComponentName;I)V .line 543 invoke-virtual {v0, p1, v1}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; goto :goto_0 .line 537 :cond_0 new-instance p0, Ljava/lang/IllegalArgumentException; const-string p1, "Can\'t be here without a job id" invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;->(Ljava/lang/String;)V throw p0 :cond_1 :goto_0 return-object v1 .end method # virtual methods .method public dequeueWork()Landroidx/core/app/JobIntentService$GenericWorkItem; .locals 3 iget-object v0, p0, Landroidx/core/app/JobIntentService;->mJobImpl:Landroidx/core/app/JobIntentService$CompatJobEngine; if-eqz v0, :cond_0 .line 645 invoke-interface {v0}, Landroidx/core/app/JobIntentService$CompatJobEngine;->dequeueWork()Landroidx/core/app/JobIntentService$GenericWorkItem; move-result-object v0 return-object v0 :cond_0 iget-object v0, p0, Landroidx/core/app/JobIntentService;->mCompatQueue:Ljava/util/ArrayList; .line 647 monitor-enter v0 :try_start_0 iget-object v1, p0, Landroidx/core/app/JobIntentService;->mCompatQueue:Ljava/util/ArrayList; .line 648 invoke-virtual {v1}, Ljava/util/ArrayList;->size()I move-result v1 if-lez v1, :cond_1 iget-object v1, p0, Landroidx/core/app/JobIntentService;->mCompatQueue:Ljava/util/ArrayList; const/4 v2, 0x0 .line 649 invoke-virtual {v1, v2}, Ljava/util/ArrayList;->remove(I)Ljava/lang/Object; move-result-object v1 check-cast v1, Landroidx/core/app/JobIntentService$GenericWorkItem; monitor-exit v0 return-object v1 :catchall_0 move-exception v1 goto :goto_0 .line 651 :cond_1 monitor-exit v0 const/4 v0, 0x0 return-object v0 .line 653 :goto_0 monitor-exit v0 :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 throw v1 .end method .method public doStopCurrentWork()Z .locals 2 iget-object v0, p0, Landroidx/core/app/JobIntentService;->mCurProcessor:Landroidx/core/app/JobIntentService$CommandProcessor; if-eqz v0, :cond_0 iget-boolean v1, p0, Landroidx/core/app/JobIntentService;->mInterruptIfStopped:Z .line 604 invoke-virtual {v0, v1}, Landroid/os/AsyncTask;->cancel(Z)Z :cond_0 const/4 v0, 0x1 iput-boolean v0, p0, Landroidx/core/app/JobIntentService;->mStopped:Z .line 607 invoke-virtual {p0}, Landroidx/core/app/JobIntentService;->onStopCurrentWork()Z move-result v0 return v0 .end method .method public ensureProcessorRunningLocked(Z)V .locals 2 iget-object v0, p0, Landroidx/core/app/JobIntentService;->mCurProcessor:Landroidx/core/app/JobIntentService$CommandProcessor; if-nez v0, :cond_1 .line 613 new-instance v0, Landroidx/core/app/JobIntentService$CommandProcessor; invoke-direct {v0, p0}, Landroidx/core/app/JobIntentService$CommandProcessor;->(Landroidx/core/app/JobIntentService;)V iput-object v0, p0, Landroidx/core/app/JobIntentService;->mCurProcessor:Landroidx/core/app/JobIntentService$CommandProcessor; iget-object v0, p0, Landroidx/core/app/JobIntentService;->mCompatWorkEnqueuer:Landroidx/core/app/JobIntentService$WorkEnqueuer; if-eqz v0, :cond_0 if-eqz p1, :cond_0 .line 615 invoke-virtual {v0}, Landroidx/core/app/JobIntentService$WorkEnqueuer;->serviceProcessingStarted()V :cond_0 iget-object p1, p0, Landroidx/core/app/JobIntentService;->mCurProcessor:Landroidx/core/app/JobIntentService$CommandProcessor; .line 618 sget-object v0, Landroid/os/AsyncTask;->THREAD_POOL_EXECUTOR:Ljava/util/concurrent/Executor; const/4 v1, 0x0 new-array v1, v1, [Ljava/lang/Void; invoke-virtual {p1, v0, v1}, Landroid/os/AsyncTask;->executeOnExecutor(Ljava/util/concurrent/Executor;[Ljava/lang/Object;)Landroid/os/AsyncTask; :cond_1 return-void .end method .method public isStopped()Z .locals 1 iget-boolean v0, p0, Landroidx/core/app/JobIntentService;->mStopped:Z return v0 .end method .method public onBind(Landroid/content/Intent;)Landroid/os/IBinder; .locals 0 .param p1 # Landroid/content/Intent; .annotation build Landroidx/annotation/NonNull; .end annotation .end param iget-object p1, p0, Landroidx/core/app/JobIntentService;->mJobImpl:Landroidx/core/app/JobIntentService$CompatJobEngine; if-eqz p1, :cond_0 .line 470 invoke-interface {p1}, Landroidx/core/app/JobIntentService$CompatJobEngine;->compatGetBinder()Landroid/os/IBinder; move-result-object p1 return-object p1 :cond_0 const/4 p1, 0x0 return-object p1 .end method .method public onCreate()V .locals 1 .line 430 invoke-super {p0}, Landroid/app/Service;->onCreate()V .line 433 new-instance v0, Landroidx/core/app/JobIntentService$JobServiceEngineImpl; invoke-direct {v0, p0}, Landroidx/core/app/JobIntentService$JobServiceEngineImpl;->(Landroidx/core/app/JobIntentService;)V iput-object v0, p0, Landroidx/core/app/JobIntentService;->mJobImpl:Landroidx/core/app/JobIntentService$CompatJobEngine; const/4 v0, 0x0 iput-object v0, p0, Landroidx/core/app/JobIntentService;->mCompatWorkEnqueuer:Landroidx/core/app/JobIntentService$WorkEnqueuer; return-void .end method .method public onDestroy()V .locals 2 .line 480 invoke-super {p0}, Landroid/app/Service;->onDestroy()V iget-object v0, p0, Landroidx/core/app/JobIntentService;->mCompatQueue:Ljava/util/ArrayList; if-eqz v0, :cond_0 .line 482 monitor-enter v0 const/4 v1, 0x1 :try_start_0 iput-boolean v1, p0, Landroidx/core/app/JobIntentService;->mDestroyed:Z iget-object v1, p0, Landroidx/core/app/JobIntentService;->mCompatWorkEnqueuer:Landroidx/core/app/JobIntentService$WorkEnqueuer; .line 484 invoke-virtual {v1}, Landroidx/core/app/JobIntentService$WorkEnqueuer;->serviceProcessingFinished()V .line 485 monitor-exit v0 goto :goto_0 :catchall_0 move-exception v1 monitor-exit v0 :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 throw v1 :cond_0 :goto_0 return-void .end method .method public abstract onHandleWork(Landroid/content/Intent;)V .param p1 # Landroid/content/Intent; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .end method .method public onStartCommand(Landroid/content/Intent;II)I .locals 2 .param p1 # Landroid/content/Intent; .annotation build Landroidx/annotation/Nullable; .end annotation .end param iget-object p2, p0, Landroidx/core/app/JobIntentService;->mCompatQueue:Ljava/util/ArrayList; if-eqz p2, :cond_1 iget-object p2, p0, Landroidx/core/app/JobIntentService;->mCompatWorkEnqueuer:Landroidx/core/app/JobIntentService$WorkEnqueuer; .line 449 invoke-virtual {p2}, Landroidx/core/app/JobIntentService$WorkEnqueuer;->serviceStartReceived()V iget-object p2, p0, Landroidx/core/app/JobIntentService;->mCompatQueue:Ljava/util/ArrayList; .line 451 monitor-enter p2 :try_start_0 iget-object v0, p0, Landroidx/core/app/JobIntentService;->mCompatQueue:Ljava/util/ArrayList; .line 452 new-instance v1, Landroidx/core/app/JobIntentService$CompatWorkItem; if-eqz p1, :cond_0 goto :goto_0 :cond_0 new-instance p1, Landroid/content/Intent; invoke-direct {p1}, Landroid/content/Intent;->()V :goto_0 invoke-direct {v1, p0, p1, p3}, Landroidx/core/app/JobIntentService$CompatWorkItem;->(Landroidx/core/app/JobIntentService;Landroid/content/Intent;I)V invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z const/4 p1, 0x1 .line 454 invoke-virtual {p0, p1}, Landroidx/core/app/JobIntentService;->ensureProcessorRunningLocked(Z)V .line 455 monitor-exit p2 const/4 p1, 0x3 return p1 :catchall_0 move-exception p1 monitor-exit p2 :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 throw p1 :cond_1 const/4 p1, 0x2 return p1 .end method .method public onStopCurrentWork()Z .locals 1 const/4 v0, 0x1 return v0 .end method .method public processorFinished()V .locals 2 iget-object v0, p0, Landroidx/core/app/JobIntentService;->mCompatQueue:Ljava/util/ArrayList; if-eqz v0, :cond_2 .line 624 monitor-enter v0 const/4 v1, 0x0 :try_start_0 iput-object v1, p0, Landroidx/core/app/JobIntentService;->mCurProcessor:Landroidx/core/app/JobIntentService$CommandProcessor; iget-object v1, p0, Landroidx/core/app/JobIntentService;->mCompatQueue:Ljava/util/ArrayList; if-eqz v1, :cond_0 .line 634 invoke-virtual {v1}, Ljava/util/ArrayList;->size()I move-result v1 if-lez v1, :cond_0 const/4 v1, 0x0 .line 635 invoke-virtual {p0, v1}, Landroidx/core/app/JobIntentService;->ensureProcessorRunningLocked(Z)V goto :goto_0 :catchall_0 move-exception v1 goto :goto_1 :cond_0 iget-boolean v1, p0, Landroidx/core/app/JobIntentService;->mDestroyed:Z if-nez v1, :cond_1 iget-object v1, p0, Landroidx/core/app/JobIntentService;->mCompatWorkEnqueuer:Landroidx/core/app/JobIntentService$WorkEnqueuer; .line 637 invoke-virtual {v1}, Landroidx/core/app/JobIntentService$WorkEnqueuer;->serviceProcessingFinished()V .line 639 :cond_1 :goto_0 monitor-exit v0 goto :goto_2 :goto_1 monitor-exit v0 :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 throw v1 :cond_2 :goto_2 return-void .end method .method public setInterruptIfStopped(Z)V .locals 0 iput-boolean p1, p0, Landroidx/core/app/JobIntentService;->mInterruptIfStopped:Z return-void .end method