Merge branch 'qa_1.1.8' into dev
# Conflicts: # gradle.properties # modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/adapter/holder/V2XScenarioHistoryRoadEventVH.java
@@ -129,7 +129,7 @@ TTS_NOOP_VERSION=2.0.7
|
||||
|
||||
######## 外部依赖引用
|
||||
# 车聊聊
|
||||
CARCHATTING_VERSION=1.8.5-SNAPSHOT
|
||||
CARCHATTING_VERSION=1.8.8
|
||||
# 车聊聊接口
|
||||
CARCHATTINGPROVIDER_VERSION=1.1.7
|
||||
# loglib
|
||||
|
||||
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 25 KiB |
@@ -126,7 +126,6 @@ public class AutoNaviReceiver extends BroadcastReceiver {
|
||||
if ( state == -1 ) {
|
||||
return;
|
||||
}
|
||||
Logger.d( TAG, "map status: state = %d", state );
|
||||
switch ( state ) {
|
||||
case MapStateValue.START_NAVI:
|
||||
case MapStateValue.START_EMULATOR_NAVI:
|
||||
|
||||
@@ -24,8 +24,8 @@ public class AppIndicatorAdapter extends RecycleBaseAdapter< AppInfo > {
|
||||
@Override
|
||||
public void onBindViewHolder( RecycleViewHolder holder, AppInfo app, int position ) {
|
||||
ImageView ivIndicator = holder.getView( R.id.module_apps_id_app_icon );
|
||||
ivIndicator.setImageResource( app.getIconResId() );
|
||||
holder.itemView.setOnClickListener( view -> {
|
||||
ivIndicator.setBackgroundResource( app.getIconResId() );
|
||||
ivIndicator.setOnClickListener( ( view ) -> {
|
||||
if ( getOnItemClickedListener() != null ) {
|
||||
getOnItemClickedListener().onItemClicked( app, position );
|
||||
}
|
||||
|
||||
@@ -13,12 +13,12 @@ import java.util.List;
|
||||
*/
|
||||
public class NavigatorApps {
|
||||
|
||||
private static AppInfo app = new AppInfo( "高德地图", "com.autonavi.amapauto", "", 0, null, R.drawable.module_apps_ic_navigator_navi, 1 );
|
||||
private static AppInfo app = new AppInfo( "高德地图", "com.autonavi.amapauto", "", 0, null, R.drawable.module_apps_ic_navigator_navi_selector, 1 );
|
||||
private static AppInfo app_ = new AppInfo( "高德地图", "com.autonavi.amapauto", "", 0, null, R.drawable.module_apps_ic_navigator_navi_disable, 1 );
|
||||
// private static AppInfo app2 = new AppInfo( "音乐", "com.tencent.wecarflow", "", 0, null, R.drawable.module_apps_ic_navigator_media, 2 );
|
||||
private static AppInfo app2 = new AppInfo( "音乐", "com.zhidao.music", "", 0, null, R.drawable.module_apps_ic_navigator_media, 2 );
|
||||
private static AppInfo app3 = new AppInfo( "车聊聊", "com.zhidao.imdemo", "", 0, null, R.drawable.module_apps_ic_navigator_im, 6 );
|
||||
private static AppInfo app4 = new AppInfo( "全部应用", "com.mogo.launcher.applist", "", 0, null, R.drawable.module_apps_ic_navigator_applist, 4 );
|
||||
private static AppInfo app2 = new AppInfo( "音乐", "com.zhidao.music", "", 0, null, R.drawable.module_apps_ic_navigator_media_selector, 2 );
|
||||
private static AppInfo app3 = new AppInfo( "车聊聊", "com.zhidao.imdemo", "", 0, null, R.drawable.module_apps_ic_navigator_im_selector, 6 );
|
||||
private static AppInfo app4 = new AppInfo( "全部应用", "com.mogo.launcher.applist", "", 0, null, R.drawable.module_apps_ic_navigator_applist_selector, 4 );
|
||||
|
||||
public static List< AppInfo > getApps() {
|
||||
List< AppInfo > sApps = new ArrayList<>();
|
||||
|
||||
|
After Width: | Height: | Size: 9.6 KiB |
|
After Width: | Height: | Size: 9.9 KiB |
|
After Width: | Height: | Size: 8.3 KiB |
|
After Width: | Height: | Size: 8.8 KiB |
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="true" android:drawable="@drawable/module_apps_ic_navigator_applist_pressed"/>
|
||||
<item android:drawable="@drawable/module_apps_ic_navigator_applist" />
|
||||
</selector>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="true" android:drawable="@drawable/module_apps_ic_navigator_im_pressed"/>
|
||||
<item android:drawable="@drawable/module_apps_ic_navigator_im" />
|
||||
</selector>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="true" android:drawable="@drawable/module_apps_ic_navigator_media_pressed"/>
|
||||
<item android:drawable="@drawable/module_apps_ic_navigator_media" />
|
||||
</selector>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="true" android:drawable="@drawable/module_apps_ic_navigator_navi_pressed"/>
|
||||
<item android:drawable="@drawable/module_apps_ic_navigator_navi" />
|
||||
</selector>
|
||||
@@ -27,11 +27,13 @@ public class MapCenterPointStrategy {
|
||||
{
|
||||
// 选点场景,定位中心点
|
||||
Map< String, MapCenterPoint > choosePoint = new HashMap<>();
|
||||
choosePoint.put( "d80x", new MapCenterPoint( 0.5D, 0.5D ) );
|
||||
choosePoint.put( "em4", new MapCenterPoint( 0.5D, 0.5D ) );
|
||||
choosePoint.put( "e8xx", new MapCenterPoint( 0.5D, 0.5D ) );
|
||||
choosePoint.put( "f80x", new MapCenterPoint( 0.5D, 0.5D ) );
|
||||
choosePoint.put( "f8xx", new MapCenterPoint( 0.5D, 0.5D ) );
|
||||
final MapCenterPoint point = new MapCenterPoint( 0.5D, 0.5D );
|
||||
choosePoint.put( "d80x", point );
|
||||
choosePoint.put( "em4", point );
|
||||
choosePoint.put( "em3", point );
|
||||
choosePoint.put( "e8xx", point );
|
||||
choosePoint.put( "f80x", point );
|
||||
choosePoint.put( "f8xx", point );
|
||||
sStrategies.put( Scene.CHOOSE_POINT, choosePoint );
|
||||
}
|
||||
|
||||
@@ -39,10 +41,13 @@ public class MapCenterPointStrategy {
|
||||
// 导航场景,定位视图右下角偏下
|
||||
Map< String, MapCenterPoint > navi = new HashMap<>();
|
||||
navi.put( "d80x", new MapCenterPoint( 0.669444444444444, 0.573333333333D ) );
|
||||
navi.put( "em4", new MapCenterPoint( 0.734375D, 0.573333333333D ) );
|
||||
navi.put( "e8xx", new MapCenterPoint( 0.734375D, 0.573333333333D ) );
|
||||
navi.put( "f80x", new MapCenterPoint( 0.705208333D, 0.575D ) );
|
||||
navi.put( "f8xx", new MapCenterPoint( 0.705208333D, 0.575D ) );
|
||||
final MapCenterPoint em4 = new MapCenterPoint( 0.734375D, 0.573333333333D );
|
||||
navi.put( "em4", em4 );
|
||||
navi.put( "em3", em4 );
|
||||
navi.put( "e8xx", em4 );
|
||||
final MapCenterPoint f80x = new MapCenterPoint( 0.705208333D, 0.575D );
|
||||
navi.put( "f80x", f80x );
|
||||
navi.put( "f8xx", f80x );
|
||||
sStrategies.put( Scene.NAVI, navi );
|
||||
}
|
||||
|
||||
@@ -50,10 +55,13 @@ public class MapCenterPointStrategy {
|
||||
// 导航场景 vs 道路事件展示场景,定位视图右下角偏下
|
||||
Map< String, MapCenterPoint > naviWithRoadEvent = new HashMap<>();
|
||||
naviWithRoadEvent.put( "d80x", new MapCenterPoint( 0.669444444444444, 0.73936170212766D ) );
|
||||
naviWithRoadEvent.put( "em4", new MapCenterPoint( 0.734375D, 0.73936170212766D ) );
|
||||
naviWithRoadEvent.put( "e8xx", new MapCenterPoint( 0.734375D, 0.73936170212766D ) );
|
||||
naviWithRoadEvent.put( "f80x", new MapCenterPoint( 0.705208333D, 0.683333333333D ) );
|
||||
naviWithRoadEvent.put( "f8xx", new MapCenterPoint( 0.705208333D, 0.683333333333D ) );
|
||||
final MapCenterPoint em4 = new MapCenterPoint( 0.734375D, 0.73936170212766D );
|
||||
naviWithRoadEvent.put( "em4", em4 );
|
||||
naviWithRoadEvent.put( "em3", em4 );
|
||||
naviWithRoadEvent.put( "e8xx", em4 );
|
||||
final MapCenterPoint f80x = new MapCenterPoint( 0.705208333D, 0.683333333333D );
|
||||
naviWithRoadEvent.put( "f80x", f80x );
|
||||
naviWithRoadEvent.put( "f8xx", f80x );
|
||||
sStrategies.put( Scene.NAVI_WITH_ROAD_EVENT, naviWithRoadEvent );
|
||||
}
|
||||
|
||||
@@ -61,10 +69,13 @@ public class MapCenterPointStrategy {
|
||||
// 巡航场景
|
||||
Map< String, MapCenterPoint > aimless = new HashMap<>();
|
||||
aimless.put( "d80x", new MapCenterPoint( 0.669444444444444, 0.5D ) );
|
||||
aimless.put( "em4", new MapCenterPoint( 0.734375D, 0.5D ) );
|
||||
aimless.put( "e8xx", new MapCenterPoint( 0.734375D, 0.5D ) );
|
||||
aimless.put( "f80x", new MapCenterPoint( 0.705208333D, 0.5D ) );
|
||||
aimless.put( "f8xx", new MapCenterPoint( 0.705208333D, 0.5D ) );
|
||||
final MapCenterPoint em4 = new MapCenterPoint( 0.734375D, 0.5D );
|
||||
aimless.put( "em4", em4 );
|
||||
aimless.put( "em3", em4 );
|
||||
aimless.put( "e8xx", em4 );
|
||||
final MapCenterPoint f80x = new MapCenterPoint( 0.705208333D, 0.5D );
|
||||
aimless.put( "f80x", f80x );
|
||||
aimless.put( "f8xx", f80x );
|
||||
sStrategies.put( Scene.AIMLESS, aimless );
|
||||
}
|
||||
|
||||
@@ -72,32 +83,41 @@ public class MapCenterPointStrategy {
|
||||
// 巡航场景 vs 道路事件展示场景
|
||||
Map< String, MapCenterPoint > aimlessWithRoadEvent = new HashMap<>();
|
||||
aimlessWithRoadEvent.put( "d80x", new MapCenterPoint( 0.669444444444444, 0.68617 ) );
|
||||
aimlessWithRoadEvent.put( "em4", new MapCenterPoint( 0.734375D, 0.68617 ) );
|
||||
aimlessWithRoadEvent.put( "e8xx", new MapCenterPoint( 0.734375D, 0.68617 ) );
|
||||
aimlessWithRoadEvent.put( "f80x", new MapCenterPoint( 0.705208333D, 0.599074074D ) );
|
||||
aimlessWithRoadEvent.put( "f8xx", new MapCenterPoint( 0.705208333D, 0.599074074D ) );
|
||||
final MapCenterPoint em4 = new MapCenterPoint( 0.734375D, 0.68617 );
|
||||
aimlessWithRoadEvent.put( "em4", em4 );
|
||||
aimlessWithRoadEvent.put( "em3", em4 );
|
||||
aimlessWithRoadEvent.put( "e8xx", em4 );
|
||||
final MapCenterPoint f80x = new MapCenterPoint( 0.705208333D, 0.599074074D );
|
||||
aimlessWithRoadEvent.put( "f80x", f80x );
|
||||
aimlessWithRoadEvent.put( "f8xx", f80x );
|
||||
sStrategies.put( Scene.AIMLESS_WITH_ROAD_EVENT, aimlessWithRoadEvent );
|
||||
}
|
||||
|
||||
{
|
||||
// 规划路线,定位视图右边
|
||||
Map< String, MapCenterPoint > calculatePath = new HashMap<>();
|
||||
calculatePath.put( "d80x", new MapCenterPoint( 0.733398D, 0.610833D ) );
|
||||
calculatePath.put( "em4", new MapCenterPoint( 0.733398D, 0.610833D ) );
|
||||
calculatePath.put( "e8xx", new MapCenterPoint( 0.733398D, 0.610833D ) );
|
||||
calculatePath.put( "f80x", new MapCenterPoint( 0.703125D, 0.6083333D ) );
|
||||
calculatePath.put( "f8xx", new MapCenterPoint( 0.703125D, 0.6083333D ) );
|
||||
final MapCenterPoint d80x = new MapCenterPoint( 0.733398D, 0.610833D );
|
||||
calculatePath.put( "d80x", d80x );
|
||||
calculatePath.put( "em4", d80x );
|
||||
calculatePath.put( "em3", d80x );
|
||||
calculatePath.put( "e8xx", d80x );
|
||||
final MapCenterPoint f80x = new MapCenterPoint( 0.703125D, 0.6083333D );
|
||||
calculatePath.put( "f80x", f80x );
|
||||
calculatePath.put( "f8xx", f80x );
|
||||
sStrategies.put( Scene.CALCULATE_PATH, calculatePath );
|
||||
}
|
||||
|
||||
{
|
||||
// 分类搜索,定位视图右边
|
||||
Map< String, MapCenterPoint > categorySearch = new HashMap<>();
|
||||
categorySearch.put( "d80x", new MapCenterPoint( 0.733398D, 0.5D ) );
|
||||
categorySearch.put( "em4", new MapCenterPoint( 0.733398D, 0.5D ) );
|
||||
categorySearch.put( "e8xx", new MapCenterPoint( 0.733398D, 0.5D ) );
|
||||
categorySearch.put( "f80x", new MapCenterPoint( 0.733594D, 0.5D ) );
|
||||
categorySearch.put( "f8xx", new MapCenterPoint( 0.733594D, 0.5D ) );
|
||||
final MapCenterPoint d80x = new MapCenterPoint( 0.733398D, 0.5D );
|
||||
categorySearch.put( "d80x", d80x );
|
||||
categorySearch.put( "em4", d80x );
|
||||
categorySearch.put( "em3", d80x );
|
||||
categorySearch.put( "e8xx", d80x );
|
||||
final MapCenterPoint f80x = new MapCenterPoint( 0.733594D, 0.5D );
|
||||
categorySearch.put( "f80x", f80x );
|
||||
categorySearch.put( "f8xx", f80x );
|
||||
sStrategies.put( Scene.CATEGORY_SEARCH, categorySearch );
|
||||
}
|
||||
|
||||
@@ -105,10 +125,13 @@ public class MapCenterPointStrategy {
|
||||
// V2X,场景视图右边
|
||||
Map< String, MapCenterPoint > categoryV2XEvent = new HashMap<>();
|
||||
categoryV2XEvent.put( "d80x", new MapCenterPoint( 0.669444444444444, 0.7D ) );
|
||||
categoryV2XEvent.put( "em4", new MapCenterPoint( 0.677734375D, 0.7D ) );
|
||||
categoryV2XEvent.put( "e8xx", new MapCenterPoint( 0.677734375D, 0.7D ) );
|
||||
categoryV2XEvent.put( "f80x", new MapCenterPoint( 0.6963541D, 0.65D ) );
|
||||
categoryV2XEvent.put( "f8xx", new MapCenterPoint( 0.6963541D, 0.65D ) );
|
||||
final MapCenterPoint em4 = new MapCenterPoint( 0.677734375D, 0.7D );
|
||||
categoryV2XEvent.put( "em4", em4 );
|
||||
categoryV2XEvent.put( "em3", em4 );
|
||||
categoryV2XEvent.put( "e8xx", em4 );
|
||||
final MapCenterPoint f80x = new MapCenterPoint( 0.6963541D, 0.65D );
|
||||
categoryV2XEvent.put( "f80x", f80x );
|
||||
categoryV2XEvent.put( "f8xx", f80x );
|
||||
sStrategies.put( Scene.CATEGORY_V2X_EVENT, categoryV2XEvent );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -245,8 +245,8 @@ public class EntrancePresenter extends Presenter<EntranceView> implements Weathe
|
||||
|
||||
private void requestCarModelList() {
|
||||
Map<String, String> params = new HashMap<>(8);
|
||||
// params.put("sn", Utils.getSn());
|
||||
params.put("sn", "ZD802B1932L00617");
|
||||
params.put("sn", Utils.getSn());
|
||||
// params.put("sn", "ZD802B1932L00617");
|
||||
mNetWork.create(UserInfoNetApiServices.class, DztHttpConstant.getBaseUrl()).
|
||||
requestCarModelList(params).
|
||||
subscribeOn(Schedulers.io()).
|
||||
|
||||
@@ -233,7 +233,7 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
|
||||
@Override
|
||||
public void hideCoverUpLayout() {
|
||||
Logger.d( TAG, "隐藏遮罩" );
|
||||
getWindow().setBackgroundDrawable( null );
|
||||
mCoverUpLayout.setVisibility( View.GONE );
|
||||
mServiceApis.getAdasControllerApi().showADAS();
|
||||
}
|
||||
@@ -314,6 +314,9 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
mMogoStatusManager.setMainPageIsBackgroundStatus( TAG, true );
|
||||
if ( shouldCloseADASPanelWhenPause() ) {
|
||||
mServiceApis.getAdasControllerApi().closeADAS();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -371,7 +374,7 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
AIAssist.getInstance( this ).release();
|
||||
mServiceApis.getOnlineCarPanelApi().clear();
|
||||
if ( CallChatApi.getInstance().getApiProvider() != null ) {
|
||||
CallChatApi.getInstance().getApiProvider().initVehicleTeamContainer("init", 0, null);
|
||||
// CallChatApi.getInstance().getApiProvider().initVehicleTeamContainer("init", 0, null);
|
||||
}
|
||||
ContextHolderUtil.releaseContext();
|
||||
MogoModulesManager.getInstance().onDestroy();
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:background="@color/module_main_window_background_color"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/module_main_window_background_color"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 地图-->
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="module_main_window_background_color">#1D1D1D</color>
|
||||
<color name="module_main_window_background_color">#212831</color>
|
||||
</resources>
|
||||
@@ -45,7 +45,6 @@ import com.mogo.module.service.launchercard.LauncherCardRefresher;
|
||||
import com.mogo.module.service.marker.MapMarkerManager;
|
||||
import com.mogo.module.service.network.RefreshCallback;
|
||||
import com.mogo.module.service.network.RefreshModel;
|
||||
import com.mogo.module.service.ttsConfig.TtsConfigModleData;
|
||||
import com.mogo.module.service.network.bean.HomeCompanyDistanceForPushData;
|
||||
import com.mogo.module.service.network.bean.HomeCompanyDistanceForPushResponse;
|
||||
import com.mogo.module.service.onlinecar.panel.NavigationTargetInfo;
|
||||
@@ -54,6 +53,7 @@ import com.mogo.module.service.refresh.AutoRefreshStrategy;
|
||||
import com.mogo.module.service.refresh.CustomRefreshStrategy;
|
||||
import com.mogo.module.service.refresh.RefreshObject;
|
||||
import com.mogo.module.service.strategy.CarIconDisplayStrategy;
|
||||
import com.mogo.module.service.ttsConfig.TtsConfigModleData;
|
||||
import com.mogo.service.adas.IMogoADASController;
|
||||
import com.mogo.service.fragmentmanager.FragmentStackTransactionListener;
|
||||
import com.mogo.service.fragmentmanager.IMogoFragmentManager;
|
||||
@@ -76,7 +76,6 @@ import com.zhidao.carchattingprovider.CallChattingProviderConstant;
|
||||
import com.zhidao.carchattingprovider.ICallChatResponse;
|
||||
import com.zhidao.carchattingprovider.ICallProviderResponse;
|
||||
import com.zhidao.carchattingprovider.ICarsChattingProvider;
|
||||
import com.zhidao.smartv2x.common.utils.LoggerUtils;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.json.JSONObject;
|
||||
@@ -400,11 +399,9 @@ public class MogoServices implements IMogoMapListener,
|
||||
* 关闭所有模块的控制面板
|
||||
*/
|
||||
private void closeAllPanel() {
|
||||
LoggerUtils.log("zy=======stop");
|
||||
mCallProviderResponse = new ICallChatResponse() {
|
||||
@Override
|
||||
public void hideUserWindowError(@NotNull String errorMsg) {
|
||||
LoggerUtils.log("zy=======errorMsg:" + errorMsg);
|
||||
}
|
||||
};
|
||||
MogoApisHandler.getInstance().getApis().getShareManager().dismissShareDialog();
|
||||
@@ -433,6 +430,7 @@ public class MogoServices implements IMogoMapListener,
|
||||
mStatusManager.registerStatusChangedListener(ServiceConst.TYPE, StatusDescriptor.SEEK_HELPING, statusChangedListener);
|
||||
mStatusManager.registerStatusChangedListener(ServiceConst.TYPE, StatusDescriptor.ACC_STATUS, statusChangedListener);
|
||||
mStatusManager.registerStatusChangedListener(ServiceConst.TYPE, StatusDescriptor.TOP_VIEW, statusChangedListener);
|
||||
mStatusManager.registerStatusChangedListener(ServiceConst.TYPE, StatusDescriptor.MAIN_PAGE_IS_BACKGROUND, statusChangedListener);
|
||||
mStatusManager.setAIAssistReady(TAG, AIAssist.getInstance(mContext).hasFlush());
|
||||
|
||||
registerMogoReceiver(context);
|
||||
@@ -566,7 +564,6 @@ public class MogoServices implements IMogoMapListener,
|
||||
filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION);
|
||||
try {
|
||||
context.getApplicationContext().registerReceiver(mAIAssistReceiver, filter);
|
||||
Logger.i(TAG, "register voice receiver.");
|
||||
} catch (Exception e) {
|
||||
Logger.e(TAG, e, "error. ");
|
||||
}
|
||||
@@ -585,7 +582,6 @@ public class MogoServices implements IMogoMapListener,
|
||||
float width = getMapCameraFactWidth();
|
||||
float height = getMapCameraFactHeight();
|
||||
mIsVertical = width < height;
|
||||
Logger.i(TAG, "map status is vertical : " + mIsVertical);
|
||||
mIsMapStatusOk = true;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
@@ -620,7 +616,6 @@ public class MogoServices implements IMogoMapListener,
|
||||
case MotionEvent.ACTION_DOWN:
|
||||
if (mLastZoomLevel == 0) {
|
||||
mLastZoomLevel = mUiController.getZoomLevel();
|
||||
Logger.i(TAG, "初始化缩放级别 为:%f", mLastZoomLevel);
|
||||
}
|
||||
break;
|
||||
case MotionEvent.ACTION_UP:
|
||||
@@ -668,7 +663,6 @@ public class MogoServices implements IMogoMapListener,
|
||||
if (mStatusManager.isUserInteracted()) {
|
||||
mLastCustomRefreshCenterLocation = latLng;
|
||||
mLastZoomLevel = zoom;
|
||||
Logger.d(TAG, "user interacted");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -676,7 +670,6 @@ public class MogoServices implements IMogoMapListener,
|
||||
if (mStatusManager.isV2XShow()) {
|
||||
mLastCustomRefreshCenterLocation = latLng;
|
||||
mLastZoomLevel = zoom;
|
||||
Logger.d(TAG, "user v2x show");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -684,12 +677,9 @@ public class MogoServices implements IMogoMapListener,
|
||||
if (mStatusManager.isSearchUIShow()) {
|
||||
mLastCustomRefreshCenterLocation = latLng;
|
||||
mLastZoomLevel = zoom;
|
||||
Logger.d(TAG, "user search Ui show");
|
||||
return;
|
||||
}
|
||||
|
||||
Logger.d(TAG, "mLastZoomLevel = %s, zoom = %s", mLastZoomLevel, zoom);
|
||||
|
||||
// 手动刷新触发
|
||||
if (mLastZoomLevel - zoom > mCustomRefreshStrategy.getZoomOutLevel()) {
|
||||
// 缩放级别缩小
|
||||
@@ -704,7 +694,6 @@ public class MogoServices implements IMogoMapListener,
|
||||
msg.what = ServiceConst.MSG_MAP_CHANGED;
|
||||
msg.obj = new RefreshObject(mCustomRefreshCallback, getQueryRadius(), latLng, 0);
|
||||
mThreadHandler.sendMessage(msg);
|
||||
Logger.d(TAG, "平移触发");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -738,7 +727,6 @@ public class MogoServices implements IMogoMapListener,
|
||||
return false;
|
||||
}
|
||||
float distance = Utils.calculateLineDistance(latLng, mLastCustomRefreshCenterLocation);
|
||||
Logger.d(TAG, "move distance = %s, factor = %s", distance, (factor / 2));
|
||||
return distance > (factor / 2);
|
||||
} catch (Exception e) {
|
||||
Logger.e(TAG, e, "warming. ");
|
||||
@@ -838,7 +826,6 @@ public class MogoServices implements IMogoMapListener,
|
||||
if (mStatusManager.isSearchUIShow()) {
|
||||
return;
|
||||
}
|
||||
Logger.d(TAG, mAutoRefreshCallback == callback ? "触发自动刷新" : "触发手动刷新");
|
||||
int amount = 20;
|
||||
|
||||
Message msg = Message.obtain();
|
||||
@@ -886,16 +873,13 @@ public class MogoServices implements IMogoMapListener,
|
||||
delay = mRefreshRemainingTime;
|
||||
}
|
||||
if (time == 0) {
|
||||
Logger.d(TAG, "立即刷新");
|
||||
invokeAutoRefresh();
|
||||
} else {
|
||||
mHandler.sendEmptyMessageDelayed(ServiceConst.MSG_TYPE_REFRESH_DECREASE, delay);
|
||||
}
|
||||
Logger.i(TAG, "下次刷新时间:%sms后", mRefreshRemainingTime);
|
||||
}
|
||||
|
||||
public void refreshStrategy() {
|
||||
Logger.d(TAG, "move to center and refresh data.");
|
||||
mStatusManager.setUserInteractionStatus(ServiceConst.TYPE, true, false);
|
||||
mUiController.recoverLockMode();// 锁车代替移到中心点
|
||||
restartAutoRefreshAtTime(0);
|
||||
|
||||
@@ -7,20 +7,15 @@ import android.text.TextUtils;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
|
||||
import com.facebook.drawee.backends.pipeline.PipelineDraweeControllerBuilder;
|
||||
import com.facebook.drawee.interfaces.DraweeController;
|
||||
import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.map.marker.MogoMarkerOptions;
|
||||
import com.mogo.module.common.entity.MarkerShowEntity;
|
||||
import com.mogo.module.common.marker.PoiWrapper;
|
||||
import com.mogo.module.service.MarkerServiceHandler;
|
||||
import com.mogo.module.service.R;
|
||||
import com.mogo.service.imageloader.IMogoImageLoaderListener;
|
||||
@@ -108,7 +103,6 @@ public abstract class MapMarkerBaseView extends LinearLayout implements IMarkerV
|
||||
|
||||
@Override
|
||||
public void onCompleted(Bitmap bitmap) {
|
||||
Logger.d(TAG, "loadImageWithMarker loaded.");
|
||||
// 使用view渲染地图marker,刷新纹理的时候,需要重新用view生成纹理,然后在设置
|
||||
if (mMarker != null) {
|
||||
mMarker.setIcon(fromView(MapMarkerBaseView.this));
|
||||
@@ -117,7 +111,6 @@ public abstract class MapMarkerBaseView extends LinearLayout implements IMarkerV
|
||||
|
||||
@Override
|
||||
public void onFailure(Exception e) {
|
||||
Logger.e(TAG, "loadImageWithMarker onFailure.");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -36,12 +36,10 @@ import com.mogo.module.service.utils.ViewUtils;
|
||||
import com.mogo.service.adas.IMogoADASControlStatusChangedListener;
|
||||
import com.mogo.service.connection.IMogoOnMessageListener;
|
||||
import com.mogo.service.module.IMogoBizActionDoneListener;
|
||||
import com.mogo.utils.AppUtils;
|
||||
import com.mogo.utils.ResourcesHelper;
|
||||
import com.mogo.utils.ThreadPoolService;
|
||||
import com.mogo.utils.UiThreadHandler;
|
||||
import com.mogo.utils.WorkThreadHandler;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.zhidao.carchattingprovider.ICallChatResponse;
|
||||
|
||||
import org.json.JSONArray;
|
||||
@@ -105,8 +103,6 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
return;
|
||||
}
|
||||
|
||||
Logger.d( TAG, "初始化" );
|
||||
|
||||
mContext = context.getApplicationContext();
|
||||
mRefreshModel = new RefreshModel( mContext );
|
||||
CloudPoiManager.getInstance().updateFromConfig(context);
|
||||
@@ -140,7 +136,6 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
*/
|
||||
@Override
|
||||
public boolean onMarkerClicked( IMogoMarker marker ) {
|
||||
Logger.d( TAG, "onMarkerClicked 点击了大而全中的Marker:" + marker );
|
||||
try {
|
||||
boolean result = switchMarkerOpenStatus( marker );
|
||||
if ( !result ) {
|
||||
@@ -181,7 +176,6 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
if ( mLastCheckMarker != null ) {
|
||||
// 判断点击的是否是同一个
|
||||
if ( marker.equals( mLastCheckMarker ) ) {
|
||||
Logger.d( TAG, "onMarkerClicked 与上一次点击的Marker一样,不做处理:" + marker );
|
||||
return false;
|
||||
}
|
||||
// 将上次选中 Marker 设置为未选中状态
|
||||
@@ -235,7 +229,6 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
MarkerOnlineCar onlineCar = ( MarkerOnlineCar ) ( ( MarkerShowEntity ) marker.getObject() ).getBindObj();
|
||||
CallChatApi.getInstance().showUserWindow( mContext, onlineCar );
|
||||
} catch ( Exception e ) {
|
||||
Logger.e( TAG, e, "openMarker" );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -406,7 +399,6 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
}
|
||||
int size = getAppropriateSize( maxAmount, exploreWayList );
|
||||
Map< String, IMogoMarker > existCarMap = purgeMarkerData( exploreWayList, ModuleNames.CARD_TYPE_ROAD_CONDITION );
|
||||
Logger.i( TAG, "existCarMap: size = %d", existCarMap.size() );
|
||||
for ( int i = 0; i < size; i++ ) {
|
||||
MarkerExploreWay markerExploreWay = exploreWayList.get( i );
|
||||
if ( !markerExploreWay.getCanLive() ) {
|
||||
@@ -449,7 +441,6 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
marker.startScaleAnimationWithAlpha( 0, 1.2f, 0, 1.2f, 0f, 1f, 300, new LinearInterpolator(), new OnMarkerAnimationListener() {
|
||||
@Override
|
||||
public void onAnimStart() {
|
||||
Logger.d( TAG, " onAnimStart ---1----> " );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -641,7 +632,6 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
return;
|
||||
}
|
||||
try {
|
||||
Logger.d( TAG, "dispatch data to %s", biz );
|
||||
MarkerServiceHandler.getDataManager().syncData( biz, object );
|
||||
} catch ( Exception e ) {
|
||||
e.printStackTrace();
|
||||
@@ -689,7 +679,6 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
try {
|
||||
return drawMapMarkerImpl( markerShowEntity, zIndex );
|
||||
} catch ( Exception e ) {
|
||||
Logger.e( TAG, e, "drawMapMarker" );
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -730,7 +719,6 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
if ( ignoreDrawRequest() ) {
|
||||
return;
|
||||
}
|
||||
Logger.d( TAG, "接收到了地图大而全数据" );
|
||||
runOnTargetThread( () -> {
|
||||
drawMapMarker( response );
|
||||
} );
|
||||
@@ -925,7 +913,6 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
if ( points.size() >= 1 ) {
|
||||
iMogoMarker.startSmooth( points, SMOOTH_DURATION );
|
||||
} else {
|
||||
Logger.d( TAG, "静止小车,但是有相同的连续坐标" );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -947,7 +934,6 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
double lat2 = Double.valueOf( end.getCoordinates().get( 1 ) + "" );
|
||||
double lng2 = Double.valueOf( end.getCoordinates().get( 0 ) + "" );
|
||||
if ( Utils.calculateLineDistance( new MogoLatLng( lat1, lng1 ), new MogoLatLng( lat2, lng2 ) ) >= 500 ) {
|
||||
Logger.d( TAG, "filter point" );
|
||||
return true;
|
||||
}
|
||||
} catch ( Exception e ) {
|
||||
@@ -975,7 +961,6 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
|
||||
@Override
|
||||
public void onBizActionDone( String biz, int position, Object data ) {
|
||||
Logger.d( TAG, "biz = %s, position = %s", biz, position );
|
||||
if ( data instanceof MarkerShowEntity && ( ( MarkerShowEntity ) data ).getMarker() != null ) {
|
||||
switchMarkerOpenStatus( ( ( MarkerShowEntity ) data ).getMarker() );
|
||||
} else {
|
||||
@@ -986,7 +971,6 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
IMogoMarker marker = markers.get( position );
|
||||
switchMarkerOpenStatus( marker );
|
||||
} catch ( Exception e ) {
|
||||
Logger.e( TAG, e, "occur error." );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,11 +72,9 @@ public class MogoReceiver extends BroadcastReceiver {
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
final String action = intent.getAction();
|
||||
Logger.i(TAG, "receive intent action: %s", action);
|
||||
if (TextUtils.equals(VOICE_ACTION, action)) {
|
||||
String cmd = intent.getStringExtra(PARAM_COMMAND);
|
||||
if (!TextUtils.isEmpty(cmd)) {
|
||||
Logger.d( TAG, "receive command: %s", cmd );
|
||||
mMogoIntentManager.invoke(cmd, intent);
|
||||
}
|
||||
} else {
|
||||
|
||||
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 5.7 KiB |
BIN
modules/mogo-module-service/src/main/res/drawable-mdpi/module_services_marker_bkg.png
Executable file → Normal file
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 13 KiB |
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="module_service_marker_anchor_size">16dp</dimen>
|
||||
<dimen name="module_service_marker_dot_marginTop">2dp</dimen>
|
||||
<dimen name="module_service_marker_bubble_width">56px</dimen>
|
||||
<dimen name="module_service_marker_bubble_height">65px</dimen>
|
||||
<dimen name="module_service_marker_dot_marginTop">2px</dimen>
|
||||
<dimen name="module_service_marker_bubble_width">70px</dimen>
|
||||
<dimen name="module_service_marker_bubble_height">76px</dimen>
|
||||
<dimen name="module_service_marker_bubble_icon_width">35px</dimen>
|
||||
<dimen name="module_service_marker_bubble_icon_height">35px</dimen>
|
||||
<dimen name="module_service_marker_bubble_icon_marginBottom">4px</dimen>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="module_service_marker_anchor_size">16dp</dimen>
|
||||
<dimen name="module_service_marker_dot_marginTop">2dp</dimen>
|
||||
<dimen name="module_service_marker_bubble_width">56px</dimen>
|
||||
<dimen name="module_service_marker_bubble_height">65px</dimen>
|
||||
<dimen name="module_service_marker_dot_marginTop">2px</dimen>
|
||||
<dimen name="module_service_marker_bubble_width">70px</dimen>
|
||||
<dimen name="module_service_marker_bubble_height">76px</dimen>
|
||||
<dimen name="module_service_marker_bubble_icon_width">35px</dimen>
|
||||
<dimen name="module_service_marker_bubble_icon_height">35px</dimen>
|
||||
<dimen name="module_service_marker_bubble_icon_marginBottom">4px</dimen>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="module_service_marker_anchor_size">20dp</dimen>
|
||||
<dimen name="module_service_marker_dot_marginTop">4dp</dimen>
|
||||
<dimen name="module_service_marker_bubble_width">100px</dimen>
|
||||
<dimen name="module_service_marker_bubble_height">117px</dimen>
|
||||
<dimen name="module_service_marker_dot_marginTop">4px</dimen>
|
||||
<dimen name="module_service_marker_bubble_width">120px</dimen>
|
||||
<dimen name="module_service_marker_bubble_height">130px</dimen>
|
||||
<dimen name="module_service_marker_bubble_icon_width">60px</dimen>
|
||||
<dimen name="module_service_marker_bubble_icon_height">60px</dimen>
|
||||
<dimen name="module_service_marker_bubble_icon_marginBottom">8px</dimen>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="module_service_marker_anchor_size">20dp</dimen>
|
||||
<dimen name="module_service_marker_dot_marginTop">4dp</dimen>
|
||||
<dimen name="module_service_marker_bubble_width">100px</dimen>
|
||||
<dimen name="module_service_marker_bubble_height">117px</dimen>
|
||||
<dimen name="module_service_marker_dot_marginTop">4px</dimen>
|
||||
<dimen name="module_service_marker_bubble_width">120px</dimen>
|
||||
<dimen name="module_service_marker_bubble_height">130px</dimen>
|
||||
<dimen name="module_service_marker_bubble_icon_width">60px</dimen>
|
||||
<dimen name="module_service_marker_bubble_icon_height">60px</dimen>
|
||||
<dimen name="module_service_marker_bubble_icon_marginBottom">8px</dimen>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="module_service_marker_anchor_size">20dp</dimen>
|
||||
<dimen name="module_service_marker_dot_marginTop">4dp</dimen>
|
||||
<dimen name="module_service_marker_bubble_width">100px</dimen>
|
||||
<dimen name="module_service_marker_bubble_height">117px</dimen>
|
||||
<dimen name="module_service_marker_dot_marginTop">4px</dimen>
|
||||
<dimen name="module_service_marker_bubble_width">120px</dimen>
|
||||
<dimen name="module_service_marker_bubble_height">130px</dimen>
|
||||
<dimen name="module_service_marker_bubble_icon_width">60px</dimen>
|
||||
<dimen name="module_service_marker_bubble_icon_height">60px</dimen>
|
||||
<dimen name="module_service_marker_bubble_icon_marginBottom">8px</dimen>
|
||||
|
||||
@@ -15,7 +15,6 @@ import com.mogo.map.navi.IMogoNaviListener;
|
||||
import com.mogo.module.v2x.fragment.V2XEventPanelFragment;
|
||||
import com.mogo.service.eventpanel.IEventPanelProvider;
|
||||
import com.mogo.service.module.IMogoModuleLifecycle;
|
||||
import com.mogo.service.module.IMogoModuleProvider;
|
||||
import com.mogo.service.module.ModuleType;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
@@ -35,6 +34,7 @@ public class V2XEventPanelModuleProvider implements
|
||||
|
||||
@Override
|
||||
public Fragment createFragment(Context context, Bundle data) {
|
||||
Logger.e(MODULE_NAME, "事件模版 createFragment。。。。");
|
||||
V2XServiceManager.init(context);
|
||||
return V2XEventPanelFragment.Companion.getInstance();
|
||||
}
|
||||
@@ -92,21 +92,28 @@ public class V2XEventPanelModuleProvider implements
|
||||
|
||||
@Override
|
||||
public void init(Context context) {
|
||||
V2XServiceManager.init(context);
|
||||
Logger.e(MODULE_NAME, "事件模版 模块初始化。。。。");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showPanelWithSelectedItem(int item) {
|
||||
V2XEventPanelFragment.Companion.getInstance().showPanelWithSelectedItem(item);
|
||||
if (!V2XServiceManager.getMoGoStatusManager().isMainPageIsBackground()) {
|
||||
V2XEventPanelFragment.Companion.getInstance().showPanelWithSelectedItem(item);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showPanel() {
|
||||
V2XEventPanelFragment.Companion.getInstance().showPanel();
|
||||
if (!V2XServiceManager.getMoGoStatusManager().isMainPageIsBackground()) {
|
||||
V2XEventPanelFragment.Companion.getInstance().showPanel();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hidePanel() {
|
||||
V2XEventPanelFragment.Companion.getInstance().hidePanel();
|
||||
if (!V2XServiceManager.getMoGoStatusManager().isMainPageIsBackground()) {
|
||||
V2XEventPanelFragment.Companion.getInstance().hidePanel();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package com.mogo.module.v2x.listener;
|
||||
|
||||
import com.mogo.module.v2x.V2XConst;
|
||||
import com.mogo.module.v2x.V2XServiceManager;
|
||||
import com.mogo.module.v2x.entity.net.V2XSpecialCarRes.V2XMarkerEntity;
|
||||
import com.mogo.module.v2x.entity.net.V2XSpecialCarRes;
|
||||
import com.mogo.module.common.entity.V2XMessageEntity;
|
||||
import com.mogo.module.common.entity.V2XPoiTypeEnum;
|
||||
import com.mogo.module.v2x.V2XConst;
|
||||
import com.mogo.module.v2x.V2XServiceManager;
|
||||
import com.mogo.module.v2x.entity.net.V2XSpecialCarRes;
|
||||
import com.mogo.module.v2x.entity.net.V2XSpecialCarRes.V2XMarkerEntity;
|
||||
import com.mogo.module.v2x.scenario.impl.V2XScenarioManager;
|
||||
import com.mogo.module.v2x.utils.MarkerUtils;
|
||||
import com.mogo.module.v2x.utils.V2XUtils;
|
||||
@@ -64,24 +64,14 @@ public class V2XMessageListener_401005 implements IMogoOnMessageListener<V2XSpec
|
||||
V2XServiceManager.getMarkerManager().removeMarkers(V2XConst.V2X_MARKER_SPECIAL_CAR);
|
||||
List<V2XMarkerEntity> coordinates = message.getCoordinates();
|
||||
List<V2XMarkerEntity> entityList = new ArrayList<>();
|
||||
// 移除上一次的数据
|
||||
//Context context = V2XServiceManager.getContext();
|
||||
|
||||
for (V2XMarkerEntity coordinate : coordinates) {
|
||||
//故障车机
|
||||
if (coordinate.getTargetId() == V2XPoiTypeEnum.ALERT_CAR_TROUBLE_WARNING) {
|
||||
//V2XMarkerEntity.UserInfoBean userInfoBean = coordinate.getUserInfo();
|
||||
//if (userInfoBean != null) {
|
||||
entityList.add(coordinate);
|
||||
//}
|
||||
//绘制
|
||||
//V2XServiceManager
|
||||
// .getMoGoV2XMarkerManager()
|
||||
// .drawableSpecialCarPOI(context, coordinate, V2XMarkerClickListener.getInstance());
|
||||
}
|
||||
}
|
||||
if (!entityList.isEmpty()) {
|
||||
//V2XUtils.runOnUiThread(() -> V2XServiceManager.getMoGoV2XScenarioManager().showOtherSeekHelpWindow(entityList));
|
||||
V2XUtils.runOnUiThread(() -> {
|
||||
V2XMessageEntity<List<V2XMarkerEntity>> v2XMessageEntity = new V2XMessageEntity<>();
|
||||
v2XMessageEntity.setType(V2XMessageEntity.V2XTypeEnum.ALERT_SEEK_WARNING);
|
||||
|
||||
@@ -56,66 +56,70 @@ public class V2XScenarioManager implements IV2XScenarioManager {
|
||||
@Override
|
||||
public void handlerMessage(V2XMessageEntity v2XMessageEntity) {
|
||||
//Logger.d(MODULE_NAME, "处理V2X场景:" + GsonUtil.jsonFromObject(v2XMessageEntity));
|
||||
synchronized (V2XScenarioManager.class) {
|
||||
// 展示
|
||||
V2XUtils.runOnUiThread(() -> {
|
||||
// 提取之前存储的场景
|
||||
if (v2XMessageEntity != null) {
|
||||
try {
|
||||
synchronized (V2XScenarioManager.class) {
|
||||
// 展示
|
||||
V2XUtils.runOnUiThread(() -> {
|
||||
// 提取之前存储的场景
|
||||
if (v2XMessageEntity != null) {
|
||||
|
||||
|
||||
// 广播给应用内部其它模块
|
||||
Intent intent = new Intent(V2XConst.BROADCAST_SCENE_ACTION);
|
||||
intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, v2XMessageEntity);
|
||||
LocalBroadcastManager.getInstance(V2XUtils.getApp()).sendBroadcast(intent);
|
||||
// 广播给应用内部其它模块
|
||||
Intent intent = new Intent(V2XConst.BROADCAST_SCENE_ACTION);
|
||||
intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, v2XMessageEntity);
|
||||
LocalBroadcastManager.getInstance(V2XUtils.getApp()).sendBroadcast(intent);
|
||||
|
||||
mV2XScenario = mV2XScenarioSet.get(v2XMessageEntity.getType());
|
||||
// 如果没有拿到之前的,根据类型分发
|
||||
if (mV2XScenario == null) {
|
||||
switch (v2XMessageEntity.getType()) {
|
||||
case V2XMessageEntity.V2XTypeEnum.ALERT_ROAD_WARNING:
|
||||
mV2XScenario = V2XRoadEventScenario.getInstance();
|
||||
break;
|
||||
case V2XMessageEntity.V2XTypeEnum.ALERT_SEEK_WARNING:
|
||||
mV2XScenario = V2XSeekHelpScenario.getInstance();
|
||||
break;
|
||||
case V2XMessageEntity.V2XTypeEnum.ALERT_FATIGUE_DRIVING:
|
||||
mV2XScenario = V2XFatigueDrivingScenario.getInstance();
|
||||
break;
|
||||
case V2XMessageEntity.V2XTypeEnum.ALERT_PUSH_WINDOW_WARNING:
|
||||
mV2XScenario = V2XPushEventScenario.getInstance();
|
||||
break;
|
||||
case V2XMessageEntity.V2XTypeEnum.ALERT_PUSH_LIVE_CAR_WARNING:
|
||||
mV2XScenario = V2XPushLiveCarScenario.getInstance();
|
||||
break;
|
||||
case V2XMessageEntity.V2XTypeEnum.ALERT_ANIMATION_WARNING:
|
||||
mV2XScenario = V2XAnimationScenario.getInstance();
|
||||
break;
|
||||
case V2XMessageEntity.V2XTypeEnum.ALERT_CAR_FOR_HELP:
|
||||
mV2XScenario = V2XCarForHelpScenario.getInstance();
|
||||
break;
|
||||
case V2XMessageEntity.V2XTypeEnum.ALERT_ILLEGAL_PARK_WARNING:
|
||||
mV2XScenario = V2XIllegalParkScenario.getInstance();
|
||||
break;
|
||||
case V2XMessageEntity.V2XTypeEnum.ALERT_EVENT_UGC_WARNING:
|
||||
mV2XScenario = V2XEventUgcScenario.getInstance();
|
||||
break;
|
||||
default:
|
||||
Logger.e(MODULE_NAME, "当前V2X消息类型未定义。");
|
||||
TipToast.tip("当前V2X消息类型未定义");
|
||||
return;
|
||||
mV2XScenario = mV2XScenarioSet.get(v2XMessageEntity.getType());
|
||||
// 如果没有拿到之前的,根据类型分发
|
||||
if (mV2XScenario == null) {
|
||||
switch (v2XMessageEntity.getType()) {
|
||||
case V2XMessageEntity.V2XTypeEnum.ALERT_ROAD_WARNING:
|
||||
mV2XScenario = V2XRoadEventScenario.getInstance();
|
||||
break;
|
||||
case V2XMessageEntity.V2XTypeEnum.ALERT_SEEK_WARNING:
|
||||
mV2XScenario = V2XSeekHelpScenario.getInstance();
|
||||
break;
|
||||
case V2XMessageEntity.V2XTypeEnum.ALERT_FATIGUE_DRIVING:
|
||||
mV2XScenario = V2XFatigueDrivingScenario.getInstance();
|
||||
break;
|
||||
case V2XMessageEntity.V2XTypeEnum.ALERT_PUSH_WINDOW_WARNING:
|
||||
mV2XScenario = V2XPushEventScenario.getInstance();
|
||||
break;
|
||||
case V2XMessageEntity.V2XTypeEnum.ALERT_PUSH_LIVE_CAR_WARNING:
|
||||
mV2XScenario = V2XPushLiveCarScenario.getInstance();
|
||||
break;
|
||||
case V2XMessageEntity.V2XTypeEnum.ALERT_ANIMATION_WARNING:
|
||||
mV2XScenario = V2XAnimationScenario.getInstance();
|
||||
break;
|
||||
case V2XMessageEntity.V2XTypeEnum.ALERT_CAR_FOR_HELP:
|
||||
mV2XScenario = V2XCarForHelpScenario.getInstance();
|
||||
break;
|
||||
case V2XMessageEntity.V2XTypeEnum.ALERT_ILLEGAL_PARK_WARNING:
|
||||
mV2XScenario = V2XIllegalParkScenario.getInstance();
|
||||
break;
|
||||
case V2XMessageEntity.V2XTypeEnum.ALERT_EVENT_UGC_WARNING:
|
||||
mV2XScenario = V2XEventUgcScenario.getInstance();
|
||||
break;
|
||||
default:
|
||||
Logger.e(MODULE_NAME, "当前V2X消息类型未定义。");
|
||||
TipToast.tip("当前V2X消息类型未定义");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// 展示最新的消息
|
||||
if (mV2XScenario != null) {
|
||||
if (v2XMessageEntity.getType() != V2XMessageEntity.V2XTypeEnum.ALERT_CAR_FOR_HELP) {
|
||||
hidOtherPanel();
|
||||
}
|
||||
mV2XScenario.init(v2XMessageEntity);
|
||||
mV2XScenarioSet.put(v2XMessageEntity.getType(), mV2XScenario);
|
||||
}
|
||||
}
|
||||
|
||||
// 展示最新的消息
|
||||
if (mV2XScenario != null) {
|
||||
if (v2XMessageEntity.getType() != V2XMessageEntity.V2XTypeEnum.ALERT_CAR_FOR_HELP) {
|
||||
hidOtherPanel();
|
||||
}
|
||||
mV2XScenario.init(v2XMessageEntity);
|
||||
mV2XScenarioSet.put(v2XMessageEntity.getType(), mV2XScenario);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -89,7 +89,6 @@ class AutoNaviIntentHandler implements IMogoVoiceCmdCallBack {
|
||||
break;
|
||||
case 10019:
|
||||
int extraState = intent.getIntExtra( "EXTRA_STATE", -1 );
|
||||
Logger.d( TAG, "EXTRA_STATE = " + extraState );
|
||||
switch ( extraState ) {
|
||||
case 3: // 前台
|
||||
syncAutoNaviNavingStatus( context );
|
||||
@@ -257,7 +256,6 @@ class AutoNaviIntentHandler implements IMogoVoiceCmdCallBack {
|
||||
}
|
||||
|
||||
public void syncAutoNaviForgroundStatus( Context context ) {
|
||||
Logger.d( TAG, "查询高德前后台状态" );
|
||||
Intent intent = new Intent();
|
||||
intent.setAction( "AUTONAVI_STANDARD_BROADCAST_RECV" );
|
||||
intent.putExtra( "KEY_TYPE", 12404 );
|
||||
@@ -266,7 +264,6 @@ class AutoNaviIntentHandler implements IMogoVoiceCmdCallBack {
|
||||
}
|
||||
|
||||
public void syncAutoNaviNavingStatus( Context context ) {
|
||||
Logger.d( TAG, "查询高德导航状态" );
|
||||
Intent intent = new Intent();
|
||||
intent.setAction( "AUTONAVI_STANDARD_BROADCAST_RECV" );
|
||||
intent.putExtra( "KEY_TYPE", 12404 );
|
||||
|
||||
@@ -107,7 +107,6 @@ public class MogoADASController implements IMogoADASController {
|
||||
mAutopolitDataCallBack = new IAutopolitDataCallBack() {
|
||||
@Override
|
||||
public void sendMsg( String msg ) {
|
||||
Logger.d( TAG, "收到adas数据回调: " + msg );
|
||||
for ( IMogoAdasDataCallback callback : adasDataCallbackList ) {
|
||||
try {
|
||||
callback.onAdasDataCallback( msg );
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.mogo.service.map.IMogoMapService;
|
||||
import com.mogo.service.network.IMogoNetwork;
|
||||
import com.mogo.service.statusmanager.IMogoMsgCenter;
|
||||
import com.mogo.service.statusmanager.IMogoStatusManager;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
@@ -23,6 +24,8 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
*/
|
||||
public class SingletonsHolder {
|
||||
|
||||
private static final String TAG = "SingletonsHolder";
|
||||
|
||||
private static final Map< Class, Object > sSingletons = new ConcurrentHashMap<>();
|
||||
|
||||
static {
|
||||
@@ -39,7 +42,7 @@ public class SingletonsHolder {
|
||||
|
||||
public static < T extends IProvider > void registerApi( Class< ? extends IProvider > api, T impl ) throws Exception {
|
||||
if ( api == null || impl == null ) {
|
||||
throw new Exception( "IProvider 接口类型和实例不能为 null" );
|
||||
return;
|
||||
}
|
||||
sSingletons.put( api, impl );
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 20 KiB |
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="true" android:drawable="@drawable/module_apps_ic_navigator_applist_pressed_light"/>
|
||||
<item android:drawable="@drawable/module_apps_ic_navigator_applist_light" />
|
||||
</selector>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="true" android:drawable="@drawable/module_apps_ic_navigator_im_pressed_light"/>
|
||||
<item android:drawable="@drawable/module_apps_ic_navigator_im_light" />
|
||||
</selector>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="true" android:drawable="@drawable/module_apps_ic_navigator_media_pressed_light"/>
|
||||
<item android:drawable="@drawable/module_apps_ic_navigator_media_light" />
|
||||
</selector>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="true" android:drawable="@drawable/module_apps_ic_navigator_navi_pressed_light"/>
|
||||
<item android:drawable="@drawable/module_apps_ic_navigator_navi_light" />
|
||||
</selector>
|
||||
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="module_main_window_background_color_light">#f7f7ff</color>
|
||||
</resources>
|
||||
BIN
skin/mogo-skin-light/src/main/module-services-res/drawable-ldpi/module_services_marker_bkg_light.png
Executable file → Normal file
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 5.6 KiB |
BIN
skin/mogo-skin-light/src/main/module-services-res/drawable-mdpi/module_services_marker_bkg_light.png
Executable file → Normal file
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 5.6 KiB |
BIN
skin/mogo-skin-light/src/main/module-services-res/drawable-xhdpi/module_services_marker_bkg_light.png
Executable file → Normal file
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.9 KiB |