Advertisement
techmik

Untitled

Aug 30th, 2011
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. this starts at line 176 in PackageSettingsActivity.java
  2.  
  3. private void populateColors() {
  4. if (getResources().getBoolean(R.bool.has_mixable_dual_notification_led)) {
  5. mColorPref.setEntries(R.array.entries_mixable_dual_led_colors);
  6. mColorPref.setEntryValues(R.array.values_mixable_dual_led_colors);
  7. } else if (getResources().getBoolean(R.bool.has_dual_notification_led)) {
  8. mColorPref.setEntries(R.array.entries_dual_led_colors);
  9. mColorPref.setEntryValues(R.array.values_dual_led_colors);
  10. } else {
  11. mColorPref.setEntries(R.array.entries_trackball_colors);
  12. mColorPref.setEntryValues(R.array.pref_trackball_colors_values);
  13. }
  14. }
  15.  
  16. how about this:
  17.  
  18. private void populateColors() {
  19. if (getResources().getBoolean(R.bool.has_mixable_dual_notification_led)) {
  20. mColorPref.setEntries(R.array.entries_mixable_dual_led_colors);
  21. mColorPref.setEntryValues(R.array.values_mixable_dual_led_colors);
  22. } else if (getResources().getBoolean(R.bool.has_dual_notification_led)) {
  23. mColorPref.setEntries(R.array.entries_dual_led_colors);
  24. mColorPref.setEntryValues(R.array.values_dual_led_colors);
  25. } else if (getResources().getBoolean(R.bool.has_mixable_single_led)) {
  26. getPreferenceScreen().removePreference(mColorPref);
  27. } else {
  28. mColorPref.setEntries(R.array.entries_trackball_colors);
  29. mColorPref.setEntryValues(R.array.pref_trackball_colors_values);
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement