Should this just be simplified to if (lastLatitude == location.getLatitude() && lastLongitude == location.getLongitude()) return?   (&&)