Files
vtosters/smali/smali_classes5/org/webrtc/videoengine/ThreadUtils$ThreadChecker.smali
T
2022-03-24 19:37:43 +03:00

88 lines
1.9 KiB
Smali

.class public Lorg/webrtc/videoengine/ThreadUtils$ThreadChecker;
.super Ljava/lang/Object;
.source "ThreadUtils.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lorg/webrtc/videoengine/ThreadUtils;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x9
name = "ThreadChecker"
.end annotation
# instance fields
.field private thread:Ljava/lang/Thread;
# direct methods
.method public constructor <init>()V
.locals 1
.line 24
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 25
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
move-result-object v0
iput-object v0, p0, Lorg/webrtc/videoengine/ThreadUtils$ThreadChecker;->thread:Ljava/lang/Thread;
return-void
.end method
# virtual methods
.method public checkIsOnValidThread()V
.locals 2
.line 28
iget-object v0, p0, Lorg/webrtc/videoengine/ThreadUtils$ThreadChecker;->thread:Ljava/lang/Thread;
if-nez v0, :cond_0
.line 29
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
move-result-object v0
iput-object v0, p0, Lorg/webrtc/videoengine/ThreadUtils$ThreadChecker;->thread:Ljava/lang/Thread;
.line 31
:cond_0
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
move-result-object v0
iget-object v1, p0, Lorg/webrtc/videoengine/ThreadUtils$ThreadChecker;->thread:Ljava/lang/Thread;
if-eq v0, v1, :cond_1
.line 32
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "Wrong thread"
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
:cond_1
return-void
.end method
.method public detachThread()V
.locals 1
const/4 v0, 0x0
.line 37
iput-object v0, p0, Lorg/webrtc/videoengine/ThreadUtils$ThreadChecker;->thread:Ljava/lang/Thread;
return-void
.end method