Advertisement
yoyocx

SmaliUtils.smali

Feb 19th, 2016
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.47 KB | None | 0 0
  1. .class public Lid/dhianrusdhiana/SaljuUtils;
  2. .super Ljava/lang/Object;
  3. .source "SaljuUtils.java"
  4.  
  5.  
  6. # static fields
  7. .field private static floatSpeed:F
  8.  
  9. .field private static intensitas:I
  10.  
  11. .field private static speed:I
  12.  
  13. .field private static str:Z
  14.  
  15.  
  16. # direct methods
  17. .method static constructor <clinit>()V
  18. .locals 1
  19.  
  20. .prologue
  21. .line 11
  22. const/4 v0, 0x0
  23.  
  24. sput v0, Lid/dhianrusdhiana/SaljuUtils;->floatSpeed:F
  25.  
  26. return-void
  27. .end method
  28.  
  29. .method public constructor <init>()V
  30. .locals 1
  31.  
  32. .prologue
  33. .line 50
  34. invoke-direct {p0}, Ljava/lang/Object;-><init>()V
  35.  
  36. .line 51
  37. move-object v0, p0
  38.  
  39. .line 52
  40. .local v0, "utils":Lid/dhianrusdhiana/SaljuUtils;
  41. return-void
  42. .end method
  43.  
  44. .method public static getAnimatDrawable(Landroid/content/Context;)I
  45. .locals 1
  46. .param p0, "context" # Landroid/content/Context;
  47.  
  48. .prologue
  49. .line 55
  50. invoke-static {p0}, Lid/dhianrusdhiana/SaljuUtils;->setAnimationImage(Landroid/content/Context;)I
  51.  
  52. move-result v0
  53.  
  54. return v0
  55. .end method
  56.  
  57. .method public static salju(Landroid/app/Activity;)V
  58. .locals 4
  59. .param p0, "activity" # Landroid/app/Activity;
  60.  
  61. .prologue
  62. .line 18
  63. move-object v0, p0
  64.  
  65. .line 19
  66. .local v0, "context":Landroid/content/Context;
  67. invoke-static {v0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;
  68.  
  69. move-result-object v1
  70.  
  71. .line 20
  72. .local v1, "defaultSharedPreferences":Landroid/content/SharedPreferences;
  73. const-string v2, "salju"
  74.  
  75. const/4 v3, 0x1
  76.  
  77. invoke-interface {v1, v2, v3}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z
  78.  
  79. move-result v2
  80.  
  81. sput-boolean v2, Lid/dhianrusdhiana/SaljuUtils;->str:Z
  82.  
  83. .line 21
  84. const-string v2, "intensitas"
  85.  
  86. const/4 v3, 0x5
  87.  
  88. invoke-interface {v1, v2, v3}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
  89.  
  90. move-result v2
  91.  
  92. sput v2, Lid/dhianrusdhiana/SaljuUtils;->intensitas:I
  93.  
  94. .line 22
  95. const-string v2, "speed"
  96.  
  97. const/16 v3, 0x10
  98.  
  99. invoke-interface {v1, v2, v3}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
  100.  
  101. move-result v2
  102.  
  103. sput v2, Lid/dhianrusdhiana/SaljuUtils;->speed:I
  104.  
  105. .line 23
  106. const v2, 0x358637bd
  107.  
  108. sget v3, Lid/dhianrusdhiana/SaljuUtils;->speed:I
  109.  
  110. int-to-float v3, v3
  111.  
  112. mul-float/2addr v2, v3
  113.  
  114. sput v2, Lid/dhianrusdhiana/SaljuUtils;->floatSpeed:F
  115.  
  116. .line 24
  117. sget-boolean v2, Lid/dhianrusdhiana/SaljuUtils;->str:Z
  118.  
  119. invoke-static {v2}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
  120.  
  121. move-result-object v2
  122.  
  123. invoke-virtual {v2}, Ljava/lang/Boolean;->booleanValue()Z
  124.  
  125. move-result v2
  126.  
  127. if-eqz v2, :cond_0
  128.  
  129. .line 25
  130. sget v2, Lid/dhianrusdhiana/SaljuUtils;->intensitas:I
  131.  
  132. sget v3, Lid/dhianrusdhiana/SaljuUtils;->floatSpeed:F
  133.  
  134. invoke-static {p0, v2, v3}, Lid/dhianrusdhiana/SaljuUtils;->start(Landroid/app/Activity;IF)V
  135.  
  136. .line 27
  137. :cond_0
  138. return-void
  139. .end method
  140.  
  141. .method public static setAnimationImage(Landroid/content/Context;)I
  142. .locals 6
  143. .param p0, "context" # Landroid/content/Context;
  144.  
  145. .prologue
  146. .line 59
  147. invoke-static {p0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;
  148.  
  149. move-result-object v1
  150.  
  151. .line 60
  152. .local v1, "preferences":Landroid/content/SharedPreferences;
  153. const-string v2, "animation_drawable"
  154.  
  155. const-string v3, "0"
  156.  
  157. invoke-interface {v1, v2, v3}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
  158.  
  159. move-result-object v2
  160.  
  161. invoke-static {v2}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
  162.  
  163. move-result v0
  164.  
  165. .line 62
  166. .local v0, "n":I
  167. if-nez v0, :cond_1
  168.  
  169. .line 63
  170. invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
  171.  
  172. move-result-object v2
  173.  
  174. const-string v3, "snow"
  175.  
  176. const-string v4, "drawable"
  177.  
  178. invoke-virtual {p0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
  179.  
  180. move-result-object v5
  181.  
  182. invoke-virtual {v2, v3, v4, v5}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
  183.  
  184. move-result v0
  185.  
  186. .line 81
  187. .end local v0 # "n":I
  188. :cond_0
  189. :goto_0
  190. return v0
  191.  
  192. .line 66
  193. .restart local v0 # "n":I
  194. :cond_1
  195. const/4 v2, 0x1
  196.  
  197. if-ne v0, v2, :cond_2
  198.  
  199. .line 67
  200. invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
  201.  
  202. move-result-object v2
  203.  
  204. const-string v3, "daun"
  205.  
  206. const-string v4, "drawable"
  207.  
  208. invoke-virtual {p0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
  209.  
  210. move-result-object v5
  211.  
  212. invoke-virtual {v2, v3, v4, v5}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
  213.  
  214. move-result v0
  215.  
  216. goto :goto_0
  217.  
  218. .line 70
  219. :cond_2
  220. const/4 v2, 0x2
  221.  
  222. if-ne v0, v2, :cond_3
  223.  
  224. .line 71
  225. invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
  226.  
  227. move-result-object v2
  228.  
  229. const-string v3, "bunga"
  230.  
  231. const-string v4, "drawable"
  232.  
  233. invoke-virtual {p0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
  234.  
  235. move-result-object v5
  236.  
  237. invoke-virtual {v2, v3, v4, v5}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
  238.  
  239. move-result v0
  240.  
  241. goto :goto_0
  242.  
  243. .line 74
  244. :cond_3
  245. const/4 v2, 0x3
  246.  
  247. if-ne v0, v2, :cond_4
  248.  
  249. .line 75
  250. invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
  251.  
  252. move-result-object v2
  253.  
  254. const-string v3, "hujan"
  255.  
  256. const-string v4, "drawable"
  257.  
  258. invoke-virtual {p0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
  259.  
  260. move-result-object v5
  261.  
  262. invoke-virtual {v2, v3, v4, v5}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
  263.  
  264. move-result v0
  265.  
  266. goto :goto_0
  267.  
  268. .line 78
  269. :cond_4
  270. const/4 v2, 0x4
  271.  
  272. if-ne v0, v2, :cond_0
  273.  
  274. .line 79
  275. invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
  276.  
  277. move-result-object v2
  278.  
  279. const-string v3, "entah"
  280.  
  281. const-string v4, "drawable"
  282.  
  283. invoke-virtual {p0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
  284.  
  285. move-result-object v5
  286.  
  287. invoke-virtual {v2, v3, v4, v5}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
  288.  
  289. move-result v0
  290.  
  291. goto :goto_0
  292. .end method
  293.  
  294. .method public static setRotation(Landroid/content/Context;)I
  295. .locals 3
  296. .param p0, "context" # Landroid/content/Context;
  297.  
  298. .prologue
  299. const/4 v1, 0x0
  300.  
  301. .line 42
  302. invoke-static {p0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;
  303.  
  304. move-result-object v0
  305.  
  306. .line 43
  307. .local v0, "preferences":Landroid/content/SharedPreferences;
  308. const-string v2, "rotation"
  309.  
  310. invoke-interface {v0, v2, v1}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z
  311.  
  312. move-result v2
  313.  
  314. invoke-static {v2}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
  315.  
  316. move-result-object v2
  317.  
  318. invoke-virtual {v2}, Ljava/lang/Boolean;->booleanValue()Z
  319.  
  320. move-result v2
  321.  
  322. if-nez v2, :cond_0
  323.  
  324. .line 46
  325. :goto_0
  326. return v1
  327.  
  328. :cond_0
  329. const/16 v1, 0x90
  330.  
  331. goto :goto_0
  332. .end method
  333.  
  334. .method private static start(Landroid/app/Activity;IF)V
  335. .locals 13
  336. .param p0, "activity" # Landroid/app/Activity;
  337. .param p1, "i" # I
  338. .param p2, "f" # F
  339.  
  340. .prologue
  341. const/16 v12, -0xc8
  342.  
  343. const/high16 v11, 0x40000000
  344.  
  345. const/high16 v10, 0x3f000000
  346.  
  347. const v9, 0x3dcccccd
  348.  
  349. const/4 v8, 0x0
  350.  
  351. .line 31
  352. move-object v1, p0
  353.  
  354. .line 32
  355. .local v1, "activity2":Landroid/app/Activity;
  356. move v7, p1
  357.  
  358. .line 33
  359. .local v7, "i2":I
  360. move v6, p2
  361.  
  362. .line 35
  363. .local v6, "f2":F
  364. new-instance v0, Lcom/plattysoft/leonids/ParticleSystem;
  365.  
  366. const/16 v2, 0x78
  367.  
  368. invoke-static {v1}, Lid/dhianrusdhiana/SaljuUtils;->getAnimatDrawable(Landroid/content/Context;)I
  369.  
  370. move-result v3
  371.  
  372. const-wide/16 v4, 0x2710
  373.  
  374. invoke-direct/range {v0 .. v5}, Lcom/plattysoft/leonids/ParticleSystem;-><init>(Landroid/app/Activity;IIJ)V
  375.  
  376. const/16 v2, 0xb4
  377.  
  378. const/4 v3, 0x0
  379.  
  380. invoke-virtual {v0, v8, v9, v2, v3}, Lcom/plattysoft/leonids/ParticleSystem;->setSpeedModuleAndAngleRange(FFII)Lcom/plattysoft/leonids/ParticleSystem;
  381.  
  382. move-result-object v0
  383.  
  384. invoke-virtual {v0, v10, v11}, Lcom/plattysoft/leonids/ParticleSystem;->setScaleRange(FF)Lcom/plattysoft/leonids/ParticleSystem;
  385.  
  386. move-result-object v0
  387.  
  388. invoke-static {v1}, Lid/dhianrusdhiana/SaljuUtils;->setRotation(Landroid/content/Context;)I
  389.  
  390. move-result v2
  391.  
  392. int-to-float v2, v2
  393.  
  394. invoke-virtual {v0, v2}, Lcom/plattysoft/leonids/ParticleSystem;->setRotationSpeed(F)Lcom/plattysoft/leonids/ParticleSystem;
  395.  
  396. move-result-object v0
  397.  
  398. const/16 v2, 0x5a
  399.  
  400. invoke-virtual {v0, v6, v2}, Lcom/plattysoft/leonids/ParticleSystem;->setAcceleration(FI)Lcom/plattysoft/leonids/ParticleSystem;
  401.  
  402. move-result-object v0
  403.  
  404. const/16 v2, 0xc8
  405.  
  406. invoke-virtual {v0, v2, v12, v7}, Lcom/plattysoft/leonids/ParticleSystem;->emit(III)V
  407.  
  408. .line 36
  409. new-instance v0, Lcom/plattysoft/leonids/ParticleSystem;
  410.  
  411. const/16 v2, 0x78
  412.  
  413. invoke-static {v1}, Lid/dhianrusdhiana/SaljuUtils;->getAnimatDrawable(Landroid/content/Context;)I
  414.  
  415. move-result v3
  416.  
  417. const-wide/16 v4, 0x2710
  418.  
  419. invoke-direct/range {v0 .. v5}, Lcom/plattysoft/leonids/ParticleSystem;-><init>(Landroid/app/Activity;IIJ)V
  420.  
  421. const/16 v2, 0xb4
  422.  
  423. const/4 v3, 0x0
  424.  
  425. invoke-virtual {v0, v8, v9, v2, v3}, Lcom/plattysoft/leonids/ParticleSystem;->setSpeedModuleAndAngleRange(FFII)Lcom/plattysoft/leonids/ParticleSystem;
  426.  
  427. move-result-object v0
  428.  
  429. invoke-virtual {v0, v10, v11}, Lcom/plattysoft/leonids/ParticleSystem;->setScaleRange(FF)Lcom/plattysoft/leonids/ParticleSystem;
  430.  
  431. move-result-object v0
  432.  
  433. invoke-static {v1}, Lid/dhianrusdhiana/SaljuUtils;->setRotation(Landroid/content/Context;)I
  434.  
  435. move-result v2
  436.  
  437. int-to-float v2, v2
  438.  
  439. invoke-virtual {v0, v2}, Lcom/plattysoft/leonids/ParticleSystem;->setRotationSpeed(F)Lcom/plattysoft/leonids/ParticleSystem;
  440.  
  441. move-result-object v0
  442.  
  443. const/16 v2, 0x5a
  444.  
  445. invoke-virtual {v0, v6, v2}, Lcom/plattysoft/leonids/ParticleSystem;->setAcceleration(FI)Lcom/plattysoft/leonids/ParticleSystem;
  446.  
  447. move-result-object v0
  448.  
  449. const/16 v2, 0x64
  450.  
  451. invoke-virtual {v0, v2, v12, v7}, Lcom/plattysoft/leonids/ParticleSystem;->emit(III)V
  452.  
  453. .line 37
  454. new-instance v0, Lcom/plattysoft/leonids/ParticleSystem;
  455.  
  456. const/16 v2, 0x78
  457.  
  458. invoke-static {v1}, Lid/dhianrusdhiana/SaljuUtils;->getAnimatDrawable(Landroid/content/Context;)I
  459.  
  460. move-result v3
  461.  
  462. const-wide/16 v4, 0x2710
  463.  
  464. invoke-direct/range {v0 .. v5}, Lcom/plattysoft/leonids/ParticleSystem;-><init>(Landroid/app/Activity;IIJ)V
  465.  
  466. const/16 v2, 0xb4
  467.  
  468. const/4 v3, 0x0
  469.  
  470. invoke-virtual {v0, v8, v9, v2, v3}, Lcom/plattysoft/leonids/ParticleSystem;->setSpeedModuleAndAngleRange(FFII)Lcom/plattysoft/leonids/ParticleSystem;
  471.  
  472. move-result-object v0
  473.  
  474. invoke-virtual {v0, v10, v11}, Lcom/plattysoft/leonids/ParticleSystem;->setScaleRange(FF)Lcom/plattysoft/leonids/ParticleSystem;
  475.  
  476. move-result-object v0
  477.  
  478. invoke-static {v1}, Lid/dhianrusdhiana/SaljuUtils;->setRotation(Landroid/content/Context;)I
  479.  
  480. move-result v2
  481.  
  482. int-to-float v2, v2
  483.  
  484. invoke-virtual {v0, v2}, Lcom/plattysoft/leonids/ParticleSystem;->setRotationSpeed(F)Lcom/plattysoft/leonids/ParticleSystem;
  485.  
  486. move-result-object v0
  487.  
  488. const/16 v2, 0x5a
  489.  
  490. invoke-virtual {v0, v6, v2}, Lcom/plattysoft/leonids/ParticleSystem;->setAcceleration(FI)Lcom/plattysoft/leonids/ParticleSystem;
  491.  
  492. move-result-object v0
  493.  
  494. const/16 v2, 0x190
  495.  
  496. invoke-virtual {v0, v2, v12, v7}, Lcom/plattysoft/leonids/ParticleSystem;->emit(III)V
  497.  
  498. .line 39
  499. return-void
  500. .end method
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement