Advertisement
dunc001

HeaderClockStyle

May 9th, 2013
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.75 KB | None | 0 0
  1. .method protected onCreate(Landroid/os/Bundle;)V
  2. .locals 7
  3. .parameter "savedInstanceState"
  4.  
  5. .prologue
  6. const/4 v4, 0x0
  7.  
  8. const/4 v0, 0x1
  9.  
  10. .line 36
  11. invoke-super {p0, p1}, Landroid/preference/PreferenceActivity;->onCreate(Landroid/os/Bundle;)V
  12.  
  13. .line 38
  14. invoke-virtual {p0}, Lcom/j4n87/tweaks/extActivities/ClockActivity;->getApplicationContext()Landroid/content/Context;
  15.  
  16. move-result-object v3
  17.  
  18. iput-object v3, p0, Lcom/j4n87/tweaks/extActivities/ClockActivity;->mContext:Landroid/content/Context;
  19.  
  20. .line 40
  21. const v3, 0x7f040001
  22.  
  23. invoke-virtual {p0, v3}, Lcom/j4n87/tweaks/extActivities/ClockActivity;->setContentView(I)V
  24.  
  25. .line 42
  26. const v3, 0x7f030004
  27.  
  28. invoke-virtual {p0, v3}, Lcom/j4n87/tweaks/extActivities/ClockActivity;->addPreferencesFromResource(I)V
  29.  
  30. .line 43
  31. invoke-virtual {p0}, Lcom/j4n87/tweaks/extActivities/ClockActivity;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
  32.  
  33. move-result-object v2
  34.  
  35. .line 45
  36. .local v2, prefs:Landroid/preference/PreferenceScreen;
  37. const-string v3, "pref_clock"
  38.  
  39. invoke-virtual {v2, v3}, Landroid/preference/PreferenceScreen;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
  40.  
  41. move-result-object v3
  42.  
  43. check-cast v3, Landroid/preference/ListPreference;
  44.  
  45. iput-object v3, p0, Lcom/j4n87/tweaks/extActivities/ClockActivity;->mClockStyle:Landroid/preference/ListPreference;
  46.  
  47. .line 46
  48. const-string v3, "clock_color_pref"
  49.  
  50. invoke-virtual {v2, v3}, Landroid/preference/PreferenceScreen;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
  51.  
  52. move-result-object v3
  53.  
  54. iput-object v3, p0, Lcom/j4n87/tweaks/extActivities/ClockActivity;->mColorPref:Landroid/preference/Preference;
  55.  
  56. .line 50
  57. invoke-virtual {p0}, Lcom/j4n87/tweaks/extActivities/ClockActivity;->getContentResolver()Landroid/content/ContentResolver;
  58.  
  59. move-result-object v3
  60.  
  61. const-string v5, "tweaks_clock_style"
  62.  
  63. invoke-static {v3, v5, v0}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
  64.  
  65. move-result v1
  66.  
  67. .line 52
  68. .local v1, clockVal:I
  69. iget-object v3, p0, Lcom/j4n87/tweaks/extActivities/ClockActivity;->mClockStyle:Landroid/preference/ListPreference;
  70.  
  71. invoke-virtual {v3, v1}, Landroid/preference/ListPreference;->setValueIndex(I)V
  72.  
  73. .line 53
  74. iget-object v3, p0, Lcom/j4n87/tweaks/extActivities/ClockActivity;->mClockStyle:Landroid/preference/ListPreference;
  75.  
  76. invoke-virtual {v3, p0}, Landroid/preference/ListPreference;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V
  77.  
  78. .line 56
  79. const-string v3, "hide_ampm"
  80.  
  81. invoke-virtual {v2, v3}, Landroid/preference/PreferenceScreen;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
  82.  
  83. move-result-object v3
  84.  
  85. check-cast v3, Landroid/preference/CheckBoxPreference;
  86.  
  87. iput-object v3, p0, Lcom/j4n87/tweaks/extActivities/ClockActivity;->mAMPM:Landroid/preference/CheckBoxPreference;
  88.  
  89. .line 61
  90. invoke-virtual {p0}, Lcom/j4n87/tweaks/extActivities/ClockActivity;->getContentResolver()Landroid/content/ContentResolver;
  91.  
  92. move-result-object v3
  93.  
  94. const-string v5, "tweaks_clock_hide_ampm"
  95.  
  96. invoke-static {v3, v5, v4}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
  97.  
  98. move-result v3
  99.  
  100. if-ne v3, v0, :cond_0
  101.  
  102. .line 63
  103. .local v0, checked:Z
  104. :goto_0
  105. iget-object v3, p0, Lcom/j4n87/tweaks/extActivities/ClockActivity;->mAMPM:Landroid/preference/CheckBoxPreference;
  106.  
  107. invoke-virtual {v3, v0}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
  108.  
  109. .local v2, prefs:Landroid/preference/PreferenceScreen;
  110. const-string v3, "pref_header_clock"
  111.  
  112. invoke-virtual {v2, v3}, Landroid/preference/PreferenceScreen;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
  113.  
  114. move-result-object v3
  115.  
  116. check-cast v3, Landroid/preference/ListPreference;
  117.  
  118. iput-object v3, p0, Lcom/j4n87/tweaks/extActivities/ClockActivity;->mHeaderClockStyle:Landroid/preference/ListPreference;
  119.  
  120. .line 46
  121. const-string v3, "header_clock_color_pref"
  122.  
  123. invoke-virtual {v2, v3}, Landroid/preference/PreferenceScreen;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
  124.  
  125. move-result-object v3
  126.  
  127. iput-object v3, p0, Lcom/j4n87/tweaks/extActivities/ClockActivity;->mHeaderColorPref:Landroid/preference/Preference;
  128.  
  129. .line 50
  130. invoke-virtual {p0}, Lcom/j4n87/tweaks/extActivities/ClockActivity;->getContentResolver()Landroid/content/ContentResolver;
  131.  
  132. move-result-object v3
  133.  
  134. const-string v5, "tweaks_header_clock_style"
  135.  
  136. invoke-static {v3, v5, v0}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
  137.  
  138. move-result v1
  139.  
  140. .line 52
  141. .local v1, headerclockVal:I
  142. iget-object v3, p0, Lcom/j4n87/tweaks/extActivities/ClockActivity;->mHeaderClockStyle:Landroid/preference/ListPreference;
  143.  
  144. invoke-virtual {v3, v1}, Landroid/preference/ListPreference;->setValueIndex(I)V
  145.  
  146. .line 53
  147. iget-object v3, p0, Lcom/j4n87/tweaks/extActivities/ClockActivity;->mHeaderClockStyle:Landroid/preference/ListPreference;
  148.  
  149. invoke-virtual {v3, p0}, Landroid/preference/ListPreference;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V
  150.  
  151. .line 56
  152. const-string v3, "hide_ampm_header_clock"
  153.  
  154. invoke-virtual {v2, v3}, Landroid/preference/PreferenceScreen;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
  155.  
  156. move-result-object v3
  157.  
  158. check-cast v3, Landroid/preference/CheckBoxPreference;
  159.  
  160. iput-object v3, p0, Lcom/j4n87/tweaks/extActivities/ClockActivity;->mHeaderAMPM:Landroid/preference/CheckBoxPreference;
  161.  
  162. .line 61
  163. invoke-virtual {p0}, Lcom/j4n87/tweaks/extActivities/ClockActivity;->getContentResolver()Landroid/content/ContentResolver;
  164.  
  165. move-result-object v3
  166.  
  167. const-string v6, "tweaks_header_clock_hide_ampm"
  168.  
  169. invoke-static {v3, v6, v4}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
  170.  
  171. move-result v3
  172.  
  173. if-ne v3, v0, :cond_1
  174.  
  175. .line 63
  176. .local v0, checked:Z
  177. :goto_1
  178. iget-object v3, p0, Lcom/j4n87/tweaks/extActivities/ClockActivity;->mHeaderAMPM:Landroid/preference/CheckBoxPreference;
  179.  
  180. invoke-virtual {v3, v0}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
  181.  
  182. return-void
  183.  
  184. .end local v0 #checked:Z
  185. :cond_0
  186. move v0, v4
  187.  
  188. .line 61
  189. goto :goto_0
  190.  
  191. :cond_1
  192. move v0, v4
  193.  
  194. .line 61
  195. goto :goto_1
  196.  
  197. .end method
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement