CancellableDisposable.smali 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. .class public final Lio/reactivex/internal/disposables/CancellableDisposable;
  2. .super Ljava/util/concurrent/atomic/AtomicReference;
  3. .source "CancellableDisposable.java"
  4. # interfaces
  5. .implements Lio/reactivex/disposables/Disposable;
  6. # annotations
  7. .annotation system Ldalvik/annotation/Signature;
  8. value = {
  9. "Ljava/util/concurrent/atomic/AtomicReference<",
  10. "Lio/reactivex/functions/Cancellable;",
  11. ">;",
  12. "Lio/reactivex/disposables/Disposable;"
  13. }
  14. .end annotation
  15. # static fields
  16. .field private static final serialVersionUID:J = 0x4f5c453163a88dc2L
  17. # direct methods
  18. .method public constructor <init>(Lio/reactivex/functions/Cancellable;)V
  19. .locals 0
  20. .line 35
  21. invoke-direct {p0, p1}, Ljava/util/concurrent/atomic/AtomicReference;-><init>(Ljava/lang/Object;)V
  22. return-void
  23. .end method
  24. # virtual methods
  25. .method public dispose()V
  26. .locals 1
  27. .line 45
  28. invoke-virtual {p0}, Lio/reactivex/internal/disposables/CancellableDisposable;->get()Ljava/lang/Object;
  29. move-result-object v0
  30. if-eqz v0, :cond_0
  31. const/4 v0, 0x0
  32. .line 46
  33. invoke-virtual {p0, v0}, Lio/reactivex/internal/disposables/CancellableDisposable;->getAndSet(Ljava/lang/Object;)Ljava/lang/Object;
  34. move-result-object v0
  35. check-cast v0, Lio/reactivex/functions/Cancellable;
  36. if-eqz v0, :cond_0
  37. .line 49
  38. :try_start_0
  39. invoke-interface {v0}, Lio/reactivex/functions/Cancellable;->cancel()V
  40. :try_end_0
  41. .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
  42. goto :goto_0
  43. :catch_0
  44. move-exception v0
  45. .line 51
  46. invoke-static {v0}, Lio/reactivex/exceptions/Exceptions;->throwIfFatal(Ljava/lang/Throwable;)V
  47. .line 52
  48. invoke-static {v0}, Lio/reactivex/plugins/RxJavaPlugins;->onError(Ljava/lang/Throwable;)V
  49. :cond_0
  50. :goto_0
  51. return-void
  52. .end method
  53. .method public isDisposed()Z
  54. .locals 1
  55. .line 40
  56. invoke-virtual {p0}, Lio/reactivex/internal/disposables/CancellableDisposable;->get()Ljava/lang/Object;
  57. move-result-object v0
  58. if-nez v0, :cond_0
  59. const/4 v0, 0x1
  60. goto :goto_0
  61. :cond_0
  62. const/4 v0, 0x0
  63. :goto_0
  64. return v0
  65. .end method