.class public final Lz5/vs1;
.super Landroid/os/HandlerThread;
.source ""

# interfaces
.implements Landroid/os/Handler$Callback;


# instance fields
.field public r:Lz5/t6;

.field public s:Landroid/os/Handler;

.field public t:Ljava/lang/Error;

.field public u:Ljava/lang/RuntimeException;

.field public v:Lz5/ws1;


# direct methods
.method public constructor <init>()V
    .registers 2

    const-string v0, "ExoPlayer:DummySurface"

    invoke-direct {p0, v0}, Landroid/os/HandlerThread;-><init>(Ljava/lang/String;)V

    return-void
.end method


# virtual methods
.method public final handleMessage(Landroid/os/Message;)Z
    .registers 5

    iget v0, p1, Landroid/os/Message;->what:I

    const/4 v1, 0x1

    if-eq v0, v1, :cond_24

    const/4 p1, 0x2

    if-eq v0, p1, :cond_9

    return v1

    :cond_9
    :try_start_9
    iget-object p1, p0, Lz5/vs1;->r:Lz5/t6;
    :try_end_b
    .catchall {:try_start_9 .. :try_end_b} :catchall_15

    invoke-static {p1}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;

    :try_start_e
    invoke-virtual {p1}, Lz5/t6;->b()V
    :try_end_11
    .catchall {:try_start_e .. :try_end_11} :catchall_15

    :goto_11
    invoke-virtual {p0}, Landroid/os/HandlerThread;->quit()Z

    goto :goto_1e

    :catchall_15
    move-exception p1

    :try_start_16
    const-string v0, "DummySurface"

    const-string v2, "Failed to release dummy surface"

    invoke-static {v0, v2, p1}, Lcom/google/android/gms/internal/ads/f;->i(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
    :try_end_1d
    .catchall {:try_start_16 .. :try_end_1d} :catchall_1f

    goto :goto_11

    :goto_1e
    return v1

    :catchall_1f
    move-exception p1

    invoke-virtual {p0}, Landroid/os/HandlerThread;->quit()Z

    throw p1

    :cond_24
    :try_start_24
    iget p1, p1, Landroid/os/Message;->arg1:I

    iget-object v0, p0, Lz5/vs1;->r:Lz5/t6;
    :try_end_28
    .catch Ljava/lang/RuntimeException; {:try_start_24 .. :try_end_28} :catch_4c
    .catch Ljava/lang/Error; {:try_start_24 .. :try_end_28} :catch_4a
    .catchall {:try_start_24 .. :try_end_28} :catchall_4e

    invoke-static {v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;

    :try_start_2b
    invoke-virtual {v0, p1}, Lz5/t6;->a(I)V

    new-instance v0, Lz5/ws1;

    iget-object v2, p0, Lz5/vs1;->r:Lz5/t6;

    .line 1
    iget-object v2, v2, Lz5/t6;->w:Landroid/graphics/SurfaceTexture;

    invoke-static {v2}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;

    if-eqz p1, :cond_3b

    move p1, v1

    goto :goto_3c

    :cond_3b
    const/4 p1, 0x0

    .line 2
    :goto_3c
    invoke-direct {v0, p0, v2, p1}, Lz5/ws1;-><init>(Lz5/vs1;Landroid/graphics/SurfaceTexture;Z)V

    iput-object v0, p0, Lz5/vs1;->v:Lz5/ws1;
    :try_end_41
    .catch Ljava/lang/RuntimeException; {:try_start_2b .. :try_end_41} :catch_4c
    .catch Ljava/lang/Error; {:try_start_2b .. :try_end_41} :catch_4a
    .catchall {:try_start_2b .. :try_end_41} :catchall_4e

    monitor-enter p0

    :try_start_42
    invoke-virtual {p0}, Ljava/lang/Object;->notify()V

    monitor-exit p0

    goto :goto_70

    :catchall_47
    move-exception p1

    monitor-exit p0
    :try_end_49
    .catchall {:try_start_42 .. :try_end_49} :catchall_47

    throw p1

    :catch_4a
    move-exception p1

    goto :goto_50

    :catch_4c
    move-exception p1

    goto :goto_62

    :catchall_4e
    move-exception p1

    goto :goto_74

    :goto_50
    :try_start_50
    const-string v0, "DummySurface"

    const-string v2, "Failed to initialize dummy surface"

    invoke-static {v0, v2, p1}, Lcom/google/android/gms/internal/ads/f;->i(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V

    iput-object p1, p0, Lz5/vs1;->t:Ljava/lang/Error;
    :try_end_59
    .catchall {:try_start_50 .. :try_end_59} :catchall_4e

    monitor-enter p0

    :try_start_5a
    invoke-virtual {p0}, Ljava/lang/Object;->notify()V

    monitor-exit p0

    goto :goto_70

    :catchall_5f
    move-exception p1

    monitor-exit p0
    :try_end_61
    .catchall {:try_start_5a .. :try_end_61} :catchall_5f

    throw p1

    :goto_62
    :try_start_62
    const-string v0, "DummySurface"

    const-string v2, "Failed to initialize dummy surface"

    invoke-static {v0, v2, p1}, Lcom/google/android/gms/internal/ads/f;->i(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V

    iput-object p1, p0, Lz5/vs1;->u:Ljava/lang/RuntimeException;
    :try_end_6b
    .catchall {:try_start_62 .. :try_end_6b} :catchall_4e

    monitor-enter p0

    :try_start_6c
    invoke-virtual {p0}, Ljava/lang/Object;->notify()V

    monitor-exit p0

    :goto_70
    return v1

    :catchall_71
    move-exception p1

    monitor-exit p0
    :try_end_73
    .catchall {:try_start_6c .. :try_end_73} :catchall_71

    throw p1

    :goto_74
    monitor-enter p0

    :try_start_75
    invoke-virtual {p0}, Ljava/lang/Object;->notify()V

    monitor-exit p0
    :try_end_79
    .catchall {:try_start_75 .. :try_end_79} :catchall_7a

    throw p1

    :catchall_7a
    move-exception p1

    :try_start_7b
    monitor-exit p0
    :try_end_7c
    .catchall {:try_start_7b .. :try_end_7c} :catchall_7a

    throw p1
.end method
