ResultReceiver.smali 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. .class public Landroid/support/v4/os/ResultReceiver;
  2. .super Ljava/lang/Object;
  3. .source "ResultReceiver.java"
  4. # interfaces
  5. .implements Landroid/os/Parcelable;
  6. # annotations
  7. .annotation system Ldalvik/annotation/MemberClasses;
  8. value = {
  9. Landroid/support/v4/os/ResultReceiver$MyResultReceiver;,
  10. Landroid/support/v4/os/ResultReceiver$MyRunnable;
  11. }
  12. .end annotation
  13. # static fields
  14. .field public static final CREATOR:Landroid/os/Parcelable$Creator;
  15. .annotation system Ldalvik/annotation/Signature;
  16. value = {
  17. "Landroid/os/Parcelable$Creator",
  18. "<",
  19. "Landroid/support/v4/os/ResultReceiver;",
  20. ">;"
  21. }
  22. .end annotation
  23. .end field
  24. # instance fields
  25. .field final mHandler:Landroid/os/Handler;
  26. .field final mLocal:Z
  27. .field mReceiver:Landroid/support/v4/os/IResultReceiver;
  28. # direct methods
  29. .method static constructor <clinit>()V
  30. .locals 1
  31. .prologue
  32. .line 134
  33. new-instance v0, Landroid/support/v4/os/ResultReceiver$1;
  34. invoke-direct {v0}, Landroid/support/v4/os/ResultReceiver$1;-><init>()V
  35. sput-object v0, Landroid/support/v4/os/ResultReceiver;->CREATOR:Landroid/os/Parcelable$Creator;
  36. return-void
  37. .end method
  38. .method public constructor <init>(Landroid/os/Handler;)V
  39. .locals 1
  40. .param p1, "handler" # Landroid/os/Handler;
  41. .prologue
  42. .line 75
  43. invoke-direct {p0}, Ljava/lang/Object;-><init>()V
  44. .line 76
  45. const/4 v0, 0x1
  46. iput-boolean v0, p0, Landroid/support/v4/os/ResultReceiver;->mLocal:Z
  47. .line 77
  48. iput-object p1, p0, Landroid/support/v4/os/ResultReceiver;->mHandler:Landroid/os/Handler;
  49. .line 78
  50. return-void
  51. .end method
  52. .method constructor <init>(Landroid/os/Parcel;)V
  53. .locals 1
  54. .param p1, "in" # Landroid/os/Parcel;
  55. .prologue
  56. .line 128
  57. invoke-direct {p0}, Ljava/lang/Object;-><init>()V
  58. .line 129
  59. const/4 v0, 0x0
  60. iput-boolean v0, p0, Landroid/support/v4/os/ResultReceiver;->mLocal:Z
  61. .line 130
  62. const/4 v0, 0x0
  63. iput-object v0, p0, Landroid/support/v4/os/ResultReceiver;->mHandler:Landroid/os/Handler;
  64. .line 131
  65. invoke-virtual {p1}, Landroid/os/Parcel;->readStrongBinder()Landroid/os/IBinder;
  66. move-result-object v0
  67. invoke-static {v0}, Landroid/support/v4/os/IResultReceiver$Stub;->asInterface(Landroid/os/IBinder;)Landroid/support/v4/os/IResultReceiver;
  68. move-result-object v0
  69. iput-object v0, p0, Landroid/support/v4/os/ResultReceiver;->mReceiver:Landroid/support/v4/os/IResultReceiver;
  70. .line 132
  71. return-void
  72. .end method
  73. # virtual methods
  74. .method public describeContents()I
  75. .locals 1
  76. .prologue
  77. .line 116
  78. const/4 v0, 0x0
  79. return v0
  80. .end method
  81. .method protected onReceiveResult(ILandroid/os/Bundle;)V
  82. .locals 0
  83. .param p1, "resultCode" # I
  84. .param p2, "resultData" # Landroid/os/Bundle;
  85. .prologue
  86. .line 113
  87. return-void
  88. .end method
  89. .method public send(ILandroid/os/Bundle;)V
  90. .locals 2
  91. .param p1, "resultCode" # I
  92. .param p2, "resultData" # Landroid/os/Bundle;
  93. .prologue
  94. .line 88
  95. iget-boolean v0, p0, Landroid/support/v4/os/ResultReceiver;->mLocal:Z
  96. if-eqz v0, :cond_2
  97. .line 89
  98. iget-object v0, p0, Landroid/support/v4/os/ResultReceiver;->mHandler:Landroid/os/Handler;
  99. if-eqz v0, :cond_1
  100. .line 90
  101. iget-object v0, p0, Landroid/support/v4/os/ResultReceiver;->mHandler:Landroid/os/Handler;
  102. new-instance v1, Landroid/support/v4/os/ResultReceiver$MyRunnable;
  103. invoke-direct {v1, p0, p1, p2}, Landroid/support/v4/os/ResultReceiver$MyRunnable;-><init>(Landroid/support/v4/os/ResultReceiver;ILandroid/os/Bundle;)V
  104. invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z
  105. .line 103
  106. :cond_0
  107. :goto_0
  108. return-void
  109. .line 92
  110. :cond_1
  111. invoke-virtual {p0, p1, p2}, Landroid/support/v4/os/ResultReceiver;->onReceiveResult(ILandroid/os/Bundle;)V
  112. goto :goto_0
  113. .line 97
  114. :cond_2
  115. iget-object v0, p0, Landroid/support/v4/os/ResultReceiver;->mReceiver:Landroid/support/v4/os/IResultReceiver;
  116. if-eqz v0, :cond_0
  117. .line 99
  118. :try_start_0
  119. iget-object v0, p0, Landroid/support/v4/os/ResultReceiver;->mReceiver:Landroid/support/v4/os/IResultReceiver;
  120. invoke-interface {v0, p1, p2}, Landroid/support/v4/os/IResultReceiver;->send(ILandroid/os/Bundle;)V
  121. :try_end_0
  122. .catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_0
  123. goto :goto_0
  124. .line 100
  125. :catch_0
  126. move-exception v0
  127. goto :goto_0
  128. .end method
  129. .method public writeToParcel(Landroid/os/Parcel;I)V
  130. .locals 1
  131. .param p1, "out" # Landroid/os/Parcel;
  132. .param p2, "flags" # I
  133. .prologue
  134. .line 120
  135. monitor-enter p0
  136. .line 121
  137. :try_start_0
  138. iget-object v0, p0, Landroid/support/v4/os/ResultReceiver;->mReceiver:Landroid/support/v4/os/IResultReceiver;
  139. if-nez v0, :cond_0
  140. .line 122
  141. new-instance v0, Landroid/support/v4/os/ResultReceiver$MyResultReceiver;
  142. invoke-direct {v0, p0}, Landroid/support/v4/os/ResultReceiver$MyResultReceiver;-><init>(Landroid/support/v4/os/ResultReceiver;)V
  143. iput-object v0, p0, Landroid/support/v4/os/ResultReceiver;->mReceiver:Landroid/support/v4/os/IResultReceiver;
  144. .line 124
  145. :cond_0
  146. iget-object v0, p0, Landroid/support/v4/os/ResultReceiver;->mReceiver:Landroid/support/v4/os/IResultReceiver;
  147. invoke-interface {v0}, Landroid/support/v4/os/IResultReceiver;->asBinder()Landroid/os/IBinder;
  148. move-result-object v0
  149. invoke-virtual {p1, v0}, Landroid/os/Parcel;->writeStrongBinder(Landroid/os/IBinder;)V
  150. .line 125
  151. monitor-exit p0
  152. .line 126
  153. return-void
  154. .line 125
  155. :catchall_0
  156. move-exception v0
  157. monitor-exit p0
  158. :try_end_0
  159. .catchall {:try_start_0 .. :try_end_0} :catchall_0
  160. throw v0
  161. .end method