@@ -1,58 +0,0 @@
|
||||
package com.mogo.module.common.adapter;
|
||||
|
||||
import android.view.MotionEvent;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.map.listener.IMogoMapListener;
|
||||
import com.mogo.map.model.MogoPoi;
|
||||
import com.mogo.map.uicontroller.EnumMapUI;
|
||||
import com.mogo.map.uicontroller.VisualAngleMode;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020-01-10
|
||||
* <p>
|
||||
* 适配器
|
||||
*/
|
||||
public abstract class MogoMapListenerAdapter implements IMogoMapListener {
|
||||
|
||||
@Override
|
||||
public void onMapLoaded() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTouch( MotionEvent motionEvent ) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPOIClick( MogoPoi poi ) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMapClick( MogoLatLng latLng ) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLockMap( boolean isLock ) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMapModeChanged( EnumMapUI ui ) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMapVisualAngleChanged(VisualAngleMode visualAngleMode) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMapChanged( MogoLatLng latLng, float zoom, float tilt, float bearing ) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -3,11 +3,7 @@ package com.mogo.module.common.drawer;
|
||||
import static com.mogo.cloud.socket.entity.SocketDownDataHelper.FROM_ADAS;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Typeface;
|
||||
import android.text.TextUtils;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.map.marker.IMogoMarker;
|
||||
|
||||
@@ -71,7 +71,7 @@ class MarkerDrawer {
|
||||
}
|
||||
|
||||
/**
|
||||
* add marker, {@link OnlineCarDrawer 如果是需要在3D模式下显示,则需要设置 {@link MogoMarkerOptions icon3DRes 资源id}}
|
||||
* add marker, { 如果是需要在3D模式下显示,则需要设置 {@link MogoMarkerOptions icon3DRes 资源id}}
|
||||
*
|
||||
* @param markerShowEntity marker展示数据结构体
|
||||
* @param matchRoadSide 设置是否道路吸附,暂时没用到这个字段
|
||||
|
||||
@@ -1,202 +0,0 @@
|
||||
package com.mogo.module.common.drawer;
|
||||
|
||||
import android.graphics.Rect;
|
||||
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.map.marker.IMogoMarkerClickListener;
|
||||
import com.mogo.module.common.ModuleNames;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.entity.MarkerCarPois;
|
||||
import com.mogo.module.common.entity.MarkerLocation;
|
||||
import com.mogo.module.common.entity.MarkerOnlineCar;
|
||||
import com.mogo.module.common.entity.MarkerShowEntity;
|
||||
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
|
||||
import com.mogo.service.statusmanager.StatusDescriptor;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020/10/28
|
||||
*
|
||||
* 描述
|
||||
*/
|
||||
class OnlineCarDrawer implements IMogoStatusChangedListener {
|
||||
|
||||
private static final String TAG = "OnlineCarDrawer";
|
||||
|
||||
// 平滑移动事件间隔(单位:秒)
|
||||
private static final int SMOOTH_DURATION = 15;
|
||||
|
||||
private static volatile OnlineCarDrawer sInstance;
|
||||
|
||||
private OnlineCarDrawer() {
|
||||
MogoApisHandler.getInstance().getApis()
|
||||
.getStatusManagerApi()
|
||||
.registerStatusChangedListener( TAG, StatusDescriptor.VR_MODE, this );
|
||||
}
|
||||
|
||||
public static OnlineCarDrawer getInstance() {
|
||||
if ( sInstance == null ) {
|
||||
synchronized ( OnlineCarDrawer.class ) {
|
||||
if ( sInstance == null ) {
|
||||
sInstance = new OnlineCarDrawer();
|
||||
}
|
||||
}
|
||||
}
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
public synchronized void release() {
|
||||
sInstance = null;
|
||||
}
|
||||
|
||||
public void clearMarkers(){
|
||||
MogoApisHandler.getInstance().getApis().getMapServiceApi().getMarkerManager( AbsMogoApplication.getApp() ).removeMarkers( ModuleNames.CARD_TYPE_USER_DATA );
|
||||
}
|
||||
|
||||
/**
|
||||
* 绘制在线车辆marker
|
||||
*
|
||||
* @param onlineCarList
|
||||
*/
|
||||
public void drawOnlineCarMarkers( List< MarkerOnlineCar > onlineCarList,
|
||||
int maxAmount,
|
||||
boolean clearOld,
|
||||
boolean showBounds,
|
||||
Rect bound,
|
||||
MogoLatLng centerPoint,
|
||||
IMogoMarkerClickListener listener ) {
|
||||
// 将数据同步给在线车辆,避免每次 perform 的时候去拉取,造成消耗
|
||||
if ( onlineCarList == null || onlineCarList.isEmpty() ) {
|
||||
clearMarkers();
|
||||
return;
|
||||
}
|
||||
|
||||
if ( clearOld ) {
|
||||
clearMarkers();
|
||||
}
|
||||
|
||||
int size = MarkerDrawer.getInstance().getAppropriateSize( maxAmount, onlineCarList );
|
||||
|
||||
Map< String, IMogoMarker > existCarMap = MarkerDrawer.getInstance().purgeMarkerData( onlineCarList, ModuleNames.CARD_TYPE_USER_DATA );
|
||||
|
||||
List< MogoLatLng > carPoints = new ArrayList<>();
|
||||
for ( int i = 0; i < size; i++ ) {
|
||||
MarkerOnlineCar markerOnlineCar = onlineCarList.get( i );
|
||||
MarkerLocation markerLocation = markerOnlineCar.getLocation();
|
||||
MarkerShowEntity markerShowEntity = new MarkerShowEntity();
|
||||
markerShowEntity.setBindObj( markerOnlineCar );
|
||||
markerShowEntity.setMarkerLocation( markerLocation );
|
||||
markerShowEntity.setMarkerType( markerOnlineCar.getType() );
|
||||
|
||||
if ( markerOnlineCar.getCarInfo() != null ) {
|
||||
markerShowEntity.setTextContent( markerOnlineCar.getUserInfo().getUserName() );
|
||||
markerShowEntity.setIconUrl( markerOnlineCar.getUserInfo().getUserHead() );
|
||||
}
|
||||
|
||||
if ( i <= 5 ) {
|
||||
carPoints.add( new MogoLatLng( markerLocation.getLat(), markerLocation.getLon() ) );
|
||||
}
|
||||
|
||||
String sn = MarkerDrawer.getInstance().getPrimaryKeyFromEntity( markerOnlineCar );
|
||||
IMogoMarker mogoMarker = existCarMap.get( sn );
|
||||
if ( mogoMarker == null || mogoMarker.isDestroyed() ) {
|
||||
mogoMarker = MarkerDrawer.getInstance().drawMapMarkerImpl( markerShowEntity, false, MarkerDrawer.MARKER_Z_INDEX_LOW, 0, listener );
|
||||
}
|
||||
if ( mogoMarker != null ) {
|
||||
mogoMarker.setVisible( true );
|
||||
}
|
||||
startSmooth( mogoMarker, markerOnlineCar, markerLocation );
|
||||
}
|
||||
|
||||
if ( showBounds && bound != null ) {
|
||||
// 将前6个点显示在固定范围内
|
||||
MogoApisHandler.getInstance().getApis().getMapServiceApi().getMapUIController().showBounds( TAG, centerPoint, carPoints, bound, false );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 平滑移动
|
||||
private void startSmooth( IMogoMarker iMogoMarker, MarkerOnlineCar markerOnlineCar,
|
||||
MarkerLocation markerLocation ) {
|
||||
if ( iMogoMarker == null ) {
|
||||
return;
|
||||
}
|
||||
List< MarkerCarPois > poiList = markerOnlineCar.getPois();
|
||||
if ( filterErrorPoint( poiList ) ) {
|
||||
return;
|
||||
}
|
||||
if ( poiList == null || poiList.size() < 2 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
List< MogoLatLng > points = new ArrayList<>();
|
||||
|
||||
double lastLat = 0.0d;
|
||||
double lastLon = 0.0d;
|
||||
|
||||
for ( int j = 0; j < poiList.size(); j++ ) {
|
||||
MarkerCarPois poi = poiList.get( j );
|
||||
if ( poi == null || poi.getCoordinates() == null && poi.getCoordinates().size() != 2 ) {
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
double lat = Double.valueOf( poi.getCoordinates().get( 1 ) + "" );
|
||||
double lng = Double.valueOf( poi.getCoordinates().get( 0 ) + "" );
|
||||
|
||||
float distance = MarkerDrawer.calculateLineDistance( lastLon, lastLat, lng, lat );
|
||||
lastLon = lng;
|
||||
lastLat = lat;
|
||||
if ( distance < 0.2f ) {// 距离过短,认为静止不动
|
||||
continue;
|
||||
}
|
||||
|
||||
points.add( new MogoLatLng( lat, lng ) );
|
||||
} catch ( Exception e ) {
|
||||
}
|
||||
}
|
||||
if ( points.size() >= 1 ) {
|
||||
iMogoMarker.startSmooth( points, SMOOTH_DURATION );
|
||||
} else {
|
||||
Logger.d( TAG, "静止小车,但是有相同的连续坐标" );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 有可能出现终点到起点跳跃的情况,需要用"500M"约束起点和终点
|
||||
*
|
||||
* @param poiList
|
||||
*/
|
||||
private boolean filterErrorPoint( List< MarkerCarPois > poiList ) {
|
||||
if ( poiList == null || poiList.size() < 2 ) {
|
||||
return false;
|
||||
}
|
||||
MarkerCarPois start = poiList.get( 0 );
|
||||
MarkerCarPois end = poiList.get( poiList.size() - 1 );
|
||||
|
||||
try {
|
||||
double lat1 = Double.valueOf( start.getCoordinates().get( 1 ) + "" );
|
||||
double lng1 = Double.valueOf( start.getCoordinates().get( 0 ) + "" );
|
||||
double lat2 = Double.valueOf( end.getCoordinates().get( 1 ) + "" );
|
||||
double lng2 = Double.valueOf( end.getCoordinates().get( 0 ) + "" );
|
||||
if ( MarkerDrawer.calculateLineDistance( new MogoLatLng( lat1, lng1 ), new MogoLatLng( lat2, lng2 ) ) >= 500 ) {
|
||||
Logger.d( TAG, "filter point" );
|
||||
return true;
|
||||
}
|
||||
} catch ( Exception e ) {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStatusChanged(StatusDescriptor descriptor, boolean isTrue) {
|
||||
clearMarkers();
|
||||
}
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
package com.mogo.module.common.drawer;
|
||||
|
||||
import com.mogo.map.overlay.IMogoPolyline;
|
||||
|
||||
/**
|
||||
* @author donghongyu
|
||||
* @since 2020/10/30
|
||||
* TODO 推送路况信息绘制,用于演示
|
||||
*/
|
||||
public class PushRoadConditionDrawer {
|
||||
|
||||
private static final String TAG = "PushRoadConditionDrawer";
|
||||
private static volatile PushRoadConditionDrawer sInstance;
|
||||
|
||||
private static IMogoPolyline mMogoPolyline;
|
||||
|
||||
private PushRoadConditionDrawer() {
|
||||
}
|
||||
|
||||
public static PushRoadConditionDrawer getInstance() {
|
||||
if (sInstance == null) {
|
||||
synchronized (PushRoadConditionDrawer.class) {
|
||||
if (sInstance == null) {
|
||||
sInstance = new PushRoadConditionDrawer();
|
||||
}
|
||||
}
|
||||
}
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
public synchronized void release() {
|
||||
clearPolyline();
|
||||
mMogoPolyline = null;
|
||||
sInstance = null;
|
||||
}
|
||||
|
||||
public void clearPolyline() {
|
||||
if (mMogoPolyline != null) {
|
||||
mMogoPolyline.remove();
|
||||
mMogoPolyline = null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -30,7 +30,6 @@ public class V2XWarnDataDrawer extends BaseDrawer implements IMogoStatusChangedL
|
||||
|
||||
private static final String TAG = "V2XWarnDataDrawer";
|
||||
private static volatile V2XWarnDataDrawer sInstance;
|
||||
private boolean mChangeCarModeStatus;
|
||||
|
||||
private V2XWarnDataDrawer() {
|
||||
super();
|
||||
@@ -59,7 +58,6 @@ public class V2XWarnDataDrawer extends BaseDrawer implements IMogoStatusChangedL
|
||||
@Override
|
||||
public void onStatusChanged(StatusDescriptor descriptor, boolean isTrue) {
|
||||
Logger.d(TAG, "%s - %s", descriptor, isTrue);
|
||||
mChangeCarModeStatus = true;
|
||||
}
|
||||
|
||||
public boolean isVrMode() {
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
package com.mogo.module.common.map;
|
||||
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.eagle.core.utilcode.util.AppUtils;
|
||||
|
||||
public
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020/6/5
|
||||
* <p>
|
||||
* 自定义导航功能拦截器
|
||||
*/
|
||||
class CustomNaviInterrupter implements Interrupter {
|
||||
|
||||
private static final String TAG = "CustomNaviInterrupter";
|
||||
|
||||
private static volatile CustomNaviInterrupter sInstance;
|
||||
|
||||
private CustomNaviInterrupter() {
|
||||
}
|
||||
|
||||
public static CustomNaviInterrupter getInstance() {
|
||||
if ( sInstance == null ) {
|
||||
synchronized ( CustomNaviInterrupter.class ) {
|
||||
if ( sInstance == null ) {
|
||||
sInstance = new CustomNaviInterrupter();
|
||||
}
|
||||
}
|
||||
}
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
public synchronized void release() {
|
||||
sInstance = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否用自己的导航
|
||||
* 1. 项目是否强制使用自己的导航
|
||||
* 2. 是否安装了高德车机版地图
|
||||
* 3. 默认使用自己的导航
|
||||
*
|
||||
* @return true-用高德公版车机版地图 false-用Launcher自己的导航
|
||||
*/
|
||||
@Override
|
||||
public boolean interrupt() {
|
||||
if ( DebugConfig.isUseCustomNavi() ) {
|
||||
return false;
|
||||
}
|
||||
if ( AppUtils.isAppInstalled( AbsMogoApplication.getApp(), "com.autonavi.amapauto" ) ) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,5 @@
|
||||
package com.mogo.module.common.map;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
|
||||
@@ -1,124 +0,0 @@
|
||||
package com.mogo.module.common.map;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Looper;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import com.bumptech.glide.request.target.SimpleTarget;
|
||||
import com.bumptech.glide.request.transition.Transition;
|
||||
import com.mogo.commons.context.ContextHolderUtil;
|
||||
import com.mogo.eagle.core.utilcode.mogo.glide.GlideApp;
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.eagle.core.utilcode.util.ViewUtils;
|
||||
import com.mogo.map.uicontroller.CarCursorOption;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.R;
|
||||
|
||||
/**
|
||||
* 自车图标工具类
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public class MyLocationUtil {
|
||||
|
||||
private static boolean isLoadingIcon = false;
|
||||
private static boolean needEmphasizeMyLocation = false;
|
||||
|
||||
static {
|
||||
MogoApisHandler.getInstance().getApis().getDataManagerApi()
|
||||
.registerDataListener( "ADAS", data ->{
|
||||
if ( data == null ) {
|
||||
emphasizeMyLocation();
|
||||
} else if( data instanceof String ){
|
||||
setMyLocationIconUrl( ContextHolderUtil.getContext(), ( ( String ) data ));
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
public static void emphasizeMyLocation(){
|
||||
if (!isLoadingIcon) {
|
||||
MogoApisHandler.getInstance().getApis().getMapServiceApi().getMapUIController().emphasizeMyLocation();
|
||||
}else{
|
||||
needEmphasizeMyLocation = true;
|
||||
}
|
||||
}
|
||||
|
||||
private static final CarCursorOption DEFAULT_OPTION = new CarCursorOption.Builder()
|
||||
.build();
|
||||
|
||||
public static void setMyLocationIconUrl(Context context){
|
||||
setMyLocationIconUrl( context, SharedPrefsMgr.getInstance( context ).getString( "MY_LOCATION_CONFIG", "" ) );
|
||||
}
|
||||
|
||||
public static void setMyLocationIconUrl(Context context, String url) {
|
||||
if (url == null || url.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (Looper.myLooper() != Looper.getMainLooper()) {
|
||||
UiThreadHandler.post(() -> loadMyLocationIconInUiThread(context, url));
|
||||
} else {
|
||||
loadMyLocationIconInUiThread(context, url);
|
||||
}
|
||||
}
|
||||
|
||||
private static void loadMyLocationIconInUiThread(Context context, String url) {
|
||||
if (!url.isEmpty()) {
|
||||
isLoadingIcon = true;
|
||||
RequestOptions options = new RequestOptions()
|
||||
.placeholder(DEFAULT_OPTION.getCarCursorRes())
|
||||
.error(DEFAULT_OPTION.getCarCursorRes())
|
||||
.dontAnimate();
|
||||
GlideApp.with(context)
|
||||
.asBitmap()
|
||||
.load(url)
|
||||
.apply(options)
|
||||
.into(new SimpleTarget<Bitmap>() {
|
||||
@Override
|
||||
public void onResourceReady(@NonNull Bitmap resource,
|
||||
@Nullable Transition<? super Bitmap> transition) {
|
||||
DEFAULT_OPTION.setCarCursorBmp(inflateMyLocation(context, resource));
|
||||
MogoApisHandler.getInstance().getApis().getMapServiceApi().getMapUIController().setCarCursorOption(DEFAULT_OPTION);
|
||||
if (needEmphasizeMyLocation) {
|
||||
needEmphasizeMyLocation = false;
|
||||
MogoApisHandler.getInstance().getApis().getMapServiceApi().getMapUIController().emphasizeMyLocation();
|
||||
}
|
||||
isLoadingIcon = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadStarted(@Nullable Drawable placeholder) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadCleared(@Nullable Drawable placeholder) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadFailed(@Nullable Drawable errorDrawable) {
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private static Bitmap inflateMyLocation(Context context, Bitmap res) {
|
||||
if (res == null) {
|
||||
throw new IllegalArgumentException("inflate myLocation bitmap can not be null!");
|
||||
}
|
||||
View root = LayoutInflater.from(context).inflate(R.layout.module_common_my_location, null, false);
|
||||
ImageView iv = root.findViewById(R.id.module_map_amap_my_location_iv);
|
||||
iv.setImageBitmap(res);
|
||||
return ViewUtils.fromView(root);
|
||||
}
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
package com.mogo.module.common.utils;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
|
||||
|
||||
/**
|
||||
* author : donghongyu
|
||||
* e-mail : 1358506549@qq.com
|
||||
* date : 2020/5/15 10:31 AM
|
||||
* desc : 基于位置工具类
|
||||
* version: 1.0
|
||||
*/
|
||||
public class LocationUtils {
|
||||
private static final String TAG = "LocationUtils";
|
||||
|
||||
|
||||
/**
|
||||
* 获取传入的经纬度在车辆的什么位置
|
||||
*
|
||||
* @return 顺时针,true-前,false-后
|
||||
*/
|
||||
public static boolean isPointOnCarFront(MogoLocation carLocal, MogoLatLng pointLocal) {
|
||||
double carLon = carLocal.getLongitude();
|
||||
double carLat = carLocal.getLatitude();
|
||||
double poiLon = pointLocal.getLon();
|
||||
double poiLat = pointLocal.getLat();
|
||||
float carAngle = carLocal.getBearing();
|
||||
|
||||
// 计算车辆与点之间的夹角
|
||||
int diffAngle = DrivingDirectionUtils.getDegreeOfCar2Poi(
|
||||
carLon, carLat, poiLon, poiLat, (int) carAngle);
|
||||
|
||||
if (diffAngle <= 90) {
|
||||
Log.i(TAG, "目标点在车辆--前方");
|
||||
return true;
|
||||
} else {
|
||||
Log.i(TAG, "目标点在车辆--后方");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,12 +7,5 @@ public class SPConst {
|
||||
|
||||
private static String SP_GUIDE = "SP_GUIDE_2020_09_09";
|
||||
|
||||
//用于多模块之间引导状态判断
|
||||
public static String getSpGuide() {
|
||||
return SP_GUIDE;
|
||||
}
|
||||
|
||||
private static String SP_GUIDE_FIRST_TIME_RECORD = "SP_GUIDE_FIRST_TIME_RECORD";
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
package com.mogo.module.common.utils;
|
||||
|
||||
import android.os.Handler;
|
||||
import android.os.HandlerThread;
|
||||
|
||||
/**
|
||||
* 简单HandlerThread线程池实现
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public class SimpleHandlerThreadPool {
|
||||
private static final String TAG = "SimpleHandlerThreadPool";
|
||||
private final HandlerThread renderThread = new HandlerThread( "one-frame-render-thread" );
|
||||
private final Handler renderHandler;
|
||||
|
||||
private SimpleHandlerThreadPool() {
|
||||
renderThread.start();
|
||||
renderHandler = new Handler( renderThread.getLooper() );
|
||||
}
|
||||
|
||||
private static final SimpleHandlerThreadPool INSTANCE = new SimpleHandlerThreadPool();
|
||||
|
||||
public static SimpleHandlerThreadPool getInstance() {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
public void postRender( Runnable runnable ) {
|
||||
renderHandler.post( runnable );
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user