Fix compilation issue

This commit is contained in:
Victor Shcherb 2015-04-12 15:48:52 +03:00
parent bb93559653
commit 4c768708ae

View file

@ -98,29 +98,29 @@ public class SettingsDevelopmentActivity extends SettingsBaseActivity {
//pref.setEnabled(false); //pref.setEnabled(false);
cat.addPreference(pref); cat.addPreference(pref);
final pref = new Preference(this); final Preference agpspref = new Preference(this);
pref.setTitle(R.string.agps_info); agpspref.setTitle(R.string.agps_info);
if (settings.AGPS_DATA_LAST_TIME_DOWNLOADED.get() != 0L) { if (settings.AGPS_DATA_LAST_TIME_DOWNLOADED.get() != 0L) {
SimpleDateFormat prt = new SimpleDateFormat("yyyy-MM-dd HH:mm"); SimpleDateFormat prt = new SimpleDateFormat("yyyy-MM-dd HH:mm");
pref.setSummary(getString(R.string.agps_data_last_downloaded, prt.format(settings.AGPS_DATA_LAST_TIME_DOWNLOADED.get()))); agpspref.setSummary(getString(R.string.agps_data_last_downloaded, prt.format(settings.AGPS_DATA_LAST_TIME_DOWNLOADED.get())));
} else { } else {
pref.setSummary(getString(R.string.agps_data_last_downloaded, "--")); agpspref.setSummary(getString(R.string.agps_data_last_downloaded, "--"));
} }
pref.setSelectable(true); agpspref.setSelectable(true);
//setEnabled(false) creates bad readability on some devices //setEnabled(false) creates bad readability on some devices
//pref.setEnabled(false); //pref.setEnabled(false);
pref.setOnPreferenceClickListener(new OnPreferenceClickListener() { agpspref.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override @Override
public boolean onPreferenceClick(Preference preference) { public boolean onPreferenceClick(Preference preference) {
if(getMyApplication().getSettings().isInternetConnectionAvailable(true)) { if(getMyApplication().getSettings().isInternetConnectionAvailable(true)) {
getMyApplication().getLocationProvider().redownloadAGPS(); getMyApplication().getLocationProvider().redownloadAGPS();
SimpleDateFormat prt = new SimpleDateFormat("yyyy-MM-dd HH:mm"); SimpleDateFormat prt = new SimpleDateFormat("yyyy-MM-dd HH:mm");
pref.setSummary(getString(R.string.agps_data_last_downloaded, prt.format(settings.AGPS_DATA_LAST_TIME_DOWNLOADED.get()))); agpspref.setSummary(getString(R.string.agps_data_last_downloaded, prt.format(settings.AGPS_DATA_LAST_TIME_DOWNLOADED.get())));
} }
return true; return true;
} }
}); });
cat.addPreference(pref); cat.addPreference(agpspref);
SunriseSunset sunriseSunset = getMyApplication().getDaynightHelper().getSunriseSunset(); SunriseSunset sunriseSunset = getMyApplication().getDaynightHelper().getSunriseSunset();
pref = new Preference(this); pref = new Preference(this);