/[zanavi_public1]/navit/navit/android/src/com/zoffcc/applications/zanavi/NavitPreferences.java
ZANavi

Diff of /navit/navit/android/src/com/zoffcc/applications/zanavi/NavitPreferences.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 50 Revision 51
490 catch (Exception e) 490 catch (Exception e)
491 { 491 {
492 e.printStackTrace(); 492 e.printStackTrace();
493 } 493 }
494 494
495 try
496 {
497 Preference a = findPreference("night_mode_lux");
498 int read_value = PreferenceManager.getDefaultSharedPreferences(this).getInt("night_mode_lux", (10 - 1)) + 1;
499 a.setSummary(a.getSummary() + " [" + read_value + "]");
500 }
501 catch (Exception e)
502 {
503 e.printStackTrace();
504 }
505
506 try
507 {
508 Preference a = findPreference("night_mode_buffer");
509 int read_value = PreferenceManager.getDefaultSharedPreferences(this).getInt("night_mode_buffer", (20 - 1)) + 1;
510 a.setSummary(a.getSummary() + " [" + read_value + "]");
511 }
512 catch (Exception e)
513 {
514 e.printStackTrace();
515 }
516
495 disable_pref("roadspeed_warning", false, false); 517 disable_pref("roadspeed_warning", false, false);
496 disable_pref("lane_assist", false, false); 518 disable_pref("lane_assist", false, false);
497 519
498 try 520 try
499 { 521 {
772 catch (Exception e) 794 catch (Exception e)
773 { 795 {
774 e.printStackTrace(); 796 e.printStackTrace();
775 } 797 }
776 798
799 try
800 {
801 if (key.equals("night_mode_lux"))
802 {
803 Preference a = findPreference("night_mode_lux");
804 int read_value = sharedPreferences.getInt("night_mode_lux", (10 - 1)) + 1;
805 int pos_start = a.getSummary().toString().lastIndexOf("[");
806 a.setSummary(a.getSummary().subSequence(0, pos_start - 1) + " [" + read_value + "]");
807 }
808 }
809 catch (Exception e)
810 {
811 e.printStackTrace();
812 }
813
814 try
815 {
816 if (key.equals("night_mode_buffer"))
817 {
818 Preference a = findPreference("night_mode_buffer");
819 int read_value = sharedPreferences.getInt("night_mode_buffer", (20 - 1)) + 1;
820 int pos_start = a.getSummary().toString().lastIndexOf("[");
821 a.setSummary(a.getSummary().subSequence(0, pos_start - 1) + " [" + read_value + "]");
822 }
823 }
824 catch (Exception e)
825 {
826 e.printStackTrace();
827 }
828
777 } 829 }
778 830
779 void disable_pref(String pref_name, boolean large_donate_only, boolean debug_function) 831 void disable_pref(String pref_name, boolean large_donate_only, boolean debug_function)
780 { 832 {
781 try 833 try

Legend:
Removed from v.50  
changed lines
  Added in v.51

   
Visit the ZANavi Wiki