420 lines
		
	
	
		
			10 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
			
		
		
	
	
			420 lines
		
	
	
		
			10 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
| .class public final Lio/reactivex/rxjava3/internal/schedulers/d;
 | |
| .super Ljava/lang/Object;
 | |
| .source "InstantPeriodicTask.java"
 | |
| 
 | |
| # interfaces
 | |
| .implements Ljava/util/concurrent/Callable;
 | |
| .implements Lio/reactivex/rxjava3/disposables/c;
 | |
| 
 | |
| 
 | |
| # annotations
 | |
| .annotation system Ldalvik/annotation/Signature;
 | |
|     value = {
 | |
|         "Ljava/lang/Object;",
 | |
|         "Ljava/util/concurrent/Callable<",
 | |
|         "Ljava/lang/Void;",
 | |
|         ">;",
 | |
|         "Lio/reactivex/rxjava3/disposables/c;"
 | |
|     }
 | |
| .end annotation
 | |
| 
 | |
| 
 | |
| # static fields
 | |
| .field public static final f:Ljava/util/concurrent/FutureTask;
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "Ljava/util/concurrent/FutureTask<",
 | |
|             "Ljava/lang/Void;",
 | |
|             ">;"
 | |
|         }
 | |
|     .end annotation
 | |
| .end field
 | |
| 
 | |
| 
 | |
| # instance fields
 | |
| .field public final a:Ljava/lang/Runnable;
 | |
| 
 | |
| .field public final b:Ljava/util/concurrent/atomic/AtomicReference;
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "Ljava/util/concurrent/atomic/AtomicReference<",
 | |
|             "Ljava/util/concurrent/Future<",
 | |
|             "*>;>;"
 | |
|         }
 | |
|     .end annotation
 | |
| .end field
 | |
| 
 | |
| .field public final c:Ljava/util/concurrent/atomic/AtomicReference;
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "Ljava/util/concurrent/atomic/AtomicReference<",
 | |
|             "Ljava/util/concurrent/Future<",
 | |
|             "*>;>;"
 | |
|         }
 | |
|     .end annotation
 | |
| .end field
 | |
| 
 | |
| .field public final d:Ljava/util/concurrent/ExecutorService;
 | |
| 
 | |
| .field public e:Ljava/lang/Thread;
 | |
| 
 | |
| 
 | |
| # direct methods
 | |
| .method public static constructor <clinit>()V
 | |
|     .locals 3
 | |
| 
 | |
|     .line 1
 | |
|     new-instance v0, Ljava/util/concurrent/FutureTask;
 | |
| 
 | |
|     sget-object v1, Lio/reactivex/rxjava3/internal/functions/Functions;->b:Ljava/lang/Runnable;
 | |
| 
 | |
|     const/4 v2, 0x0
 | |
| 
 | |
|     invoke-direct {v0, v1, v2}, Ljava/util/concurrent/FutureTask;-><init>(Ljava/lang/Runnable;Ljava/lang/Object;)V
 | |
| 
 | |
|     sput-object v0, Lio/reactivex/rxjava3/internal/schedulers/d;->f:Ljava/util/concurrent/FutureTask;
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public constructor <init>(Ljava/lang/Runnable;Ljava/util/concurrent/ExecutorService;)V
 | |
|     .locals 0
 | |
|     .annotation system Ldalvik/annotation/MethodParameters;
 | |
|         accessFlags = {
 | |
|             0x0,
 | |
|             0x0
 | |
|         }
 | |
|         names = {
 | |
|             "task",
 | |
|             "executor"
 | |
|         }
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     invoke-direct {p0}, Ljava/lang/Object;-><init>()V
 | |
| 
 | |
|     .line 2
 | |
|     iput-object p1, p0, Lio/reactivex/rxjava3/internal/schedulers/d;->a:Ljava/lang/Runnable;
 | |
| 
 | |
|     .line 3
 | |
|     new-instance p1, Ljava/util/concurrent/atomic/AtomicReference;
 | |
| 
 | |
|     invoke-direct {p1}, Ljava/util/concurrent/atomic/AtomicReference;-><init>()V
 | |
| 
 | |
|     iput-object p1, p0, Lio/reactivex/rxjava3/internal/schedulers/d;->c:Ljava/util/concurrent/atomic/AtomicReference;
 | |
| 
 | |
|     .line 4
 | |
|     new-instance p1, Ljava/util/concurrent/atomic/AtomicReference;
 | |
| 
 | |
|     invoke-direct {p1}, Ljava/util/concurrent/atomic/AtomicReference;-><init>()V
 | |
| 
 | |
|     iput-object p1, p0, Lio/reactivex/rxjava3/internal/schedulers/d;->b:Ljava/util/concurrent/atomic/AtomicReference;
 | |
| 
 | |
|     .line 5
 | |
|     iput-object p2, p0, Lio/reactivex/rxjava3/internal/schedulers/d;->d:Ljava/util/concurrent/ExecutorService;
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| 
 | |
