Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0e310901 authored by qqq3's avatar qqq3
Browse files

Fix bug (get valid coordinate)

parent 8be7245a
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -53,13 +53,17 @@ public class YahooParser
                    } else if ("country".equals(currentTag)) {
                        assert citySearch != null;
                        citySearch.setCountry(pullParser.getText());
                    } else if ("latitude".equals(currentTag)) {
                    } else if (currentTag.equalsIgnoreCase("latitude")) {
                        if (pullParser.getDepth() == 4) {
                            assert citySearch != null;
                            citySearch.setLatitude(pullParser.getText());
                    } else if ("longitude".equals(currentTag)) {
                        }
                    }  else if (currentTag.equalsIgnoreCase("longitude")) {
                        if (pullParser.getDepth() == 4) {
                            assert citySearch != null;
                            citySearch.setLongitude(pullParser.getText());
                        }
                    }
                } else if (event == XmlPullParser.END_TAG) {
                    if ("place".equals(tagName)) {
                        resultSearch.add(citySearch);