[sonar] fix sonar plm

This commit is contained in:
zhongchao
2023-10-23 17:01:37 +08:00
parent 0672cbb39c
commit 5b910c2082
41 changed files with 1117 additions and 1279 deletions

View File

@@ -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();
}

View File

@@ -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;