| # virtual methods
 | |
| .method public a()Ljava/lang/Void;
 | |
|     .locals 2
 | |
| 
 | |
|     .line 1
 | |
|     invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     iput-object v0, p0, Lio/reactivex/rxjava3/internal/schedulers/d;->e:Ljava/lang/Thread;
 | |
| 
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     .line 2
 | |
|     :try_start_0
 | |
|     iget-object v1, p0, Lio/reactivex/rxjava3/internal/schedulers/d;->a:Ljava/lang/Runnable;
 | |
| 
 | |
|     invoke-interface {v1}, Ljava/lang/Runnable;->run()V
 | |
| 
 | |
|     .line 3
 | |
|     iput-object v0, p0, Lio/reactivex/rxjava3/internal/schedulers/d;->e:Ljava/lang/Thread;
 | |
| 
 | |
|     .line 4
 | |
|     iget-object v1, p0, Lio/reactivex/rxjava3/internal/schedulers/d;->d:Ljava/util/concurrent/ExecutorService;
 | |
| 
 | |
|     invoke-interface {v1, p0}, Ljava/util/concurrent/ExecutorService;->submit(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/Future;
 | |
| 
 | |
|     move-result-object v1
 | |
| 
 | |
|     invoke-virtual {p0, v1}, Lio/reactivex/rxjava3/internal/schedulers/d;->c(Ljava/util/concurrent/Future;)V
 | |
|     :try_end_0
 | |
|     .catchall {:try_start_0 .. :try_end_0} :catchall_0
 | |
| 
 | |
|     return-object v0
 | |
| 
 | |
|     :catchall_0
 | |
|     move-exception v1
 | |
| 
 | |
|     .line 5
 | |
|     iput-object v0, p0, Lio/reactivex/rxjava3/internal/schedulers/d;->e:Ljava/lang/Thread;
 | |
| 
 | |
|     .line 6
 | |
|     invoke-static {v1}, Lji/a;->Y(Ljava/lang/Throwable;)V
 | |
| 
 | |
|     .line 7
 | |
|     throw v1
 | |
| .end method
 | |
| 
 | |
| .method public b(Ljava/util/concurrent/Future;)V
 | |
|     .locals 2
 | |
|     .annotation system Ldalvik/annotation/MethodParameters;
 | |
|         accessFlags = {
 | |
|             0x0
 | |
|         }
 | |
|         names = {
 | |
|             "f"
 | |
|         }
 | |
|     .end annotation
 | |
| 
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "(",
 | |
|             "Ljava/util/concurrent/Future<",
 | |
|             "*>;)V"
 | |
|         }
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     :cond_0
 | |
|     iget-object v0, p0, Lio/reactivex/rxjava3/internal/schedulers/d;->c:Ljava/util/concurrent/atomic/AtomicReference;
 | |
| 
 | |
|     invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     check-cast v0, Ljava/util/concurrent/Future;
 | |
| 
 | |
|     .line 2
 | |
|     sget-object v1, Lio/reactivex/rxjava3/internal/schedulers/d;->f:Ljava/util/concurrent/FutureTask;
 | |
| 
 | |
|     if-ne v0, v1, :cond_2
 | |
| 
 | |
|     .line 3
 | |
|     iget-object v0, p0, Lio/reactivex/rxjava3/internal/schedulers/d;->e:Ljava/lang/Thread;
 | |
| 
 | |
|     invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
 | |
| 
 | |
|     move-result-object v1
 | |
| 
 | |
|     if-eq v0, v1, :cond_1
 | |
| 
 | |
|     const/4 v0, 0x1
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :cond_1
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     :goto_0
 | |
|     invoke-interface {p1, v0}, Ljava/util/concurrent/Future;->cancel(Z)Z
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     .line 4
 | |
|     :cond_2
 | |
|     iget-object v1, p0, Lio/reactivex/rxjava3/internal/schedulers/d;->c:Ljava/util/concurrent/atomic/AtomicReference;
 | |
| 
 | |
|     invoke-virtual {v1, v0, p1}, Ljava/util/concurrent/atomic/AtomicReference;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;)Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public c(Ljava/util/concurrent/Future;)V
 | |
|     .locals 2
 | |
|     .annotation system Ldalvik/annotation/MethodParameters;
 | |
|         accessFlags = {
 | |
|             0x0
 | |
|         }
 | |
|         names = {
 | |
|             "f"
 | |
|         }
 | |
|     .end annotation
 | |
| 
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "(",
 | |
|             "Ljava/util/concurrent/Future<",
 | |
|             "*>;)V"
 | |
|         }
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     :cond_0
 | |
|     iget-object v0, p0, Lio/reactivex/rxjava3/internal/schedulers/d;->b:Ljava/util/concurrent/atomic/AtomicReference;
 | |
| 
 | |
|     invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     check-cast v0, Ljava/util/concurrent/Future;
 | |
| 
 | |
|     .line 2
 | |
