BackgroundPoster.smali
.class final Lorg/greenrobot/eventbus/BackgroundPoster;
.super Ljava/lang/Object;
# interfaces
.implements Ljava/lang/Runnable;
.implements Lorg/greenrobot/eventbus/Poster;
# instance fields
.field private final f:Lorg/greenrobot/eventbus/PendingPostQueue;
.field private final g:Lorg/greenrobot/eventbus/EventBus;
.field private volatile h:Z
# direct methods
.method constructor <init>(Lorg/greenrobot/eventbus/EventBus;)V
.registers 2
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lorg/greenrobot/eventbus/BackgroundPoster;->g:Lorg/greenrobot/eventbus/EventBus;
new-instance p1, Lorg/greenrobot/eventbus/PendingPostQueue;
invoke-direct {p1}, Lorg/greenrobot/eventbus/PendingPostQueue;-><init>()V
iput-object p1, p0, Lorg/greenrobot/eventbus/BackgroundPoster;->f:Lorg/greenrobot/eventbus/PendingPostQueue;
return-void
.end method
# virtual methods
.method public a(Lorg/greenrobot/eventbus/Subscription;Ljava/lang/Object;)V
.registers 3
invoke-static {p1, p2}, Lorg/greenrobot/eventbus/PendingPost;->a(Lorg/greenrobot/eventbus/Subscription;Ljava/lang/Object;)Lorg/greenrobot/eventbus/PendingPost;
move-result-object p1
monitor-enter p0
:try_start_5
iget-object p2, p0, Lorg/greenrobot/eventbus/BackgroundPoster;->f:Lorg/greenrobot/eventbus/PendingPostQueue;
invoke-virtual {p2, p1}, Lorg/greenrobot/eventbus/PendingPostQueue;->a(Lorg/greenrobot/eventbus/PendingPost;)V
iget-boolean p1, p0, Lorg/greenrobot/eventbus/BackgroundPoster;->h:Z
if-nez p1, :cond_1a
const/4 p1, 0x1
iput-boolean p1, p0, Lorg/greenrobot/eventbus/BackgroundPoster;->h:Z
iget-object p1, p0, Lorg/greenrobot/eventbus/BackgroundPoster;->g:Lorg/greenrobot/eventbus/EventBus;
invoke-virtual {p1}, Lorg/greenrobot/eventbus/EventBus;->e()Ljava/util/concurrent/ExecutorService;
move-result-object p1
invoke-interface {p1, p0}, Ljava/util/concurrent/ExecutorService;->execute(Ljava/lang/Runnable;)V
:cond_1a
monitor-exit p0
return-void
:catchall_1c
move-exception p1
monitor-exit p0
:try_end_1e
.catchall {:try_start_5 .. :try_end_1e} :catchall_1c
throw p1
.end method
.method public run()V
.registers 7
:goto_0
const/4 v0, 0x0
:try_start_1
iget-object v1, p0, Lorg/greenrobot/eventbus/BackgroundPoster;->f:Lorg/greenrobot/eventbus/PendingPostQueue;
const/16 v2, 0x3e8
invoke-virtual {v1, v2}, Lorg/greenrobot/eventbus/PendingPostQueue;->c(I)Lorg/greenrobot/eventbus/PendingPost;
move-result-object v1
if-nez v1, :cond_1f
monitor-enter p0
:try_end_c
.catch Ljava/lang/InterruptedException; {:try_start_1 .. :try_end_c} :catch_27
.catchall {:try_start_1 .. :try_end_c} :catchall_25
:try_start_c
iget-object v1, p0, Lorg/greenrobot/eventbus/BackgroundPoster;->f:Lorg/greenrobot/eventbus/PendingPostQueue;
invoke-virtual {v1}, Lorg/greenrobot/eventbus/PendingPostQueue;->b()Lorg/greenrobot/eventbus/PendingPost;
move-result-object v1
if-nez v1, :cond_1a
iput-boolean v0, p0, Lorg/greenrobot/eventbus/BackgroundPoster;->h:Z
monitor-exit p0
:try_end_17
.catchall {:try_start_c .. :try_end_17} :catchall_1c
iput-boolean v0, p0, Lorg/greenrobot/eventbus/BackgroundPoster;->h:Z
return-void
:cond_1a
:try_start_1a
monitor-exit p0
goto :goto_1f
:catchall_1c
move-exception v1
monitor-exit p0
:try_end_1e
.catchall {:try_start_1a .. :try_end_1e} :catchall_1c
:try_start_1e
throw v1
:cond_1f
:goto_1f
iget-object v2, p0, Lorg/greenrobot/eventbus/BackgroundPoster;->g:Lorg/greenrobot/eventbus/EventBus;
invoke-virtual {v2, v1}, Lorg/greenrobot/eventbus/EventBus;->h(Lorg/greenrobot/eventbus/PendingPost;)V
:try_end_24
.catch Ljava/lang/InterruptedException; {:try_start_1e .. :try_end_24} :catch_27
.catchall {:try_start_1e .. :try_end_24} :catchall_25
goto :goto_0
:catchall_25
move-exception v1
goto :goto_4f
:catch_27
move-exception v1
:try_start_28
iget-object v2, p0, Lorg/greenrobot/eventbus/BackgroundPoster;->g:Lorg/greenrobot/eventbus/EventBus;
invoke-virtual {v2}, Lorg/greenrobot/eventbus/EventBus;->f()Lorg/greenrobot/eventbus/Logger;
move-result-object v2
sget-object v3, Ljava/util/logging/Level;->WARNING:Ljava/util/logging/Level;
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
move-result-object v5
invoke-virtual {v5}, Ljava/lang/Thread;->getName()Ljava/lang/String;
move-result-object v5
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v5, " was interruppted"
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v4
invoke-interface {v2, v3, v4, v1}, Lorg/greenrobot/eventbus/Logger;->b(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V
:try_end_4c
.catchall {:try_start_28 .. :try_end_4c} :catchall_25
iput-boolean v0, p0, Lorg/greenrobot/eventbus/BackgroundPoster;->h:Z
return-void
:goto_4f
iput-boolean v0, p0, Lorg/greenrobot/eventbus/BackgroundPoster;->h:Z
throw v1
.end method