From 91303d6ffe06aa16e04544930ebbadf16ea83cfe Mon Sep 17 00:00:00 2001 From: Alexander Sytnyk Date: Thu, 20 Jul 2017 18:56:42 +0300 Subject: [PATCH] Extract constant --- OsmAnd/src/net/osmand/plus/views/PointLocationLayer.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/views/PointLocationLayer.java b/OsmAnd/src/net/osmand/plus/views/PointLocationLayer.java index 59f1758919..975d632d0c 100644 --- a/OsmAnd/src/net/osmand/plus/views/PointLocationLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/PointLocationLayer.java @@ -26,6 +26,8 @@ import java.util.List; public class PointLocationLayer extends OsmandMapLayer implements ContextMenuLayer.IContextMenuProvider { private static final Log LOG = PlatformUtil.getLog(PointLocationLayer.class); + private static final int UPDATES_BEFORE_CHECK_LOCATION = 20; + protected final static int RADIUS = 7; private Paint locationPaint; @@ -147,7 +149,7 @@ public class PointLocationLayer extends OsmandMapLayer implements ContextMenuLay } } - if (updatesCounter == 20) { + if (updatesCounter == UPDATES_BEFORE_CHECK_LOCATION) { updatesCounter = 0; } else { updatesCounter++;