215 lines
5.3 KiB
Smali
215 lines
5.3 KiB
Smali
.class final Lorg/greenrobot/eventbus/BackgroundPoster;
|
|
.super Ljava/lang/Object;
|
|
.source "BackgroundPoster.java"
|
|
|
|
# interfaces
|
|
.implements Ljava/lang/Runnable;
|
|
|
|
|
|
# instance fields
|
|
.field private final a:Lorg/greenrobot/eventbus/PendingPostQueue;
|
|
|
|
.field private final b:Lorg/greenrobot/eventbus/EventBus;
|
|
|
|
.field private volatile c:Z
|
|
|
|
|
|
# direct methods
|
|
.method constructor <init>(Lorg/greenrobot/eventbus/EventBus;)V
|
|
.locals 0
|
|
|
|
.line 32
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 33
|
|
iput-object p1, p0, Lorg/greenrobot/eventbus/BackgroundPoster;->b:Lorg/greenrobot/eventbus/EventBus;
|
|
|
|
.line 34
|
|
new-instance p1, Lorg/greenrobot/eventbus/PendingPostQueue;
|
|
|
|
invoke-direct {p1}, Lorg/greenrobot/eventbus/PendingPostQueue;-><init>()V
|
|
|
|
iput-object p1, p0, Lorg/greenrobot/eventbus/BackgroundPoster;->a:Lorg/greenrobot/eventbus/PendingPostQueue;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a(Lorg/greenrobot/eventbus/Subscription;Ljava/lang/Object;)V
|
|
.locals 0
|
|
|
|
.line 38
|
|
invoke-static {p1, p2}, Lorg/greenrobot/eventbus/PendingPost;->a(Lorg/greenrobot/eventbus/Subscription;Ljava/lang/Object;)Lorg/greenrobot/eventbus/PendingPost;
|
|
|
|
move-result-object p1
|
|
|
|
.line 39
|
|
monitor-enter p0
|
|
|
|
.line 40
|
|
:try_start_0
|
|
iget-object p2, p0, Lorg/greenrobot/eventbus/BackgroundPoster;->a:Lorg/greenrobot/eventbus/PendingPostQueue;
|
|
|
|
invoke-virtual {p2, p1}, Lorg/greenrobot/eventbus/PendingPostQueue;->a(Lorg/greenrobot/eventbus/PendingPost;)V
|
|
|
|
.line 41
|
|
iget-boolean p1, p0, Lorg/greenrobot/eventbus/BackgroundPoster;->c:Z
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
const/4 p1, 0x1
|
|
|
|
.line 42
|
|
iput-boolean p1, p0, Lorg/greenrobot/eventbus/BackgroundPoster;->c:Z
|
|
|
|
.line 43
|
|
iget-object p1, p0, Lorg/greenrobot/eventbus/BackgroundPoster;->b:Lorg/greenrobot/eventbus/EventBus;
|
|
|
|
invoke-virtual {p1}, Lorg/greenrobot/eventbus/EventBus;->c()Ljava/util/concurrent/ExecutorService;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {p1, p0}, Ljava/util/concurrent/ExecutorService;->execute(Ljava/lang/Runnable;)V
|
|
|
|
.line 45
|
|
:cond_0
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
monitor-exit p0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public run()V
|
|
.locals 5
|
|
|
|
:goto_0
|
|
const/4 v0, 0x0
|
|
|
|
.line 53
|
|
:try_start_0
|
|
iget-object v1, p0, Lorg/greenrobot/eventbus/BackgroundPoster;->a:Lorg/greenrobot/eventbus/PendingPostQueue;
|
|
|
|
const/16 v2, 0x3e8
|
|
|
|
invoke-virtual {v1, v2}, Lorg/greenrobot/eventbus/PendingPostQueue;->a(I)Lorg/greenrobot/eventbus/PendingPost;
|
|
|
|
move-result-object v1
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
.line 55
|
|
monitor-enter p0
|
|
:try_end_0
|
|
.catch Ljava/lang/InterruptedException; {:try_start_0 .. :try_end_0} :catch_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_1
|
|
|
|
.line 57
|
|
:try_start_1
|
|
iget-object v1, p0, Lorg/greenrobot/eventbus/BackgroundPoster;->a:Lorg/greenrobot/eventbus/PendingPostQueue;
|
|
|
|
invoke-virtual {v1}, Lorg/greenrobot/eventbus/PendingPostQueue;->a()Lorg/greenrobot/eventbus/PendingPost;
|
|
|
|
move-result-object v1
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
.line 59
|
|
iput-boolean v0, p0, Lorg/greenrobot/eventbus/BackgroundPoster;->c:Z
|
|
|
|
.line 60
|
|
monitor-exit p0
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
.line 70
|
|
iput-boolean v0, p0, Lorg/greenrobot/eventbus/BackgroundPoster;->c:Z
|
|
|
|
return-void
|
|
|
|
.line 62
|
|
:cond_0
|
|
:try_start_2
|
|
monitor-exit p0
|
|
|
|
goto :goto_1
|
|
|
|
:catchall_0
|
|
move-exception v1
|
|
|
|
monitor-exit p0
|
|
:try_end_2
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_0
|
|
|
|
:try_start_3
|
|
throw v1
|
|
|
|
.line 64
|
|
:cond_1
|
|
:goto_1
|
|
iget-object v2, p0, Lorg/greenrobot/eventbus/BackgroundPoster;->b:Lorg/greenrobot/eventbus/EventBus;
|
|
|
|
invoke-virtual {v2, v1}, Lorg/greenrobot/eventbus/EventBus;->a(Lorg/greenrobot/eventbus/PendingPost;)V
|
|
:try_end_3
|
|
.catch Ljava/lang/InterruptedException; {:try_start_3 .. :try_end_3} :catch_0
|
|
.catchall {:try_start_3 .. :try_end_3} :catchall_1
|
|
|
|
goto :goto_0
|
|
|
|
:catchall_1
|
|
move-exception v1
|
|
|
|
goto :goto_2
|
|
|
|
:catch_0
|
|
move-exception v1
|
|
|
|
:try_start_4
|
|
const-string v2, "Event"
|
|
|
|
.line 67
|
|
new-instance v3, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v4}, Ljava/lang/Thread;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v4, " was interruppted"
|
|
|
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-static {v2, v3, v1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
|
|
:try_end_4
|
|
.catchall {:try_start_4 .. :try_end_4} :catchall_1
|
|
|
|
.line 70
|
|
iput-boolean v0, p0, Lorg/greenrobot/eventbus/BackgroundPoster;->c:Z
|
|
|
|
return-void
|
|
|
|
:goto_2
|
|
iput-boolean v0, p0, Lorg/greenrobot/eventbus/BackgroundPoster;->c:Z
|
|
|
|
throw v1
|
|
.end method
|