mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-25 19:36:50 +01:00
Fixed formatting and unneccessary code
This commit is contained in:
parent
ff19ceeae8
commit
a0424527d5
@ -1036,11 +1036,8 @@ public class DebugActivity extends AbstractGBActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String getWeatherInfo() {
|
private String getWeatherInfo() {
|
||||||
Prefs prefs = new Prefs(PreferenceManager.getDefaultSharedPreferences(DebugActivity.this));
|
|
||||||
String info = "";
|
String info = "";
|
||||||
Weather weather = Weather.getInstance();
|
WeatherSpec weatherSpec = Weather.getInstance().getWeatherSpec();
|
||||||
weather.setCacheFile(getCacheDir(), prefs.getBoolean("cache_weather", true));
|
|
||||||
WeatherSpec weatherSpec = weather.getWeatherSpec();
|
|
||||||
|
|
||||||
if (weatherSpec == null)
|
if (weatherSpec == null)
|
||||||
return "Weather cache is empty...";
|
return "Weather cache is empty...";
|
||||||
@ -1055,8 +1052,7 @@ public class DebugActivity extends AbstractGBActivity {
|
|||||||
info += "Humidity: " + weatherSpec.currentHumidity + "\n";
|
info += "Humidity: " + weatherSpec.currentHumidity + "\n";
|
||||||
info += "Wind Speed: " + weatherSpec.windSpeed + " kmph\n";
|
info += "Wind Speed: " + weatherSpec.windSpeed + " kmph\n";
|
||||||
info += "Wind Direction: " + weatherSpec.windDirection + " deg\n";
|
info += "Wind Direction: " + weatherSpec.windDirection + " deg\n";
|
||||||
for (int i=0;i<weatherSpec.forecasts.size();i++)
|
for (int i=0;i<weatherSpec.forecasts.size();i++) {
|
||||||
{
|
|
||||||
info += "-------------\n";
|
info += "-------------\n";
|
||||||
info += "-->Day " + i +"\n";
|
info += "-->Day " + i +"\n";
|
||||||
info += "Max Temp: " + weatherSpec.forecasts.get(i).maxTemp + " K\n";
|
info += "Max Temp: " + weatherSpec.forecasts.get(i).maxTemp + " K\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user