Loading core/java/com/android/internal/util/weather/WeatherInfo.java +27 −19 Original line number Diff line number Diff line Loading @@ -80,6 +80,7 @@ public class WeatherInfo { } private String calcDirection(Context context, String degrees) { try { int deg = Integer.parseInt(degrees); if (deg >= 338 || deg <= 22) return context.getResources().getString(R.string.weather_N); Loading @@ -99,9 +100,16 @@ public class WeatherInfo { return context.getResources().getString(R.string.weather_NW); else return ""; } catch (NumberFormatException e) { return ""; } } private String trimSpeed(String speed) { try { return String.valueOf(Math.round(Float.parseFloat(speed))); } catch (NumberFormatException e) { return ""; } } } Loading
core/java/com/android/internal/util/weather/WeatherInfo.java +27 −19 Original line number Diff line number Diff line Loading @@ -80,6 +80,7 @@ public class WeatherInfo { } private String calcDirection(Context context, String degrees) { try { int deg = Integer.parseInt(degrees); if (deg >= 338 || deg <= 22) return context.getResources().getString(R.string.weather_N); Loading @@ -99,9 +100,16 @@ public class WeatherInfo { return context.getResources().getString(R.string.weather_NW); else return ""; } catch (NumberFormatException e) { return ""; } } private String trimSpeed(String speed) { try { return String.valueOf(Math.round(Float.parseFloat(speed))); } catch (NumberFormatException e) { return ""; } } }