[sonar] fix sonar plm
This commit is contained in:
@@ -27,6 +27,7 @@ public class RouteOverlayDrawer {
|
||||
private Handler mRenderHandler;
|
||||
private final IMoGoOverlayManager mogoOverlayManager;
|
||||
private static volatile RouteOverlayDrawer sInstance;
|
||||
private static final byte[] obj = new byte[0];
|
||||
private Polyline.Options mPolylineOptions;
|
||||
private static final int COLOR_LIGHT = Color.parseColor("#BAEBF5");
|
||||
|
||||
@@ -55,7 +56,7 @@ public class RouteOverlayDrawer {
|
||||
|
||||
public static RouteOverlayDrawer getInstance() {
|
||||
if (sInstance == null) {
|
||||
synchronized (RouteOverlayDrawer.class) {
|
||||
synchronized (obj) {
|
||||
if (sInstance == null) {
|
||||
sInstance = new RouteOverlayDrawer();
|
||||
}
|
||||
|
||||
@@ -142,11 +142,7 @@ public class CarOverlay {
|
||||
|
||||
if (directionMarker == null) {
|
||||
directionMarker = aMap.addMarker(new MarkerOptions().anchor(0.5f, 0.5f).setFlat(true).icon(fourCornersDescriptor).position(mLatLng));
|
||||
if (isDirectionVisible) {
|
||||
directionMarker.setVisible(true);
|
||||
} else {
|
||||
directionMarker.setVisible(false);
|
||||
}
|
||||
directionMarker.setVisible(isDirectionVisible);
|
||||
}
|
||||
carMarker.setVisible(true);
|
||||
newAngle = bearing;
|
||||
@@ -269,7 +265,7 @@ public class CarOverlay {
|
||||
}
|
||||
try {
|
||||
IPoint p = carMarker.getGeoPoint();
|
||||
double newX = 0, newY = 0;
|
||||
double newX, newY;
|
||||
if (currentFrameIndex++ < carMoveAnimationFrameNum) {
|
||||
newX = mapAnchorBackup.x + dXOffStep * currentFrameIndex;
|
||||
newY = mapAnchorBackup.y + dYOffStep * currentFrameIndex;
|
||||
|
||||
Reference in New Issue
Block a user