mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
Avoid null Location updates
This commit is contained in:
@@ -111,6 +111,9 @@ public class LocationBackgroundService extends Service {
|
||||
@Override
|
||||
public void onLocationChanged(Location location) {
|
||||
Log.d(TAG, "onLocationChanged: " + location);
|
||||
if (location == null) {
|
||||
return;
|
||||
}
|
||||
if (isBetterLocation(location, DcLocation.getInstance().getLastLocation())) {
|
||||
DcLocation.getInstance().updateLocation(location);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user