Guest User

Untitled

a guest
May 29th, 2017
204
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .class public Lcom/zidoo/rtk/hdmi/tool/Util;
  2. .super Ljava/lang/Object;
  3. .source "Util.java"
  4.  
  5.  
  6. # direct methods
  7. .method public constructor <init>()V
  8. .locals 0
  9.  
  10. .prologue
  11. .line 14
  12. invoke-direct {p0}, Ljava/lang/Object;-><init>()V
  13.  
  14. return-void
  15. .end method
  16.  
  17. .method public static currentTime(IIIIII)J
  18. .locals 7
  19. .parameter "year"
  20. .parameter "month"
  21. .parameter "day"
  22. .parameter "h"
  23. .parameter "min"
  24. .parameter "s"
  25.  
  26. .prologue
  27. .line 16
  28. invoke-static {}, Ljava/util/Calendar;->getInstance()Ljava/util/Calendar;
  29.  
  30. move-result-object v0
  31.  
  32. .line 17
  33. .local v0, startCalendar:Ljava/util/Calendar;
  34. const/16 v1, 0xe
  35.  
  36. const/4 v2, 0x0
  37.  
  38. invoke-virtual {v0, v1, v2}, Ljava/util/Calendar;->set(II)V
  39.  
  40. move v1, p0
  41.  
  42. move v2, p1
  43.  
  44. move v3, p2
  45.  
  46. move v4, p3
  47.  
  48. move v5, p4
  49.  
  50. move v6, p5
  51.  
  52. .line 18
  53. invoke-virtual/range {v0 .. v6}, Ljava/util/Calendar;->set(IIIIII)V
  54.  
  55. .line 19
  56. invoke-virtual {v0}, Ljava/util/Calendar;->getTimeInMillis()J
  57.  
  58. move-result-wide v2
  59.  
  60. return-wide v2
  61. .end method
  62.  
  63. .method public static isHdcp()Z
  64. .locals 4
  65.  
  66. .prologue
  67. .line 24
  68. :try_start_0
  69. const-string v2, "/sys/class/switch/rx_hdcp/state"
  70.  
  71. invoke-static {v2}, Lcom/zidoo/custom/cpu/RunTimeTool;->getRunTimeStr(Ljava/lang/String;)Ljava/lang/String;
  72.  
  73. move-result-object v1
  74.  
  75. .line 25
  76. .local v1, state:Ljava/lang/String;
  77. new-instance v2, Ljava/lang/StringBuilder;
  78.  
  79. const-string v3, "isHdcp state = "
  80.  
  81. invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
  82.  
  83. invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  84.  
  85. move-result-object v2
  86.  
  87. invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
  88.  
  89. move-result-object v2
  90.  
  91. invoke-static {v2}, Lcom/zidoo/custom/log/MyLog;->v(Ljava/lang/String;)V
  92.  
  93. .line 26
  94. invoke-virtual {v1}, Ljava/lang/String;->trim()Ljava/lang/String;
  95.  
  96. move-result-object v2
  97.  
  98. const-string v3, "1"
  99.  
  100. invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
  101.  
  102. move-result v2
  103.  
  104. if-eqz v2, :cond_0
  105.  
  106. .line 27
  107. const/4 v2, 0x1
  108.  
  109. .line 33
  110. :goto_0
  111. return v2
  112.  
  113. .line 29
  114. :cond_0
  115. invoke-static {}, Lcom/zidoo/rtk/hdmi/tool/Util;->isHdcp_nuplay()Z
  116. :try_end_0
  117. .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
  118.  
  119. move-result v2
  120.  
  121. goto :goto_0
  122.  
  123. .line 30
  124. :catch_0
  125. move-exception v0
  126.  
  127. .line 31
  128. .local v0, e:Ljava/lang/Exception;
  129. invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
  130.  
  131. .line 33
  132. const/4 v2, 0x0
  133.  
  134. goto :goto_0
  135. .end method
  136.  
  137. .method public static isHdcp_nuplay()Z
  138. .locals 6
  139.  
  140. .prologue
  141. const/4 v3, 0x0
  142.  
  143. .line 38
  144. :try_start_0
  145. new-instance v0, Ljava/io/BufferedReader;
  146.  
  147. new-instance v4, Ljava/io/FileReader;
  148.  
  149. const-string v5, "/sys/devices/platform/98037000.hdmirx/hdcp_status"
  150.  
  151. invoke-direct {v4, v5}, Ljava/io/FileReader;-><init>(Ljava/lang/String;)V
  152.  
  153. invoke-direct {v0, v4}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;)V
  154.  
  155. .line 40
  156. .local v0, br:Ljava/io/BufferedReader;
  157. :cond_0
  158. invoke-virtual {v0}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;
  159.  
  160. move-result-object v2
  161.  
  162. .local v2, line:Ljava/lang/String;
  163. if-nez v2, :cond_1
  164.  
  165. .line 46
  166. invoke-virtual {v0}, Ljava/io/BufferedReader;->close()V
  167.  
  168. .line 47
  169. const/4 v3, 0x1
  170.  
  171. .line 51
  172. .end local v2 #line:Ljava/lang/String;
  173. :goto_0
  174. return v3
  175.  
  176. .line 41
  177. .restart local v2 #line:Ljava/lang/String;
  178. :cond_1
  179. const-string v4, "None"
  180.  
  181. invoke-virtual {v2, v4}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
  182.  
  183. move-result v4
  184.  
  185. if-eqz v4, :cond_0
  186.  
  187. .line 42
  188. invoke-virtual {v0}, Ljava/io/BufferedReader;->close()V
  189. :try_end_0
  190. .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
  191.  
  192. goto :goto_0
  193.  
  194. .line 48
  195. .end local v2 #line:Ljava/lang/String;
  196. :catch_0
  197. move-exception v1
  198.  
  199. .line 49
  200. .local v1, e:Ljava/lang/Exception;
  201. invoke-virtual {v1}, Ljava/lang/Exception;->printStackTrace()V
  202.  
  203. goto :goto_0
  204. .end method
RAW Paste Data