RxPermissions$1$1.smali 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. .class Lcom/tbruyelle/rxpermissions2/RxPermissions$1$1;
  2. .super Ljava/lang/Object;
  3. .source "RxPermissions.java"
  4. # interfaces
  5. .implements Lio/reactivex/functions/Function;
  6. # annotations
  7. .annotation system Ldalvik/annotation/EnclosingMethod;
  8. value = Lcom/tbruyelle/rxpermissions2/RxPermissions$1;->apply(Lio/reactivex/Observable;)Lio/reactivex/ObservableSource;
  9. .end annotation
  10. .annotation system Ldalvik/annotation/InnerClass;
  11. accessFlags = 0x0
  12. name = null
  13. .end annotation
  14. .annotation system Ldalvik/annotation/Signature;
  15. value = {
  16. "Ljava/lang/Object;",
  17. "Lio/reactivex/functions/Function<",
  18. "Ljava/util/List<",
  19. "Lcom/tbruyelle/rxpermissions2/Permission;",
  20. ">;",
  21. "Lio/reactivex/ObservableSource<",
  22. "Ljava/lang/Boolean;",
  23. ">;>;"
  24. }
  25. .end annotation
  26. # instance fields
  27. .field final synthetic this$1:Lcom/tbruyelle/rxpermissions2/RxPermissions$1;
  28. # direct methods
  29. .method constructor <init>(Lcom/tbruyelle/rxpermissions2/RxPermissions$1;)V
  30. .locals 0
  31. .param p1, "this$1" # Lcom/tbruyelle/rxpermissions2/RxPermissions$1;
  32. .line 82
  33. iput-object p1, p0, Lcom/tbruyelle/rxpermissions2/RxPermissions$1$1;->this$1:Lcom/tbruyelle/rxpermissions2/RxPermissions$1;
  34. invoke-direct {p0}, Ljava/lang/Object;-><init>()V
  35. return-void
  36. .end method
  37. # virtual methods
  38. .method public apply(Ljava/util/List;)Lio/reactivex/ObservableSource;
  39. .locals 3
  40. .annotation system Ldalvik/annotation/Signature;
  41. value = {
  42. "(",
  43. "Ljava/util/List<",
  44. "Lcom/tbruyelle/rxpermissions2/Permission;",
  45. ">;)",
  46. "Lio/reactivex/ObservableSource<",
  47. "Ljava/lang/Boolean;",
  48. ">;"
  49. }
  50. .end annotation
  51. .annotation system Ldalvik/annotation/Throws;
  52. value = {
  53. Ljava/lang/Exception;
  54. }
  55. .end annotation
  56. .line 85
  57. .local p1, "permissions":Ljava/util/List;, "Ljava/util/List<Lcom/tbruyelle/rxpermissions2/Permission;>;"
  58. invoke-interface {p1}, Ljava/util/List;->isEmpty()Z
  59. move-result v0
  60. if-eqz v0, :cond_0
  61. .line 89
  62. invoke-static {}, Lio/reactivex/Observable;->empty()Lio/reactivex/Observable;
  63. move-result-object v0
  64. return-object v0
  65. .line 92
  66. :cond_0
  67. invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
  68. move-result-object v0
  69. :goto_0
  70. invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
  71. move-result v1
  72. if-eqz v1, :cond_2
  73. invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
  74. move-result-object v1
  75. check-cast v1, Lcom/tbruyelle/rxpermissions2/Permission;
  76. .line 93
  77. .local v1, "p":Lcom/tbruyelle/rxpermissions2/Permission;
  78. iget-boolean v2, v1, Lcom/tbruyelle/rxpermissions2/Permission;->granted:Z
  79. if-nez v2, :cond_1
  80. .line 94
  81. const/4 v0, 0x0
  82. invoke-static {v0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
  83. move-result-object v0
  84. invoke-static {v0}, Lio/reactivex/Observable;->just(Ljava/lang/Object;)Lio/reactivex/Observable;
  85. move-result-object v0
  86. return-object v0
  87. .line 96
  88. .end local v1 # "p":Lcom/tbruyelle/rxpermissions2/Permission;
  89. :cond_1
  90. goto :goto_0
  91. .line 97
  92. :cond_2
  93. const/4 v0, 0x1
  94. invoke-static {v0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
  95. move-result-object v0
  96. invoke-static {v0}, Lio/reactivex/Observable;->just(Ljava/lang/Object;)Lio/reactivex/Observable;
  97. move-result-object v0
  98. return-object v0
  99. .end method
  100. .method public bridge synthetic apply(Ljava/lang/Object;)Ljava/lang/Object;
  101. .locals 0
  102. .annotation system Ldalvik/annotation/Throws;
  103. value = {
  104. Ljava/lang/Exception;
  105. }
  106. .end annotation
  107. .line 82
  108. check-cast p1, Ljava/util/List;
  109. invoke-virtual {p0, p1}, Lcom/tbruyelle/rxpermissions2/RxPermissions$1$1;->apply(Ljava/util/List;)Lio/reactivex/ObservableSource;
  110. move-result-object p1
  111. return-object p1
  112. .end method