BiConsumerSingleObserver.smali 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. .class public final Lio/reactivex/internal/observers/BiConsumerSingleObserver;
  2. .super Ljava/util/concurrent/atomic/AtomicReference;
  3. .source "BiConsumerSingleObserver.java"
  4. # interfaces
  5. .implements Lio/reactivex/SingleObserver;
  6. .implements Lio/reactivex/disposables/Disposable;
  7. # annotations
  8. .annotation system Ldalvik/annotation/Signature;
  9. value = {
  10. "<T:",
  11. "Ljava/lang/Object;",
  12. ">",
  13. "Ljava/util/concurrent/atomic/AtomicReference<",
  14. "Lio/reactivex/disposables/Disposable;",
  15. ">;",
  16. "Lio/reactivex/SingleObserver<",
  17. "TT;>;",
  18. "Lio/reactivex/disposables/Disposable;"
  19. }
  20. .end annotation
  21. # static fields
  22. .field private static final serialVersionUID:J = 0x44996dc9ab295821L
  23. # instance fields
  24. .field final onCallback:Lio/reactivex/functions/BiConsumer;
  25. .annotation system Ldalvik/annotation/Signature;
  26. value = {
  27. "Lio/reactivex/functions/BiConsumer<",
  28. "-TT;-",
  29. "Ljava/lang/Throwable;",
  30. ">;"
  31. }
  32. .end annotation
  33. .end field
  34. # direct methods
  35. .method public constructor <init>(Lio/reactivex/functions/BiConsumer;)V
  36. .locals 0
  37. .annotation system Ldalvik/annotation/Signature;
  38. value = {
  39. "(",
  40. "Lio/reactivex/functions/BiConsumer<",
  41. "-TT;-",
  42. "Ljava/lang/Throwable;",
  43. ">;)V"
  44. }
  45. .end annotation
  46. .line 33
  47. invoke-direct {p0}, Ljava/util/concurrent/atomic/AtomicReference;-><init>()V
  48. .line 34
  49. iput-object p1, p0, Lio/reactivex/internal/observers/BiConsumerSingleObserver;->onCallback:Lio/reactivex/functions/BiConsumer;
  50. return-void
  51. .end method
  52. # virtual methods
  53. .method public dispose()V
  54. .locals 0
  55. .line 64
  56. invoke-static {p0}, Lio/reactivex/internal/disposables/DisposableHelper;->dispose(Ljava/util/concurrent/atomic/AtomicReference;)Z
  57. return-void
  58. .end method
  59. .method public isDisposed()Z
  60. .locals 2
  61. .line 69
  62. invoke-virtual {p0}, Lio/reactivex/internal/observers/BiConsumerSingleObserver;->get()Ljava/lang/Object;
  63. move-result-object v0
  64. sget-object v1, Lio/reactivex/internal/disposables/DisposableHelper;->DISPOSED:Lio/reactivex/internal/disposables/DisposableHelper;
  65. if-ne v0, v1, :cond_0
  66. const/4 v0, 0x1
  67. goto :goto_0
  68. :cond_0
  69. const/4 v0, 0x0
  70. :goto_0
  71. return v0
  72. .end method
  73. .method public onError(Ljava/lang/Throwable;)V
  74. .locals 4
  75. .line 40
  76. :try_start_0
  77. iget-object v0, p0, Lio/reactivex/internal/observers/BiConsumerSingleObserver;->onCallback:Lio/reactivex/functions/BiConsumer;
  78. const/4 v1, 0x0
  79. invoke-interface {v0, v1, p1}, Lio/reactivex/functions/BiConsumer;->accept(Ljava/lang/Object;Ljava/lang/Object;)V
  80. :try_end_0
  81. .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0
  82. goto :goto_0
  83. :catch_0
  84. move-exception v0
  85. .line 42
  86. invoke-static {v0}, Lio/reactivex/exceptions/Exceptions;->throwIfFatal(Ljava/lang/Throwable;)V
  87. .line 43
  88. new-instance v1, Lio/reactivex/exceptions/CompositeException;
  89. const/4 v2, 0x2
  90. new-array v2, v2, [Ljava/lang/Throwable;
  91. const/4 v3, 0x0
  92. aput-object p1, v2, v3
  93. const/4 p1, 0x1
  94. aput-object v0, v2, p1
  95. invoke-direct {v1, v2}, Lio/reactivex/exceptions/CompositeException;-><init>([Ljava/lang/Throwable;)V
  96. invoke-static {v1}, Lio/reactivex/plugins/RxJavaPlugins;->onError(Ljava/lang/Throwable;)V
  97. :goto_0
  98. return-void
  99. .end method
  100. .method public onSubscribe(Lio/reactivex/disposables/Disposable;)V
  101. .locals 0
  102. .line 49
  103. invoke-static {p0, p1}, Lio/reactivex/internal/disposables/DisposableHelper;->setOnce(Ljava/util/concurrent/atomic/AtomicReference;Lio/reactivex/disposables/Disposable;)Z
  104. return-void
  105. .end method
  106. .method public onSuccess(Ljava/lang/Object;)V
  107. .locals 2
  108. .annotation system Ldalvik/annotation/Signature;
  109. value = {
  110. "(TT;)V"
  111. }
  112. .end annotation
  113. .line 55
  114. :try_start_0
  115. iget-object v0, p0, Lio/reactivex/internal/observers/BiConsumerSingleObserver;->onCallback:Lio/reactivex/functions/BiConsumer;
  116. const/4 v1, 0x0
  117. invoke-interface {v0, p1, v1}, Lio/reactivex/functions/BiConsumer;->accept(Ljava/lang/Object;Ljava/lang/Object;)V
  118. :try_end_0
  119. .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0
  120. goto :goto_0
  121. :catch_0
  122. move-exception p1
  123. .line 57
  124. invoke-static {p1}, Lio/reactivex/exceptions/Exceptions;->throwIfFatal(Ljava/lang/Throwable;)V
  125. .line 58
  126. invoke-static {p1}, Lio/reactivex/plugins/RxJavaPlugins;->onError(Ljava/lang/Throwable;)V
  127. :goto_0
  128. return-void
  129. .end method