142 lines
3.0 KiB
Smali
142 lines
3.0 KiB
Smali
.class public abstract Lxh/b;
|
|
.super Ljava/lang/Object;
|
|
.source "MainThreadDisposable.java"
|
|
|
|
# interfaces
|
|
.implements Lio/reactivex/rxjava3/disposables/c;
|
|
|
|
|
|
# instance fields
|
|
.field public final a:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 1
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 2
|
|
new-instance v0, Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
invoke-direct {v0}, Ljava/util/concurrent/atomic/AtomicBoolean;-><init>()V
|
|
|
|
iput-object v0, p0, Lxh/b;->a:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static b()V
|
|
.locals 3
|
|
|
|
.line 1
|
|
invoke-static {}, Landroid/os/Looper;->myLooper()Landroid/os/Looper;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {}, Landroid/os/Looper;->getMainLooper()Landroid/os/Looper;
|
|
|
|
move-result-object v1
|
|
|
|
if-ne v0, v1, :cond_0
|
|
|
|
return-void
|
|
|
|
.line 2
|
|
:cond_0
|
|
new-instance v0, Ljava/lang/IllegalStateException;
|
|
|
|
const-string v1, "Expected to be called on the main thread but was "
|
|
|
|
invoke-static {v1}, Landroid/support/v4/media/d;->a(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v1
|
|
|
|
.line 3
|
|
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Ljava/lang/Thread;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public abstract a()V
|
|
.end method
|
|
|
|
.method public final dispose()V
|
|
.locals 3
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lxh/b;->a:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
invoke-virtual {v0, v1, v2}, Ljava/util/concurrent/atomic/AtomicBoolean;->compareAndSet(ZZ)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 2
|
|
invoke-static {}, Landroid/os/Looper;->myLooper()Landroid/os/Looper;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {}, Landroid/os/Looper;->getMainLooper()Landroid/os/Looper;
|
|
|
|
move-result-object v1
|
|
|
|
if-ne v0, v1, :cond_0
|
|
|
|
.line 3
|
|
invoke-virtual {p0}, Lxh/b;->a()V
|
|
|
|
goto :goto_0
|
|
|
|
.line 4
|
|
:cond_0
|
|
invoke-static {}, Lzh/b;->e()Lai/o0;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Lxh/a;
|
|
|
|
invoke-direct {v1, p0}, Lxh/a;-><init>(Lxh/b;)V
|
|
|
|
invoke-virtual {v0, v1}, Lai/o0;->f(Ljava/lang/Runnable;)Lio/reactivex/rxjava3/disposables/c;
|
|
|
|
:cond_1
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public final isDisposed()Z
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lxh/b;->a:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicBoolean;->get()Z
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|