|     sget-object v1, Lio/reactivex/rxjava3/internal/schedulers/d;->f:Ljava/util/concurrent/FutureTask;
 | |
| 
 | |
|     if-ne v0, v1, :cond_2
 | |
| 
 | |
|     .line 3
 | |
|     iget-object v0, p0, Lio/reactivex/rxjava3/internal/schedulers/d;->e:Ljava/lang/Thread;
 | |
| 
 | |
|     invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
 | |
| 
 | |
|     move-result-object v1
 | |
| 
 | |
|     if-eq v0, v1, :cond_1
 | |
| 
 | |
|     const/4 v0, 0x1
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :cond_1
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     :goto_0
 | |
|     invoke-interface {p1, v0}, Ljava/util/concurrent/Future;->cancel(Z)Z
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     .line 4
 | |
|     :cond_2
 | |
|     iget-object v1, p0, Lio/reactivex/rxjava3/internal/schedulers/d;->b:Ljava/util/concurrent/atomic/AtomicReference;
 | |
| 
 | |
|     invoke-virtual {v1, v0, p1}, Ljava/util/concurrent/atomic/AtomicReference;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;)Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public bridge synthetic call()Ljava/lang/Object;
 | |
|     .locals 1
 | |
|     .annotation system Ldalvik/annotation/Throws;
 | |
|         value = {
 | |
|             Ljava/lang/Exception;
 | |
|         }
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p0}, Lio/reactivex/rxjava3/internal/schedulers/d;->a()Ljava/lang/Void;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     return-object v0
 | |
| .end method
 | |
| 
 | |
| .method public dispose()V
 | |
|     .locals 6
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lio/reactivex/rxjava3/internal/schedulers/d;->c:Ljava/util/concurrent/atomic/AtomicReference;
 | |
| 
 | |
|     sget-object v1, Lio/reactivex/rxjava3/internal/schedulers/d;->f:Ljava/util/concurrent/FutureTask;
 | |
| 
 | |
|     invoke-virtual {v0, v1}, Ljava/util/concurrent/atomic/AtomicReference;->getAndSet(Ljava/lang/Object;)Ljava/lang/Object;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     check-cast v0, Ljava/util/concurrent/Future;
 | |
| 
 | |
|     const/4 v2, 0x1
 | |
| 
 | |
|     const/4 v3, 0x0
 | |
| 
 | |
|     if-eqz v0, :cond_1
 | |
| 
 | |
|     if-eq v0, v1, :cond_1
 | |
| 
 | |
|     .line 2
 | |
|     iget-object v4, p0, Lio/reactivex/rxjava3/internal/schedulers/d;->e:Ljava/lang/Thread;
 | |
| 
 | |
|     invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
 | |
| 
 | |
|     move-result-object v5
 | |
| 
 | |
|     if-eq v4, v5, :cond_0
 | |
| 
 | |
|     move v4, v2
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :cond_0
 | |
|     move v4, v3
 | |
| 
 | |
|     :goto_0
 | |
|     invoke-interface {v0, v4}, Ljava/util/concurrent/Future;->cancel(Z)Z
 | |
| 
 | |
|     .line 3
 | |
|     :cond_1
 | |
|     iget-object v0, p0, Lio/reactivex/rxjava3/internal/schedulers/d;->b:Ljava/util/concurrent/atomic/AtomicReference;
 | |
| 
 | |
|     invoke-virtual {v0, v1}, Ljava/util/concurrent/atomic/AtomicReference;->getAndSet(Ljava/lang/Object;)Ljava/lang/Object;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     check-cast v0, Ljava/util/concurrent/Future;
 | |
| 
 | |
|     if-eqz v0, :cond_3
 | |
| 
 | |
|     if-eq v0, v1, :cond_3
 | |
| 
 | |
|     .line 4
 | |
|     iget-object v1, p0, Lio/reactivex/rxjava3/internal/schedulers/d;->e:Ljava/lang/Thread;
 | |
| 
 | |
|     invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
 | |
| 
 | |
|     move-result-object v4
 | |
| 
 | |
|     if-eq v1, v4, :cond_2
 | |
| 
 | |
|     goto :goto_1
 | |
| 
 | |
|     :cond_2
 | |
|     move v2, v3
 | |
| 
 | |
|     :goto_1
 | |
|     invoke-interface {v0, v2}, Ljava/util/concurrent/Future;->cancel(Z)Z
 | |
| 
 | |
|     :cond_3
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public isDisposed()Z
 | |
|     .locals 2
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lio/reactivex/rxjava3/internal/schedulers/d;->c:Ljava/util/concurrent/atomic/AtomicReference;
 | |
| 
 | |
|     invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     sget-object v1, Lio/reactivex/rxjava3/internal/schedulers/d;->f:Ljava/util/concurrent/FutureTask;
 | |
| 
 | |
|     if-ne v0, v1, :cond_0
 | |
| 
 | |
|     const/4 v0, 0x1
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :cond_0
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     :goto_0
 | |
|     return v0
 | |
| .end method
 |