g.smali
.class Lcom/bumptech/glide/load/engine/g;
.super Ljava/lang/Object;
# interfaces
.implements Lcom/bumptech/glide/load/engine/i;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/bumptech/glide/load/engine/g$a;
}
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<Z:",
"Ljava/lang/Object;",
">",
"Ljava/lang/Object;",
"Lcom/bumptech/glide/load/engine/i",
"<TZ;>;"
}
.end annotation
# instance fields
.field private final a:Lcom/bumptech/glide/load/engine/i;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lcom/bumptech/glide/load/engine/i",
"<TZ;>;"
}
.end annotation
.end field
.field private final b:Z
.field private c:Lcom/bumptech/glide/load/engine/g$a;
.field private d:Lcom/bumptech/glide/load/b;
.field private e:I
.field private f:Z
# direct methods
.method constructor <init>(Lcom/bumptech/glide/load/engine/i;Z)V
.registers 5
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/bumptech/glide/load/engine/i",
"<TZ;>;Z)V"
}
.end annotation
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
if-nez p1, :cond_e
new-instance v0, Ljava/lang/NullPointerException;
const-string/jumbo v1, "Wrapped resource must not be null"
invoke-direct {v0, v1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
throw v0
:cond_e
iput-object p1, p0, Lcom/bumptech/glide/load/engine/g;->a:Lcom/bumptech/glide/load/engine/i;
iput-boolean p2, p0, Lcom/bumptech/glide/load/engine/g;->b:Z
return-void
.end method
# virtual methods
.method a(Lcom/bumptech/glide/load/b;Lcom/bumptech/glide/load/engine/g$a;)V
.registers 3
iput-object p1, p0, Lcom/bumptech/glide/load/engine/g;->d:Lcom/bumptech/glide/load/b;
iput-object p2, p0, Lcom/bumptech/glide/load/engine/g;->c:Lcom/bumptech/glide/load/engine/g$a;
return-void
.end method
.method a()Z
.registers 2
iget-boolean v0, p0, Lcom/bumptech/glide/load/engine/g;->b:Z
return v0
.end method
.method public b()Ljava/lang/Object;
.registers 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()TZ;"
}
.end annotation
iget-object v0, p0, Lcom/bumptech/glide/load/engine/g;->a:Lcom/bumptech/glide/load/engine/i;
invoke-interface {v0}, Lcom/bumptech/glide/load/engine/i;->b()Ljava/lang/Object;
move-result-object v0
return-object v0
.end method
.method public c()I
.registers 2
iget-object v0, p0, Lcom/bumptech/glide/load/engine/g;->a:Lcom/bumptech/glide/load/engine/i;
invoke-interface {v0}, Lcom/bumptech/glide/load/engine/i;->c()I
move-result v0
return v0
.end method
.method public d()V
.registers 3
iget v0, p0, Lcom/bumptech/glide/load/engine/g;->e:I
if-lez v0, :cond_d
new-instance v0, Ljava/lang/IllegalStateException;
const-string/jumbo v1, "Cannot recycle a resource while it is still acquired"
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
:cond_d
iget-boolean v0, p0, Lcom/bumptech/glide/load/engine/g;->f:Z
if-eqz v0, :cond_1a
new-instance v0, Ljava/lang/IllegalStateException;
const-string/jumbo v1, "Cannot recycle a resource that has already been recycled"
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
:cond_1a
const/4 v0, 0x1
iput-boolean v0, p0, Lcom/bumptech/glide/load/engine/g;->f:Z
iget-object v0, p0, Lcom/bumptech/glide/load/engine/g;->a:Lcom/bumptech/glide/load/engine/i;
invoke-interface {v0}, Lcom/bumptech/glide/load/engine/i;->d()V
return-void
.end method
.method e()V
.registers 3
iget-boolean v0, p0, Lcom/bumptech/glide/load/engine/g;->f:Z
if-eqz v0, :cond_d
new-instance v0, Ljava/lang/IllegalStateException;
const-string/jumbo v1, "Cannot acquire a recycled resource"
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
:cond_d
invoke-static {}, Landroid/os/Looper;->getMainLooper()Landroid/os/Looper;
move-result-object v0
invoke-static {}, Landroid/os/Looper;->myLooper()Landroid/os/Looper;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v0
if-nez v0, :cond_24
new-instance v0, Ljava/lang/IllegalThreadStateException;
const-string/jumbo v1, "Must call acquire on the main thread"
invoke-direct {v0, v1}, Ljava/lang/IllegalThreadStateException;-><init>(Ljava/lang/String;)V
throw v0
:cond_24
iget v0, p0, Lcom/bumptech/glide/load/engine/g;->e:I
add-int/lit8 v0, v0, 0x1
iput v0, p0, Lcom/bumptech/glide/load/engine/g;->e:I
return-void
.end method
.method f()V
.registers 3
iget v0, p0, Lcom/bumptech/glide/load/engine/g;->e:I
if-gtz v0, :cond_d
new-instance v0, Ljava/lang/IllegalStateException;
const-string/jumbo v1, "Cannot release a recycled or not yet acquired resource"
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
:cond_d
invoke-static {}, Landroid/os/Looper;->getMainLooper()Landroid/os/Looper;
move-result-object v0
invoke-static {}, Landroid/os/Looper;->myLooper()Landroid/os/Looper;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v0
if-nez v0, :cond_24
new-instance v0, Ljava/lang/IllegalThreadStateException;
const-string/jumbo v1, "Must call release on the main thread"
invoke-direct {v0, v1}, Ljava/lang/IllegalThreadStateException;-><init>(Ljava/lang/String;)V
throw v0
:cond_24
iget v0, p0, Lcom/bumptech/glide/load/engine/g;->e:I
add-int/lit8 v0, v0, -0x1
iput v0, p0, Lcom/bumptech/glide/load/engine/g;->e:I
if-nez v0, :cond_33
iget-object v0, p0, Lcom/bumptech/glide/load/engine/g;->c:Lcom/bumptech/glide/load/engine/g$a;
iget-object v1, p0, Lcom/bumptech/glide/load/engine/g;->d:Lcom/bumptech/glide/load/b;
invoke-interface {v0, v1, p0}, Lcom/bumptech/glide/load/engine/g$a;->b(Lcom/bumptech/glide/load/b;Lcom/bumptech/glide/load/engine/g;)V
:cond_33
return-void
.end method