From 9a9fc4ed5e1944788564b28773a685febea2a21c Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Thu, 6 Feb 2020 19:57:52 +0100 Subject: fix crash/stacktrace in Share/ShowLocationActivity --- src/main/java/de/pixart/messenger/ui/ShareLocationActivity.java | 2 +- src/main/java/de/pixart/messenger/ui/ShowLocationActivity.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main') diff --git a/src/main/java/de/pixart/messenger/ui/ShareLocationActivity.java b/src/main/java/de/pixart/messenger/ui/ShareLocationActivity.java index c10dd0f9e..1231ac86e 100644 --- a/src/main/java/de/pixart/messenger/ui/ShareLocationActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ShareLocationActivity.java @@ -44,8 +44,8 @@ public class ShareLocationActivity extends LocationActivity implements LocationL double latitude = location.getLatitude(); String address = ""; if (latitude != 0 && longitude != 0) { - Geocoder geoCoder = new Geocoder(context, Locale.getDefault()); try { + Geocoder geoCoder = new Geocoder(context, Locale.getDefault()); List
addresses = geoCoder.getFromLocation(latitude, longitude, 1); if (addresses != null && addresses.size() > 0) { Address Address = addresses.get(0); diff --git a/src/main/java/de/pixart/messenger/ui/ShowLocationActivity.java b/src/main/java/de/pixart/messenger/ui/ShowLocationActivity.java index 3b4305f47..2c878aeff 100644 --- a/src/main/java/de/pixart/messenger/ui/ShowLocationActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ShowLocationActivity.java @@ -40,8 +40,8 @@ public class ShowLocationActivity extends XmppActivity { double latitude = location.getLatitude(); String address = ""; if (latitude != 0 && longitude != 0) { - Geocoder geoCoder = new Geocoder(context, Locale.getDefault()); try { + Geocoder geoCoder = new Geocoder(context, Locale.getDefault()); List
addresses = geoCoder.getFromLocation(latitude, longitude, 1); if (addresses != null && addresses.size() > 0) { Address Address = addresses.get(0); -- cgit v1.2.3