Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
wangcongtao
2020-12-04 18:41:01 +08:00
238 changed files with 1084 additions and 616 deletions

4
.idea/gradle.xml generated
View File

@@ -31,9 +31,6 @@
<option value="$PROJECT_DIR$/modules/mogo-module-back" />
<option value="$PROJECT_DIR$/modules/mogo-module-common" />
<option value="$PROJECT_DIR$/modules/mogo-module-extensions" />
<option value="$PROJECT_DIR$/modules/mogo-module-gps-simulator" />
<option value="$PROJECT_DIR$/modules/mogo-module-gps-simulator-debug" />
<option value="$PROJECT_DIR$/modules/mogo-module-gps-simulator-noop" />
<option value="$PROJECT_DIR$/modules/mogo-module-guide" />
<option value="$PROJECT_DIR$/modules/mogo-module-left-panel" />
<option value="$PROJECT_DIR$/modules/mogo-module-left-panel-noop" />
@@ -77,7 +74,6 @@
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
<option name="useQualifiedModuleNames" value="true" />
</GradleProjectSettings>
</option>
</component>

View File

@@ -121,6 +121,8 @@ android {
buildConfigField 'boolean', 'IS_MAP_BASED', 'true'
// 是否加载引导模块
buildConfigField 'boolean', 'IS_NEED_LOAD_GUIDE_MODULE', 'true'
// 分享时是否隐藏 adas
buildConfigField 'boolean', 'IS_NEED_HIDE_ADAS_WHEN_SHARE', 'false'
}
// f系列-分体机
@@ -144,6 +146,8 @@ android {
buildConfigField 'boolean', 'IS_MAP_BASED', 'true'
// 是否加载引导模块
buildConfigField 'boolean', 'IS_NEED_LOAD_GUIDE_MODULE', 'true'
// 分享时是否隐藏 adas
buildConfigField 'boolean', 'IS_NEED_HIDE_ADAS_WHEN_SHARE', 'false'
}
// e系列采用Launcher方案
e8xx {
@@ -166,6 +170,8 @@ android {
buildConfigField 'boolean', 'IS_MAP_BASED', 'true'
// 是否加载引导模块
buildConfigField 'boolean', 'IS_NEED_LOAD_GUIDE_MODULE', 'true'
// 分享时是否隐藏 adas
buildConfigField 'boolean', 'IS_NEED_HIDE_ADAS_WHEN_SHARE', 'false'
}
// 同上
em4 {
@@ -188,6 +194,8 @@ android {
buildConfigField 'boolean', 'IS_MAP_BASED', 'true'
// 是否加载引导模块
buildConfigField 'boolean', 'IS_NEED_LOAD_GUIDE_MODULE', 'true'
// 分享时是否隐藏 adas
buildConfigField 'boolean', 'IS_NEED_HIDE_ADAS_WHEN_SHARE', 'false'
}
// e系列-2+32对标D系列2+32采用独立app的形式
em3 {
@@ -210,6 +218,8 @@ android {
buildConfigField 'boolean', 'IS_MAP_BASED', 'true'
// 是否加载引导模块
buildConfigField 'boolean', 'IS_NEED_LOAD_GUIDE_MODULE', 'true'
// 分享时是否隐藏 adas
buildConfigField 'boolean', 'IS_NEED_HIDE_ADAS_WHEN_SHARE', 'false'
}
// e系列-1+16对标D系列1+16采用独立app形式
em1 {
@@ -232,6 +242,8 @@ android {
buildConfigField 'boolean', 'IS_MAP_BASED', 'false'
// 是否加载引导模块
buildConfigField 'boolean', 'IS_NEED_LOAD_GUIDE_MODULE', 'false'
// 分享时是否隐藏 adas
buildConfigField 'boolean', 'IS_NEED_HIDE_ADAS_WHEN_SHARE', 'false'
}
// e系列-1+16对标D系列1+16采用独立app形式
em2 {
@@ -254,6 +266,8 @@ android {
buildConfigField 'boolean', 'IS_MAP_BASED', 'false'
// 是否加载引导模块
buildConfigField 'boolean', 'IS_NEED_LOAD_GUIDE_MODULE', 'false'
// 分享时是否隐藏 adas
buildConfigField 'boolean', 'IS_NEED_HIDE_ADAS_WHEN_SHARE', 'false'
}
// d系列
d8xx {
@@ -276,6 +290,8 @@ android {
buildConfigField 'boolean', 'IS_MAP_BASED', 'true'
// 是否加载引导模块
buildConfigField 'boolean', 'IS_NEED_LOAD_GUIDE_MODULE', 'true'
// 分享时是否隐藏 adas
buildConfigField 'boolean', 'IS_NEED_HIDE_ADAS_WHEN_SHARE', 'true'
}
// d系列 2 + 32
d80x {
@@ -298,6 +314,8 @@ android {
buildConfigField 'boolean', 'IS_MAP_BASED', 'true'
// 是否加载引导模块
buildConfigField 'boolean', 'IS_NEED_LOAD_GUIDE_MODULE', 'true'
// 分享时是否隐藏 adas
buildConfigField 'boolean', 'IS_NEED_HIDE_ADAS_WHEN_SHARE', 'true'
}
// d系列 1+16 版本
d82x {
@@ -320,6 +338,8 @@ android {
buildConfigField 'boolean', 'IS_MAP_BASED', 'false'
// 是否加载引导模块
buildConfigField 'boolean', 'IS_NEED_LOAD_GUIDE_MODULE', 'false'
// 分享时是否隐藏 adas
buildConfigField 'boolean', 'IS_NEED_HIDE_ADAS_WHEN_SHARE', 'true'
}
// 比亚迪
bydauto {
@@ -342,6 +362,8 @@ android {
buildConfigField 'boolean', 'IS_MAP_BASED', 'true'
// 是否加载引导模块
buildConfigField 'boolean', 'IS_NEED_LOAD_GUIDE_MODULE', 'true'
// 分享时是否隐藏 adas
buildConfigField 'boolean', 'IS_NEED_HIDE_ADAS_WHEN_SHARE', 'false'
}
qa {
dimension "env"

View File

@@ -57,7 +57,7 @@ public class MogoApplication extends AbsMogoApplication {
crashSystem.init();
//设置debug模式日志不上传
crashSystem.setDebug( BuildConfig.DEBUG );
Logger.init( BuildConfig.DEBUG ? LogLevel.VERBOSE : LogLevel.VERBOSE );
Logger.init( BuildConfig.DEBUG ? LogLevel.VERBOSE : LogLevel.OFF );
if( DebugConfig.isNeedLoadGuideModule() ){
MogoModulePaths.addModule( new MogoModule( MogoModulePaths.PATH_GUIDE, MogoModulePaths.PATH_GUIDE ) );
@@ -129,6 +129,7 @@ public class MogoApplication extends AbsMogoApplication {
DebugConfig.setSupportLauncherCardRefreshStrategy( BuildConfig.IS_SUPPORT_LAUNCHER_CARD_REFRESH_STRATEGY );
DebugConfig.setMapBased( BuildConfig.IS_MAP_BASED );
DebugConfig.setNeedLoadGuideModule( BuildConfig.IS_NEED_LOAD_GUIDE_MODULE );
DebugConfig.setNeedHideAdasWhenShare( BuildConfig.IS_NEED_HIDE_ADAS_WHEN_SHARE );
}
@Override

View File

@@ -131,7 +131,7 @@ ext {
jetbrainsannotationsjava5 : "org.jetbrains:annotations-java5:15.0",
// 统一登录
accountsdk : "com.zhidao.accountservice:account-sdk:1.0.17",
accountsdk : "com.zhidao.accountservice:account-sdk:1.0.18",
// crash
crashSdk : "com.zhidaoauto.crash.log:library:1.0.5",
kotlinstdlibjdk7 : "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${kotlin_version}",

View File

@@ -1,7 +1,5 @@
package com.mogo.commons.debug;
import com.mogo.utils.logger.Logger;
/**
* @author congtaowang
* @since 2019-12-23
@@ -318,4 +316,14 @@ public class DebugConfig {
public static boolean isNeedLoadGuideModule() {
return isNeedLoadGuideModule;
}
private static boolean isNeedHideAdasWhenShare = false;
public static boolean isNeedHideAdasWhenShare() {
return isNeedHideAdasWhenShare;
}
public static void setNeedHideAdasWhenShare( boolean isNeedHideAdas ) {
DebugConfig.isNeedHideAdasWhenShare = isNeedHideAdas;
}
}

View File

@@ -129,7 +129,7 @@ TTS_NOOP_VERSION=2.0.7
######## 外部依赖引用
# 车聊聊
CARCHATTING_VERSION=1.6.8-SNAPSHOT
CARCHATTING_VERSION=2.2.5
# 车聊聊接口
CARCHATTINGPROVIDER_VERSION=1.1.7
# loglib

View File

@@ -581,7 +581,11 @@ public class AMapNaviViewWrapper implements IMogoMapView,
// mMyLocationMarker.startAnimation();
// }
// });
mMyLocationMarker.startAnimation();
try {
mMyLocationMarker.startAnimation();
} catch ( Exception e ) {
e.printStackTrace();
}
}
@Override

View File

@@ -342,10 +342,16 @@ public class AMapMarkerWrapper implements IMogoMarker, Observer {
ScaleAnimation animationScale = new ScaleAnimation( fromX, toX, fromY, toY );
animationScale.setDuration( duration );
animationScale.setFillMode( Animation.FILL_MODE_FORWARDS );
animationScale.setInterpolator( interpolator );
if ( interpolator != null ) {
animationScale.setInterpolator( interpolator );
}
mMarker.setAnimation( animationScale );
mMarker.startAnimation();
try {
mMarker.startAnimation();
} catch ( Exception e ) {
e.printStackTrace();
}
}
@Override
@@ -357,7 +363,9 @@ public class AMapMarkerWrapper implements IMogoMarker, Observer {
ScaleAnimation animationScale = new ScaleAnimation( fromX, toX, fromY, toY );
animationScale.setDuration( duration );
animationScale.setFillMode( Animation.FILL_MODE_FORWARDS );
animationScale.setInterpolator( interpolator );
if ( interpolator != null ) {
animationScale.setInterpolator( interpolator );
}
animationScale.setAnimationListener( new Animation.AnimationListener() {
@Override
public void onAnimationStart() {
@@ -398,7 +406,9 @@ public class AMapMarkerWrapper implements IMogoMarker, Observer {
AnimationSet animationSet = new AnimationSet( true );
animationSet.setDuration( duration );
animationSet.setInterpolator( interpolator );
if ( interpolator != null ) {
animationSet.setInterpolator( interpolator );
}
animationSet.setAnimationListener( new Animation.AnimationListener() {
@Override
public void onAnimationStart() {
@@ -422,7 +432,11 @@ public class AMapMarkerWrapper implements IMogoMarker, Observer {
} );
mMarker.setAnimation( animationSet );
mMarker.startAnimation();
try {
mMarker.startAnimation();
} catch ( Exception e ) {
e.printStackTrace();
}
}
@Override

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

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

View File

@@ -135,7 +135,8 @@ object CarCorderController : TakePhotoCallback, TakeVideoCallback {
mainInfoId,
mLongitude,
mLatitude,
mSpeed
mSpeed,
mFromType
)
//地图上打点
@@ -175,7 +176,8 @@ object CarCorderController : TakePhotoCallback, TakeVideoCallback {
mainInfoId,
mLongitude,
mLatitude,
mSpeed
mSpeed,
mFromType
)
}
@@ -350,7 +352,8 @@ object CarCorderController : TakePhotoCallback, TakeVideoCallback {
mainInfoId,
mLongitude,
mLatitude,
mSpeed
mSpeed,
mFromType
)
//地图上打点
@@ -424,9 +427,9 @@ object CarCorderController : TakePhotoCallback, TakeVideoCallback {
mainInfoId,
mLongitude,
mLatitude,
mSpeed
mSpeed,
mFromType
)
}
//获取图片

View File

@@ -146,7 +146,8 @@ class CosStatusController : CosStatusCallback {
mainInfoId,
mLongitude,
mLatitude,
mSpeed
mSpeed,
mFromType
)
}
Log.d(TAG, "delete file: $localPath")
@@ -161,7 +162,7 @@ class CosStatusController : CosStatusCallback {
// CosCallbackMapController.mainService?.sendCustomResult(it)
// }
// } else {
sendInformationDirectly(type, map, mType, entity, mainInfoId, mLongitude, mLatitude, mSpeed)
sendInformationDirectly(type, map, mType, entity, mainInfoId, mLongitude, mLatitude, mSpeed,mFromType)
// }
}
@@ -176,13 +177,14 @@ class CosStatusController : CosStatusCallback {
mainInfoId: Long,
longitude: Double,
latitude: Double,
speed: Float
speed: Float,
fromType: String
) {
Log.d(TAG, "sendInformationDirectly poiType= $poiType ---- mainInfoId= $mainInfoId --- isCustom = ${entity?.isCustom}")
Log.d(TAG, "sendInformationDirectly poiType= $poiType --fromType =$fromType ---- mainInfoId= $mainInfoId --- isCustom = ${entity?.isCustom}")
//开始上传
entity?.isCustom?.let {
mainServiceHttpModel.sendInformationMessage(
fromType = mFromType,
fromType = fromType,
type = type,
url = map,
isCustom = it,

View File

@@ -75,15 +75,8 @@ class MainService : Service() {
private var mLatitude: Double = 0.0
lateinit var serviceApis: IMogoServiceApis
//发送主动上报结果广播给外部
// fun sendCustomResult(result: Boolean) {
// var intent = Intent(customResultAction)
// intent.putExtra("isSuccess", result)
// sendBroadcast(intent)
// }
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
Log.d(TAG, "onStartCommand -----------> ")
//清理多媒体资源和sp策略数据
clearStrategyType(this)
//初始化埋点
@@ -95,7 +88,7 @@ class MainService : Service() {
VoiceController.initVoice()
serviceApis = ARouter.getInstance().build(MogoServicePaths.PATH_SERVICE_APIS).navigation(this) as IMogoServiceApis
speed = serviceApis.getMapServiceApi().getSingletonLocationClient(this).getLastKnowLocation().getSpeed()
Log.d(TAG, "onStartCommand speed = $speed" )
Log.d(TAG, "onStartCommand speed = $speed")
if (intent != null) {
params = intent.getParcelableExtra("params")
params?.let {
@@ -105,18 +98,12 @@ class MainService : Service() {
mLongitude = it.lon
mLatitude = it.lat
Log.d(TAG, "onStartCommand shareType = $shareType --fromType = $fromType --mainInfoId = $mainInfoId -- mLongitude = $mLongitude --mLatitude = $mLatitude --it.duration = ${it.duration} ")
// if (shareType == TANLU_ROAD_CONGESTION || shareType == TANLU_TRAFFIC_CHECK || shareType == TANLU_ROAD_CLOSURE || shareType == TANLU_ROAD_CURRENT
// || shareType == TANLU_ROAD_PONDING || shareType == TANLU_ROAD_ICING || shareType == TANLU_ROAD_HEAVY_FOG
// || shareType == TANLU_ROAD_ACCIDENT || shareType == TANLU_ROAD_WORK
// ) {
// takePhoto(1, false, true)
if (fromType == UPLOAD_FROM_STRATEGY_ACCIDENT_AUTO || fromType == UPLOAD_FROM_STRATEGY_BLOCK_AUTO) {
// 如果是策略上报isCustom = false
takeVideo(it.duration)
} else {
takeVideo(it.duration, isCustom = true, id = id)
}
// }
if (fromType == UPLOAD_FROM_STRATEGY_ACCIDENT_AUTO || fromType == UPLOAD_FROM_STRATEGY_BLOCK_AUTO) {
// 如果是策略上报isCustom = false
takeVideo(it.duration)
} else {
takeVideo(it.duration, isCustom = true, id = id)
}
}
} else {
Log.e(TAG, "intent == null ")
@@ -210,20 +197,6 @@ class MainService : Service() {
// )
}
// private fun sendMarkerInfoReceiver(lat: Double, lon: Double, imageUrl: String?, type: String?) {
// Log.e("MainService", "sendMarkerInfoReceiver ------> type = $type ")
// Log.e("MainService", "sendMarkerInfoReceiver ------> fromType = $fromType ")
// Log.e("MainService", "sendMarkerInfoReceiver ------> isCustom = $isCustom ")
// var intent = Intent()
// intent.action = "com.zhidao.roadcondition.marker.info"
// intent.putExtra("type", type)
// intent.putExtra("imageUrl", imageUrl)
// intent.putExtra("lat", lat)
// intent.putExtra("lon", lon)
// intent.putExtra("custom", isCustom)
// intent.putExtra("fromType", fromType)
// sendBroadcast(intent)
// }
/**
* 初始化定位监听
@@ -290,7 +263,7 @@ class MainService : Service() {
}
//获取图片
private fun takePhoto( isInterval: Boolean = false, isCustom: Boolean = false) {
private fun takePhoto(isInterval: Boolean = false, isCustom: Boolean = false) {
Log.d("MainService", "takePhoto -----1----->")
//判断是否授权
// if (isAuthorization(BaseApplication.getAppContext())) {
@@ -388,7 +361,7 @@ class MainService : Service() {
override fun onDestroy() {
super.onDestroy()
unregisterReceiver(mAlarmBroadCast)
unregisterReceiver(mCustomSendBroadCast)
// unregisterReceiver(mCustomSendBroadCast)
CarCorderController.release()
CosCallbackMapController.release()
LatLngStickyEventBus.getInstance().unregister(this)

View File

@@ -2,6 +2,7 @@ package com.zhidao.roadcondition.service
import com.mogo.commons.AbsMogoApplication
import com.zhidao.auto.platform.voice.VoiceClient
import java.lang.Exception
/**
* @description 声音控制类
@@ -45,7 +46,11 @@ object VoiceController {
* @param customType 命令
*/
fun unRegisterCustomWakeupCmd(customType: String) {
voiceClient.unRegisterCustomWakeupCmd(customType)
try {
voiceClient.unRegisterCustomWakeupCmd(customType)
} catch (e:Exception){
}
}
/**

View File

@@ -44,6 +44,8 @@ public class AppsListActivity extends MvpActivity< AppsListView, AppsListPresent
getWindow().setStatusBarColor( Color.BLACK );
}
super.onCreate( savedInstanceState );
// 透明 activity 不会让前一个 activity 走 onStop 方法
AppServiceHandler.getApis().getStatusManagerApi().setMainPageIsBackgroundStatus( TAG, true );
AppServiceHandler.getApis().getStatusManagerApi().setAppListUIShow( TAG, true );
}

View File

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

View File

@@ -13,18 +13,18 @@ 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<>();
sApps.add( app );
sApps.add( app2 );
sApps.add( app3 );
// sApps.add( app3 );
sApps.add( app4 );
return sApps;
}
@@ -33,7 +33,7 @@ public class NavigatorApps {
List< AppInfo > sApps = new ArrayList<>();
sApps.add( app );
sApps.add( app2 );
sApps.add( app3 );
// sApps.add( app3 );
sApps.add( app4 );
return sApps;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

View File

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

View File

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

View File

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

View File

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

View File

@@ -23,7 +23,7 @@
<dimen name="module_apps_navigator_icon_width">160px</dimen>
<dimen name="module_apps_navigator_icon_height">160px</dimen>
<dimen name="module_apps_navigator_icon_divider">30px</dimen>
<dimen name="module_apps_navigator_icon_divider">10px</dimen>
<dimen name="module_apps_voice_icon_width">100px</dimen>
<dimen name="module_apps_voice_icon_height">100px</dimen>
</resources>

View File

@@ -26,6 +26,7 @@
<item>com.android.messaging</item>
<item>com.android.contacts</item>
<item>com.android.dialer</item>
<item>com.zhidao.imdemo</item>
</string-array>
<string-array name="module_apps_array_filter_packages">
<item>com.mogo.launcher</item>
@@ -44,5 +45,6 @@
<item>com.iflytek.inputmethod.pad</item>
<item>com.nwd.tools.reboot</item>
<item>com.android.car.setting</item>
<item>com.zhidao.imdemo</item>
</string-array>
</resources>

View File

@@ -2,11 +2,13 @@ package com.mogo.module.authorize.authprovider.module
import com.alibaba.android.arouter.launcher.ARouter
import com.mogo.commons.AbsMogoApplication
import com.mogo.commons.debug.DebugConfig
import com.mogo.module.authorize.authprovider.biz.MogoAuthorizeManagerImpl
import com.mogo.module.authorize.authprovider.biz.MogoAuthorizeRegisterHandler
import com.mogo.module.authorize.authprovider.launcher.MogoMainAuthorize.Companion.mogoAuthShow
import com.mogo.module.authorize.util.SharedPreferenceUtil
import com.mogo.service.module.IMogoModuleProvider
import com.mogo.utils.logger.Logger
class MogoModuleAuthorize private constructor() : MogoAuthorizeManagerImpl(), IMogoAuthorizeModuleProvider {
@@ -21,14 +23,18 @@ class MogoModuleAuthorize private constructor() : MogoAuthorizeManagerImpl(), IM
}
override fun invokeAuthorization(tag: String) {
if(!SharedPreferenceUtil.hasGuide()){
val guideService = ARouter.getInstance().build("/guide/showFragment").navigation()
if(guideService is IMogoModuleProvider){
guideService.init(AbsMogoApplication.getApp().applicationContext)
if (DebugConfig.isNeedLoadGuideModule()) {
if(!SharedPreferenceUtil.hasGuide()){
val guideService = ARouter.getInstance().build("/guide/showFragment").navigation()
if(guideService is IMogoModuleProvider){
guideService.init(AbsMogoApplication.getApp().applicationContext)
}
val listener = MogoAuthorizeRegisterHandler.getAuthorizeListener(tag)
listener?.authorizeFailed("需要先执行用户引导")
return
}
val listener = MogoAuthorizeRegisterHandler.getAuthorizeListener(tag)
listener?.authorizeFailed("需要先执行用户引导")
return
}else{
Logger.i(TAG,"没有添加Guide模块无需判断是否引导准备展示授权")
}
mogoAuthShow.showAuthorizeView(tag, {
//todo SP存储状态

View File

@@ -42,7 +42,7 @@ public final class MogoApisHandler {
public IMogoServiceApis getApis() {
if ( sApis == null ) {
synchronized ( this ) {
if ( sApis != null ) {
if ( sApis == null ) {
sApis = ARouter.getInstance().navigation( IMogoServiceApis.class );
}
}

View File

@@ -7,7 +7,9 @@ import android.view.WindowManager;
import androidx.annotation.NonNull;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.module.common.MogoApisHandler;
import com.mogo.module.common.R;
import com.mogo.utils.logger.Logger;
/**
* 浮在各种wm上面的dialog基类调用了window.setType
@@ -15,13 +17,16 @@ import com.mogo.module.common.R;
* @author tongchenfei
*/
public class BaseFloatDialog extends Dialog {
private static final String TAG = "BaseFloatDialog";
public BaseFloatDialog(@NonNull Context context) {
this(context, R.style.BaseFloatDialogStyle);
}
public BaseFloatDialog(@NonNull Context context, int themeResId) {
super(context, themeResId);
if(DebugConfig.getCarMachineType() != DebugConfig.CAR_MACHINE_TYPE_BYD) {
if (DebugConfig.getCarMachineType() != DebugConfig.CAR_MACHINE_TYPE_BYD) {
addFlag();
}
}
@@ -32,4 +37,23 @@ public class BaseFloatDialog extends Dialog {
| WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION
| WindowManager.LayoutParams.FLAG_LOCAL_FOCUS_MODE);
}
@Override
public void show() {
Logger.d(TAG, "onShow====");
if (DebugConfig.isNeedHideAdasWhenShare()) {
MogoApisHandler.getInstance().getApis().getAdasControllerApi().closeADAS();
}
super.show();
}
@Override
public void dismiss() {
Logger.d(TAG, "onDismiss====");
if (DebugConfig.isNeedHideAdasWhenShare()
&& MogoApisHandler.getInstance().getApis().getStatusManagerApi().isMainPageOnResume()) {
MogoApisHandler.getInstance().getApis().getAdasControllerApi().showADAS();
}
super.dismiss();
}
}

View File

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/module_common_icon_close_press" android:state_pressed="true" />
<item android:drawable="@drawable/module_common_icon_close" android:state_pressed="false" />
<item android:drawable="@drawable/module_common_icon_close" />
</selector>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/selector_call_btn_pressed" android:state_pressed="true" />
<item android:drawable="@drawable/selector_call_btn_normal" android:state_pressed="false" />
<item android:drawable="@drawable/selector_call_btn_normal" />
</selector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

@@ -1,15 +1,10 @@
package com.mogo.module.extensions.entrance;
import android.content.Intent;
import android.graphics.Color;
import android.graphics.Rect;
import android.os.Bundle;
import android.os.Debug;
import android.os.Handler;
import android.text.SpannableString;
import android.text.Spanned;
import android.text.TextUtils;
import android.text.style.ForegroundColorSpan;
import android.util.TypedValue;
import android.view.LayoutInflater;
import android.view.MotionEvent;
@@ -26,7 +21,6 @@ import androidx.constraintlayout.widget.ConstraintSet;
import androidx.constraintlayout.widget.Group;
import com.alibaba.android.arouter.launcher.ARouter;
import com.amap.api.maps.model.MyLocationStyle;
import com.bumptech.glide.request.RequestOptions;
import com.mogo.commons.AbsMogoApplication;
import com.mogo.commons.debug.DebugConfig;
@@ -187,6 +181,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
};
private Group seekHelpGroup;
private Group groupUserHead;
private UploadButtonAnimatorController mUploadButtonAnimatorController;
@@ -196,9 +191,9 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
@Override
protected int getLayoutId() {
if(DebugConfig.isMapBased()) {
if (DebugConfig.isMapBased()) {
return R.layout.module_ext_layout_entrance;
}else{
} else {
return R.layout.module_ext_layout_entrance_no_map;
}
}
@@ -221,20 +216,20 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
mUploadRoadCondition = findViewById(R.id.module_entrance_id_upload_road_condition);
mUpload = findViewById(R.id.module_entrance_id_upload);
mUploading = findViewById(R.id.module_entrance_id_uploading);
mUploadRoadCondition.setOnClickListener( new OnPreventFastClickListener() {
mUploadRoadCondition.setOnClickListener(new OnPreventFastClickListener() {
@Override
public void onClickImpl( View v ) {
public void onClickImpl(View v) {
showShareDialog();
playShareGuideVoice();
}
} );
});
mDisplayOverview = findViewById(R.id.module_ext_id_display_overview);
mDisplayOverviewText = findViewById(R.id.module_ext_id_display_overview_text);
mDisplayOverviewIcon = findViewById(R.id.module_ext_id_display_overview_icon);
mDisplayOverview.setOnClickListener( new OnPreventFastClickListener() {
mDisplayOverview.setOnClickListener(new OnPreventFastClickListener() {
@Override
public void onClickImpl( View v ) {
public void onClickImpl(View v) {
if (getContext() != null) {
// 加此判断是解决下面setDisplayOverview后本Fragment回调中出现not attached to a context问题
if (!mStatusManager.isDisplayOverview()) {
@@ -248,12 +243,12 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
mStatusManager.setDisplayOverview(TAG, !mStatusManager.isDisplayOverview());
}
}
} );
});
mMove2CurrentLocation = findViewById(R.id.module_entrance_id_move2_current_location);
mMove2CurrentLocation.setOnClickListener( new OnPreventFastClickListener() {
mMove2CurrentLocation.setOnClickListener(new OnPreventFastClickListener() {
@Override
public void onClickImpl( View v ) {
public void onClickImpl(View v) {
if (mStatusManager.isDisplayOverview()) {
mStatusManager.setDisplayOverview(TAG, false);
UiThreadHandler.removeCallbacks(mLockCarRunnable);
@@ -267,12 +262,12 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
// } else {
//
// }
if ( !mApis.getRefreshStrategyControllerApi().restartAutoRefreshAtTime( 0 ) ) {
if (!mApis.getRefreshStrategyControllerApi().restartAutoRefreshAtTime(0)) {
mStatusManager.setUserInteractionStatus(TAG, true, false);
mMApUIController.recoverLockMode();
}
}
} );
});
if (DebugConfig.isDebug()) {
mMove2CurrentLocation.setOnLongClickListener(view -> {
@@ -293,9 +288,9 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
}
mExitNavi = findViewById(R.id.module_entrance_id_exit_navi);
mExitNavi.setOnClickListener( new OnPreventFastClickListener() {
mExitNavi.setOnClickListener(new OnPreventFastClickListener() {
@Override
public void onClickImpl( View v ) {
public void onClickImpl(View v) {
if (mMogoNavi != null) {
if (mIsLock) {
new WMDialog.Builder(getContext())
@@ -316,19 +311,19 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
}
}
}
} );
});
mCameraMode = findViewById(R.id.module_ext_id_north);
mCameraMode.setOnClickListener( new OnPreventFastClickListener() {
mCameraMode.setOnClickListener(new OnPreventFastClickListener() {
@Override
public void onClickImpl( View v ) {
public void onClickImpl(View v) {
if (mCameraMode.isSelected()) {
mMApUIController.changeMapMode(EnumMapUI.CarUp_2D);
} else {
mMApUIController.changeMapMode(EnumMapUI.NorthUP_2D);
}
}
} );
});
mApis.getIntentManagerApi().registerIntentListener(AUTONAVI_STANDARD_BROADCAST_RECV, this);
@@ -349,42 +344,43 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
mNaviInfo = new NaviInfoView();
mNaviInfo.inflate(rootView);
findViewById(R.id.module_map_id_navi_bg).setOnClickListener( new OnPreventFastClickListener() {
findViewById(R.id.module_map_id_navi_bg).setOnClickListener(new OnPreventFastClickListener() {
@Override
public void onClickImpl( View v ) {
public void onClickImpl(View v) {
try {
LaunchUtils.launchByPkg(getContext(), "com.autonavi.amapauto");
} catch (Exception e) {
e.printStackTrace();
}
}
} );
});
mWeatherContainer = findViewById(R.id.module_ext_id_weather_container);
mWeatherIcon = findViewById(R.id.module_ext_id_weather_icon);
mWeatherTemp = findViewById(R.id.module_ext_id_weather_temp);
mUserHeadImg = findViewById(R.id.ivUserHeadImg);
groupUserHead = findViewById(R.id.groupUserHead);
mMsgContainer = findViewById(R.id.module_ext_id_msg);
mMsgContainer.setOnClickListener( new OnPreventFastClickListener() {
mMsgContainer.setOnClickListener(new OnPreventFastClickListener() {
@Override
public void onClickImpl( View v ) {
public void onClickImpl(View v) {
try {
if ( mMessageHistoryPanelProvider == null ) {
mMessageHistoryPanelProvider = (IFragmentProvider)ARouter.getInstance().build("/push/ui/message").navigation(getContext());
if (mMessageHistoryPanelProvider == null) {
mMessageHistoryPanelProvider = (IFragmentProvider) ARouter.getInstance().build("/push/ui/message").navigation(getContext());
}
mMessageHistoryPanelProvider.createFragment( getActivity(), mMogoFragmentManager.getMessageHistoryContainerId(), null );
} catch( Exception e ){
mMessageHistoryPanelProvider.createFragment(getActivity(), mMogoFragmentManager.getMessageHistoryContainerId(), null);
} catch (Exception e) {
}
}
} );
});
mMsgCounter = findViewById(R.id.module_ext_id_msg_counter);
mUserHeadImg.setOnClickListener( new OnPreventFastClickListener() {
mUserHeadImg.setOnClickListener(new OnPreventFastClickListener() {
@Override
public void onClickImpl( View v ) {
public void onClickImpl(View v) {
try {
LaunchUtils.launchByPkg(getContext(), "com.zhidao.auto.personal");
// 埋点
@@ -396,23 +392,23 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
Logger.e(TAG, e, "打开个人中心Exception");
}
}
} );
});
mUserHeadImg.setVisibility(DebugConfig.isLauncher() ? View.VISIBLE : View.GONE);
groupUserHead.setVisibility(DebugConfig.isLauncher() ? View.VISIBLE : View.GONE);
mUploadButtonAnimatorController = new UploadButtonAnimatorController(mUploading, mUpload,
mStatusManager);
mOnlineCarEntrance = findViewById( R.id.module_ext_id_destination_online_car );
mOnlineCarEntrance.setOnClickListener( new OnPreventFastClickListener() {
mOnlineCarEntrance = findViewById(R.id.module_ext_id_destination_online_car);
mOnlineCarEntrance.setOnClickListener(new OnPreventFastClickListener() {
@Override
public void onClickImpl( View v ) {
public void onClickImpl(View v) {
MogoApisHandler.getInstance().getApis().getOnlineCarPanelApi().showPanel();
Map<String, Object> properties = new HashMap<>();
properties.put( "type", 1 );
MogoApisHandler.getInstance().getApis().getAnalyticsApi().track( "APP_Find_Mogoer", properties );
properties.put("type", 1);
MogoApisHandler.getInstance().getApis().getAnalyticsApi().track("APP_Find_Mogoer", properties);
}
} );
});
dealWeatherContainer();
@@ -425,16 +421,17 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
mMove2CurrentLocation.setVisibility(View.GONE);
mWeatherContainer.setVisibility(View.GONE);
mMsgContainer.setVisibility(View.GONE);
mUserHeadImg.setVisibility(View.GONE);
groupUserHead.setVisibility(View.GONE);
}
isShowGuide = SharedPrefsMgr.getInstance(AbsMogoApplication.getApp()).getBoolean(getSpGuide(), false);
Logger.d(TAG, " isShowGuide = " + isShowGuide + " --isGreaterThanOneDay = " + isGreaterThanOneDay());
if (isShowGuide && isGreaterThanOneDay()) {
UiThreadHandler.postDelayed(() -> {
playShareOuterGuideVoice();
}, 5_000L
);
if (DebugConfig.isNeedLoadGuideModule()) {
isShowGuide = SharedPrefsMgr.getInstance(AbsMogoApplication.getApp()).getBoolean(getSpGuide(), false);
Logger.d(TAG, " isShowGuide = " + isShowGuide + " --isGreaterThanOneDay = " + isGreaterThanOneDay());
if (isShowGuide && isGreaterThanOneDay()) {
UiThreadHandler.postDelayed(this::playShareOuterGuideVoice, 5_000L);
}
} else {
UiThreadHandler.postDelayed(this::playShareOuterGuideVoice, 5_000L);
}
}
@@ -464,7 +461,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
if (shareItemSum < serverIssueCount) {
long time = System.currentTimeMillis();
Logger.d(TAG, " playShareOuterGuideVoice shareItemSum = " + shareItemSum + "---- intervalTime = " + intervalTime + "----serverIssueCount = " + serverIssueCount + "---time = " + time);
Logger.d(TAG, " playShareOuterGuideVoice shareItemSum = " + shareItemSum + "---- intervalTime = " + intervalTime + "----serverIssueCount = " + serverIssueCount + "---time = " + time);
if (intervalTime == 0) {
SharedPrefsMgr.getInstance(getContext()).putLong(KEY_SHARE_OUTER_GUIDE_TIME, time);
SharedPrefsMgr.getInstance(getContext()).putInt(KEY_SHARE_OUTER_GUIDE, ++shareItemSum);
@@ -499,7 +496,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
int shareItemSum = SharedPrefsMgr.getInstance(getContext()).getInt(KEY_CLICK_SHARE_BUTTON, 0);
if (shareItemSum < VOICE_ALERT_COUNT) {
long time = System.currentTimeMillis();
Logger.d(TAG, " playShareGuideVoice shareItemSum = " + shareItemSum + "---- intervalTime = " + intervalTime + ">>> time = " + time);
Logger.d(TAG, " playShareGuideVoice shareItemSum = " + shareItemSum + "---- intervalTime = " + intervalTime + ">>> time = " + time);
if (intervalTime == 0) {
SharedPrefsMgr.getInstance(getContext()).putLong(KEY_CLICK_SHARE_TIME, time);
SharedPrefsMgr.getInstance(getContext()).putInt(KEY_CLICK_SHARE_BUTTON, ++shareItemSum);
@@ -524,6 +521,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
/**
* 地图移动和缩放回调
*
* @param latLng 中点的经纬度
* @param zoom 缩放大小
* @param tilt 倾斜度
@@ -539,7 +537,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
int shareItemSum = SharedPrefsMgr.getInstance(getContext()).getInt(KEY_SHARE_INNER_GUIDE, 0);
if (shareItemSum < VOICE_ALERT_COUNT) {
long time = System.currentTimeMillis();
Logger.d(TAG, " showSlideMapVoiceGuide shareItemSum = " + shareItemSum + "---- intervalTime = " + intervalTime + "---time = " + time);
Logger.d(TAG, " showSlideMapVoiceGuide shareItemSum = " + shareItemSum + "---- intervalTime = " + intervalTime + "---time = " + time);
if (intervalTime == 0) {
SharedPrefsMgr.getInstance(getContext()).putLong(KEY_SHARE_INNER_GUIDE_TIME, time);
SharedPrefsMgr.getInstance(getContext()).putInt(KEY_SHARE_INNER_GUIDE, ++shareItemSum);
@@ -587,11 +585,11 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
/**
* 由于Launcher和Independent对于天气的表现形式不太一样所以通过此方法区分处理
*/
private void dealWeatherContainer(){
private void dealWeatherContainer() {
if (!DebugConfig.isLauncher()) {
ConstraintSet constraintSet = new ConstraintSet();
constraintSet.clone((ConstraintLayout) getView());
constraintSet.clear(R.id.module_ext_id_weather_container,ConstraintSet.START);
constraintSet.clear(R.id.module_ext_id_weather_container, ConstraintSet.START);
constraintSet.connect(R.id.module_ext_id_weather_container, ConstraintSet.END,
getView().getId(), ConstraintSet.END);
constraintSet.applyTo((ConstraintLayout) getView());
@@ -669,11 +667,11 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
}
mCameraMode.setText(getString(mCameraMode.isSelected() ?
R.string.mode_car_up : R.string.mode_north_up));
} else if( key_type == 10021 ){
} else if (key_type == 10021) {
try {
onStopNavi();
} catch ( Exception e ) {
Logger.e( TAG, e, "onIntentReceived -> 10021" );
} catch (Exception e) {
Logger.e(TAG, e, "onIntentReceived -> 10021");
}
}
}
@@ -777,7 +775,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
return;
}
if (descriptor == StatusDescriptor.UPLOADING&&DebugConfig.isLauncher()) {
if (descriptor == StatusDescriptor.UPLOADING && DebugConfig.isLauncher()) {
if (isTrue) {
mUploading.setVisibility(View.VISIBLE);
mUpload.setVisibility(View.GONE);
@@ -851,7 +849,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
Logger.d(TAG, "renderUserInfo: " + userInfo);
RequestOptions options =
new RequestOptions().circleCrop().placeholder(R.drawable.model_ext_default_user_head).error(R.drawable.model_ext_default_user_head);
GlideApp.with(getContext()).asBitmap().apply( options ).load(userInfo.getHeadImgurl()).into(new SkinAbleBitmapTarget(mUserHeadImg, options));
GlideApp.with(getContext()).asBitmap().apply(options).load(userInfo.getHeadImgurl()).into(new SkinAbleBitmapTarget(mUserHeadImg, options));
}
}
@@ -864,7 +862,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
"://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1605705236512" +
"&di=50620661ded7035fb84899a408f9f27e&imgtype=0&src=http%3A%2F%2Fb-ssl" +
".duitang.com%2Fuploads%2Fitem%2F201409%2F11%2F20140911211243_3rT4u.jpeg");
MyLocationUtil.setMyLocationIconUrl(getContext(),"https" +
MyLocationUtil.setMyLocationIconUrl(getContext(), "https" +
"://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1605705236512" +
"&di=50620661ded7035fb84899a408f9f27e&imgtype=0&src=http%3A%2F%2Fb-ssl" +
".duitang.com%2Fuploads%2Fitem%2F201409%2F11%2F20140911211243_3rT4u.jpeg");
@@ -953,28 +951,28 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
tv.setText("entrance add");
mApis.getEntranceButtonController().addBottomLayerView(tv, 50, 50);
});
findViewById(R.id.btnShowTextTip).setOnClickListener(v-> TipToast.tip("分享成功分享成功分享成功分享成功分享成功分享成功分享成功分享成功分享成功"));
findViewById(R.id.btnShowTextTip).setOnClickListener(v -> TipToast.tip("分享成功分享成功分享成功分享成功分享成功分享成功分享成功分享成功分享成功"));
findViewById(R.id.btnShowDrawableTip).setOnClickListener(v->{
findViewById(R.id.btnShowDrawableTip).setOnClickListener(v -> {
mMsgContainer.setVisibility(View.VISIBLE);
TipDrawable drawable =
new TipDrawable(getResources().getDrawable(R.drawable.model_ext_default_user_head), 150, 150);
TipToast.tip("分享成功",drawable);
TipToast.tip("分享成功", drawable);
});
findViewById(R.id.btnShowDrawableTipNoSize).setOnClickListener(v->{
findViewById(R.id.btnShowDrawableTipNoSize).setOnClickListener(v -> {
mMsgContainer.setVisibility(View.GONE);
String enthusiasmIndex = "一般的字加粗的字一般的字";
SpannableString spannableStringUnSelectCountStr = new SpannableString(enthusiasmIndex);
ForegroundColorSpan foregroundColorSpanUnSelectCount = new ForegroundColorSpan(Color.RED);
spannableStringUnSelectCountStr.setSpan(foregroundColorSpanUnSelectCount, 4, 7, Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
TipToast.tip(spannableStringUnSelectCountStr.toString());
// TipDrawable drawable =
// new TipDrawable(getResources().getDrawable(R.drawable.model_ext_default_user_head));
// TipToast.tip("分享成功",drawable);
// String enthusiasmIndex = "一般的字加粗的字一般的字";
// SpannableString spannableStringUnSelectCountStr = new SpannableString(enthusiasmIndex);
// ForegroundColorSpan foregroundColorSpanUnSelectCount = new ForegroundColorSpan(Color.RED);
// spannableStringUnSelectCountStr.setSpan(foregroundColorSpanUnSelectCount, 4, 7, Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
//
// TipToast.tip(spannableStringUnSelectCountStr.toString());
TipDrawable drawable =
new TipDrawable(getResources().getDrawable(R.drawable.model_ext_default_user_head));
TipToast.tip("分享成功", drawable);
});
}
@@ -997,30 +995,30 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
private IMogoOnMessageListener<String> seekHelpNoticeListener =
new IMogoOnMessageListener<String>() {
@Override
public Class target() {
return String.class;
}
@Override
public Class target() {
return String.class;
}
@Override
public void onMsgReceived(String obj) {
if(mStatusManager.isSeekHelping()) {
int seekNum = SharedPrefsMgr.getInstance(getContext()).getInt("seek_help_num", 0);
final int finalSeekNum = seekNum++;
SharedPrefsMgr.getInstance(getContext()).putInt("seek_help_num", seekNum);
handler.post(() -> {
seekHelpGroup.setVisibility(View.VISIBLE);
seekHelpNum.setText("" + finalSeekNum);
});
}
}
};
@Override
public void onMsgReceived(String obj) {
if (mStatusManager.isSeekHelping()) {
int seekNum = SharedPrefsMgr.getInstance(getContext()).getInt("seek_help_num", 0);
final int finalSeekNum = seekNum++;
SharedPrefsMgr.getInstance(getContext()).putInt("seek_help_num", seekNum);
handler.post(() -> {
seekHelpGroup.setVisibility(View.VISIBLE);
seekHelpNum.setText("" + finalSeekNum);
});
}
}
};
private Handler handler = new Handler();
private void listenSeekNumber(){
private void listenSeekNumber() {
mApis.getSocketManagerApi(getContext()).registerOnMessageListener(SEEK_HELP_NOTICE_NUM_MSG_TYPE, seekHelpNoticeListener);
mStatusManager.registerStatusChangedListener(TAG,StatusDescriptor.SEEK_HELPING,this);
mStatusManager.registerStatusChangedListener(TAG, StatusDescriptor.SEEK_HELPING, this);
}
@Override

View File

@@ -120,9 +120,6 @@ public class EntrancePresenter extends Presenter<EntranceView> implements Weathe
// 相当于每次onResume都会请求一下个人信息目的是能够相对及时的同步手机端的个人信息修改
requestUserInfo();
}
if(DebugConfig.isMapBased()) {
requestCarModelList();
}
getCommonConfig();
}
@@ -242,38 +239,4 @@ public class EntrancePresenter extends Presenter<EntranceView> implements Weathe
return "";
}
}
private void requestCarModelList() {
Map<String, String> params = new HashMap<>(8);
// params.put("sn", Utils.getSn());
params.put("sn", "ZD802B1932L00617");
mNetWork.create(UserInfoNetApiServices.class, DztHttpConstant.getBaseUrl()).
requestCarModelList(params).
subscribeOn(Schedulers.io()).
observeOn(Schedulers.io()).
subscribe(new SubscribeImpl<CarModelListResponse>(RequestOptions.create(context)) {
@Override
public void onSuccess(CarModelListResponse o) {
super.onSuccess(o);
Logger.d(TAG, "请求车模列表成功: " + o);
// todo 保存到sp中
SharedPrefsMgr.getInstance(context).putString("CAR_MODEL_LIST",
GsonUtil.jsonFromObject(o.getResult()));
}
@Override
public void onError(Throwable e) {
super.onError(e);
Logger.e(TAG, e, "请求自车模型失败");
}
@Override
public void onError(String message, int code) {
super.onError(message, code);
Logger.e(TAG, "请求自车模型失败: " + message);
}
});
}
}

View File

@@ -23,7 +23,4 @@ public interface UserInfoNetApiServices {
*/
@GET("carlife/carMachine/getAccountInfo")
Single<UserInfoResponse> requestUserInfo(@QueryMap Map<String, String> params);
@GET("yycp-userDataService/app/enthusiasm/getEnthusiasmInfo/v1")
Observable<CarModelListResponse> requestCarModelList(@QueryMap Map<String, String> params);
}

View File

@@ -48,7 +48,11 @@ public class TopViewManager implements IMogoTopViewManager {
public void addView(View view, ViewGroup.LayoutParams params,
IMogoTopViewStatusListener statusListener) {
parentParams = params;
TopViewAnimHelper.getInstance().startTopInAnim(view, params, statusListener);
try {
TopViewAnimHelper.getInstance().startTopInAnim(view, params, statusListener);
} catch ( Exception e ) {
e.printStackTrace();
}
}
@Override
@@ -72,7 +76,11 @@ public class TopViewManager implements IMogoTopViewManager {
public void addViewNoLinkage(View view, ViewGroup.LayoutParams params,
IMogoTopViewStatusListener statusListener) {
parentParams = params;
TopViewNoLinkageAnimHelper.getInstance().startTopInAnim(view, params, statusListener);
try {
TopViewNoLinkageAnimHelper.getInstance().startTopInAnim(view, params, statusListener);
} catch ( Exception e ) {
e.printStackTrace();
}
}
@Override
@@ -82,31 +90,55 @@ public class TopViewManager implements IMogoTopViewManager {
@Override
public void addSubView(View view, IMogoTopViewStatusListener statusListener) {
TopViewAnimHelper.getInstance().addSubView(view, parentParams, statusListener);
try {
TopViewAnimHelper.getInstance().addSubView(view, parentParams, statusListener);
} catch ( Exception e ) {
e.printStackTrace();
}
}
@Override
public void removeView(View view) {
TopViewAnimHelper.getInstance().startTopOutAnim(view);
try {
TopViewAnimHelper.getInstance().startTopOutAnim(view);
} catch ( Exception e ) {
e.printStackTrace();
}
}
@Override
public void removeViewNoLinkage(View view) {
TopViewNoLinkageAnimHelper.getInstance().startTopOutAnim(view);
try {
TopViewNoLinkageAnimHelper.getInstance().startTopOutAnim(view);
} catch ( Exception e ) {
e.printStackTrace();
}
}
@Override
public void removeSubView(View view) {
TopViewAnimHelper.getInstance().removeSubView(view);
try {
TopViewAnimHelper.getInstance().removeSubView(view);
} catch ( Exception e ) {
e.printStackTrace();
}
}
@Override
public boolean isViewAdded(View view) {
return TopViewAnimHelper.getInstance().isViewAdded(view);
try {
return TopViewAnimHelper.getInstance().isViewAdded(view);
} catch ( Exception e ){
return false;
}
}
@Override
public boolean isViewNoLinkageAdded(View view) {
return TopViewNoLinkageAnimHelper.getInstance().isViewAdded(view);
try {
return TopViewNoLinkageAnimHelper.getInstance().isViewAdded(view);
} catch( Exception e ){
return false;
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@@ -2,7 +2,7 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape android:shape="rectangle">
<gradient android:angle="135" android:endColor="#59000000" android:startColor="#59000000" android:type="linear" />
<gradient android:angle="135" android:endColor="#164079" android:startColor="#1363A4" android:type="linear" />
<corners android:radius="@dimen/module_ext_common_corner" />
</shape>
</item>

View File

@@ -69,14 +69,30 @@
tools:text="···" />
</RelativeLayout>
<ImageView
android:id="@+id/ivUserHeadBoard"
android:layout_width="@dimen/module_ext_user_avator_board_size"
android:layout_height="@dimen/module_ext_user_avator_board_size"
android:background="@drawable/model_ext_default_user_head_board"
android:layout_marginRight="@dimen/module_common_shadow_width_pos"
android:layout_marginTop="@dimen/module_common_shadow_width_pos"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
<ImageView
android:id="@+id/ivUserHeadImg"
android:layout_width="@dimen/module_ext_user_avator_size"
android:layout_height="@dimen/module_ext_user_avator_size"
android:layout_marginRight="@dimen/module_common_shadow_width_pos"
android:layout_marginTop="@dimen/module_common_shadow_width_pos"
android:src="@drawable/model_ext_default_user_head"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:visibility="visible" />
tools:visibility="visible"
app:layout_constraintLeft_toLeftOf="@id/ivUserHeadBoard"
app:layout_constraintTop_toTopOf="@id/ivUserHeadBoard"
app:layout_constraintRight_toRightOf="@id/ivUserHeadBoard"
app:layout_constraintBottom_toBottomOf="@id/ivUserHeadBoard"/>
<androidx.constraintlayout.widget.Group
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/groupUserHead"
app:constraint_referenced_ids="ivUserHeadBoard,ivUserHeadImg" />
</merge>

View File

@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="module_ext_msg_counter_margin">26px</dimen>
<dimen name="module_ext_user_avator_size">66px</dimen>
<dimen name="module_ext_user_avator_size">56px</dimen>
<dimen name="module_ext_user_avator_board_size">80px</dimen>
<dimen name="module_ext_layout_padding">10px</dimen>
<dimen name="module_ext_layout_paddingRight">2px</dimen>
<dimen name="module_ext_layout_paddingBottom">2px</dimen>

View File

@@ -147,7 +147,8 @@
<dimen name="module_ext_top_over_navi_height">40px</dimen>
<dimen name="module_ext_msg_counter_margin">45px</dimen>
<dimen name="module_ext_user_avator_size">120px</dimen>
<dimen name="module_ext_user_avator_size">100px</dimen>
<dimen name="module_ext_user_avator_board_size">134px</dimen>
<dimen name="module_ext_layout_padding">30px</dimen>
<dimen name="module_ext_layout_paddingRight">20px</dimen>
<dimen name="module_ext_layout_paddingBottom">20px</dimen>

View File

@@ -150,7 +150,8 @@
<dimen name="module_ext_notice_margin_start">10px</dimen>
<dimen name="module_ext_weather_margin_start">10px</dimen>
<dimen name="module_ext_msg_counter_margin">45px</dimen>
<dimen name="module_ext_user_avator_size">120px</dimen>
<dimen name="module_ext_user_avator_size">100px</dimen>
<dimen name="module_ext_user_avator_board_size">134px</dimen>
<dimen name="module_ext_layout_padding">30px</dimen>
<dimen name="module_ext_layout_paddingRight">20px</dimen>
<dimen name="module_ext_layout_paddingBottom">20px</dimen>

View File

@@ -158,7 +158,8 @@
<dimen name="module_ext_top_over_navi_height">19px</dimen>
<dimen name="module_ext_weather_margin_start">0px</dimen>
<dimen name="module_ext_msg_counter_margin">26px</dimen>
<dimen name="module_ext_user_avator_size">66px</dimen>
<dimen name="module_ext_user_avator_size">56px</dimen>
<dimen name="module_ext_user_avator_board_size">80px</dimen>
<dimen name="module_ext_layout_padding">10px</dimen>
<dimen name="module_ext_layout_paddingRight">2px</dimen>
<dimen name="module_ext_layout_paddingBottom">2px</dimen>

View File

@@ -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
@@ -370,9 +373,6 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
mServiceApis.getRefreshStrategyControllerApi().clearAllData();
AIAssist.getInstance( this ).release();
mServiceApis.getOnlineCarPanelApi().clear();
if ( CallChatApi.getInstance().getApiProvider() != null ) {
CallChatApi.getInstance().getApiProvider().initVehicleTeamContainer("init", 0, null);
}
ContextHolderUtil.releaseContext();
MogoModulesManager.getInstance().onDestroy();
SchemeIntent.getInstance().clear();

View File

@@ -7,6 +7,7 @@ import android.text.TextUtils;
import android.util.Log;
import com.mogo.map.MogoLatLng;
import com.mogo.module.common.MogoApisHandler;
import com.mogo.service.IMogoServiceApis;
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
import com.mogo.service.statusmanager.StatusDescriptor;

View File

@@ -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">
@@ -25,9 +26,9 @@
android:layout_width="@dimen/module_main_apps_fragment_container_width"
android:layout_height="match_parent"
android:paddingLeft="@dimen/module_main_apps_fragment_container_padding"
android:paddingRight="@dimen/module_main_apps_fragment_container_padding"
android:paddingTop="@dimen/module_main_apps_fragment_container_paddingTop"
android:paddingBottom="@dimen/module_main_apps_fragment_container_paddingTop"/>
android:paddingRight="@dimen/module_main_apps_fragment_container_padding"
android:paddingBottom="@dimen/module_main_apps_fragment_container_paddingTop" />
<!-- 左侧浮层,布局位置目前只考虑了1+16独立app情况 -->
<FrameLayout
@@ -42,8 +43,8 @@
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/module_main_id_entrance_fragment_container_marginLeft"
android:paddingLeft="@dimen/module_main_apps_fragment_container_padding"
android:paddingRight="@dimen/module_main_apps_fragment_container_padding"
android:paddingTop="@dimen/module_main_apps_fragment_container_paddingTop"
android:paddingRight="@dimen/module_main_apps_fragment_container_padding"
android:paddingBottom="@dimen/module_main_apps_fragment_container_paddingTop" />
<!-- 浮层-->
@@ -58,15 +59,15 @@
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/module_main_id_entrance_fragment_container_marginLeft"
android:paddingLeft="@dimen/module_main_event_panel_fragment_paddingLeft"
android:paddingRight="@dimen/module_main_event_panel_fragment_paddingRight"
android:paddingTop="@dimen/module_main_event_panel_fragment_paddingTop"
android:paddingRight="@dimen/module_main_event_panel_fragment_paddingRight"
android:paddingBottom="@dimen/module_main_event_panel_fragment_paddingBottom" />
<FrameLayout
android:id="@+id/module_main_id_message_history_fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/module_main_id_entrance_fragment_container_marginLeft"/>
android:layout_marginLeft="@dimen/module_main_id_entrance_fragment_container_marginLeft" />
<FrameLayout
android:id="@+id/module_main_id_search_fragment"
@@ -77,8 +78,8 @@
android:id="@+id/module_main_id_cover_up"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:background="@drawable/main_bitmap_splash_bg"
android:scaleType="centerCrop"
android:visibility="visible" />
<FrameLayout

View File

@@ -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">
<!-- 地图-->

View File

@@ -31,4 +31,9 @@
<dimen name="module_ext_top_view_max_width">1920px</dimen>
<dimen name="module_main_panel_margin_right">0px</dimen>
<!--事件面板-->
<dimen name="module_main_event_panel_fragment_paddingTop">0px</dimen>
<dimen name="module_main_event_panel_fragment_paddingBottom">0px</dimen>
<dimen name="module_main_event_panel_fragment_paddingLeft">6px</dimen>
<dimen name="module_main_event_panel_fragment_paddingRight">6px</dimen>
</resources>

View File

@@ -28,8 +28,8 @@
<dimen name="module_event_fragment_container_padding">20px</dimen>
<dimen name="module_main_apps_fragment_container_paddingTop">20px</dimen>
<dimen name="module_main_event_panel_fragment_paddingTop">15px</dimen>
<dimen name="module_main_event_panel_fragment_paddingBottom">15px</dimen>
<dimen name="module_main_event_panel_fragment_paddingLeft">15px</dimen>
<dimen name="module_main_event_panel_fragment_paddingRight">15px</dimen>
<dimen name="module_main_event_panel_fragment_paddingTop">20px</dimen>
<dimen name="module_main_event_panel_fragment_paddingBottom">18px</dimen>
<dimen name="module_main_event_panel_fragment_paddingLeft">18px</dimen>
<dimen name="module_main_event_panel_fragment_paddingRight">18px</dimen>
</resources>

View File

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

View File

@@ -33,6 +33,6 @@
<!--事件面板-->
<dimen name="module_main_event_panel_fragment_paddingTop">2px</dimen>
<dimen name="module_main_event_panel_fragment_paddingBottom">2px</dimen>
<dimen name="module_main_event_panel_fragment_paddingLeft">6px</dimen>
<dimen name="module_main_event_panel_fragment_paddingRight">6px</dimen>
<dimen name="module_main_event_panel_fragment_paddingLeft">2px</dimen>
<dimen name="module_main_event_panel_fragment_paddingRight">4px</dimen>
</resources>

View File

@@ -26,6 +26,7 @@ class AutoNaviBroadcastIntentHandler implements IMogoIntentListener {
// 接收高德
public static final String AUTONAVI_STANDARD_BROADCAST_SEND = "AUTONAVI_STANDARD_BROADCAST_SEND";
private EnumMapUI mLastAMapUiType = null;
public void register( IMogoIntentManager manager ) {
manager.registerIntentListener( AUTONAVI_STANDARD_BROADCAST_RECV, this );
@@ -131,11 +132,17 @@ class AutoNaviBroadcastIntentHandler implements IMogoIntentListener {
// 高德改变黑夜白天模式后传递给launcher顺便改变其他
if ( extraState == 37 ) {
// 白天模式
mLastAMapUiType = EnumMapUI.Type_Light;
MogoApisHandler.getInstance().getApis().getAdasControllerApi().changeAdasControlMode( EnumMapUI.Type_Light );
} else if ( extraState == 38 ) {
// 夜间模式
mLastAMapUiType = EnumMapUI.Type_Night;
MogoApisHandler.getInstance().getApis().getAdasControllerApi().changeAdasControlMode( EnumMapUI.Type_Night );
}
}
}
public EnumMapUI getLastAMapUiType() {
return mLastAMapUiType;
}
}

View File

@@ -103,6 +103,10 @@ class MapControlCommandHandler {
return;
}
if ( mCallback.getAMapLastType() == ui ) {
return;
}
int KEY_TYPE = 10048;
int state = 0;//2黑夜;1白天 ;0自动
switch ( ui ) {

View File

@@ -296,6 +296,14 @@ public class MapPresenter extends Presenter< MapView > implements
mRegisterCenter.registerADASControlStatusChangedListener( TAG, this );
}
@Override
public EnumMapUI getAMapLastType() {
if ( mAutoNaviReceiver != null ) {
return mAutoNaviReceiver.getLastAMapUiType();
}
return null;
}
private void initBroadcast() {
mAutoNaviReceiver = new AutoNaviBroadcastIntentHandler();
mAutoNaviReceiver.setCallback( this );

View File

@@ -36,4 +36,7 @@ public interface OnMapControlCallback {
// 缩放地图
void onZoomMap( boolean zoomIn );
// 高德地图上次类型
EnumMapUI getAMapLastType();
}

View File

@@ -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,20 +399,23 @@ 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);
}
};
if ( mCallProviderResponse == null ) {
mCallProviderResponse = new ICallChatResponse() {
@Override
public void hideUserWindowError(@NotNull String errorMsg) {
}
};
}
MogoApisHandler.getInstance().getApis().getShareManager().dismissShareDialog();
MogoApisHandler.getInstance().getApis().getOnlineCarPanelApi().hidePanel();
MogoApisHandler.getInstance().getApis().getAdasControllerApi().setSettingStatus(false);
MogoApisHandler.getInstance().getApis().getEventPanelManager().hidePanel();
carsChattingProvider = (ICarsChattingProvider) ARouter.getInstance().build(CallChattingProviderConstant.CAR_CALL_PROVIDER).navigation();
if ( carsChattingProvider == null ) {
carsChattingProvider = (ICarsChattingProvider) ARouter.getInstance().build(CallChattingProviderConstant.CAR_CALL_PROVIDER).navigation();
}
if ( carsChattingProvider != null ) {
carsChattingProvider.hideUserWindow("MOGO_COMMON_SERVICE", mContext, mCallProviderResponse);
carsChattingProvider.hideUserWindow(TAG, mContext, mCallProviderResponse);
}
}
@@ -433,6 +435,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);
@@ -482,6 +485,10 @@ public class MogoServices implements IMogoMapListener,
}
AutoPilotRemoteController.getInstance().start();
Intent intent = new Intent( "com.freedom.ser.ACTION" );
intent.addFlags( Intent.FLAG_INCLUDE_STOPPED_PACKAGES );
mContext.sendBroadcast( intent );
}
private void initLocationServiceProcess(Context context) {
@@ -566,7 +573,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 +591,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 +625,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 +672,6 @@ public class MogoServices implements IMogoMapListener,
if (mStatusManager.isUserInteracted()) {
mLastCustomRefreshCenterLocation = latLng;
mLastZoomLevel = zoom;
Logger.d(TAG, "user interacted");
return;
}
@@ -676,7 +679,6 @@ public class MogoServices implements IMogoMapListener,
if (mStatusManager.isV2XShow()) {
mLastCustomRefreshCenterLocation = latLng;
mLastZoomLevel = zoom;
Logger.d(TAG, "user v2x show");
return;
}
@@ -684,12 +686,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 +703,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 +736,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 +835,6 @@ public class MogoServices implements IMogoMapListener,
if (mStatusManager.isSearchUIShow()) {
return;
}
Logger.d(TAG, mAutoRefreshCallback == callback ? "触发自动刷新" : "触发手动刷新");
int amount = 20;
Message msg = Message.obtain();
@@ -886,16 +882,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);

View File

@@ -65,6 +65,13 @@ class AccStatusIntentHandler implements IntentHandler {
if ( state != ACC_OFF && state != ACC_ON && state != ACC_OFF_DELAY ) {
return;
}
if ( state == ACC_ON || state == ACC_OFF_DELAY ) {
Intent newIntent = new Intent( "com.freedom.ser.ACTION" );
newIntent.putExtra( "acc", true );
newIntent.addFlags( Intent.FLAG_INCLUDE_STOPPED_PACKAGES );
context.sendBroadcast( newIntent );
Logger.d( TAG, "发送广播com.freedom.ser.ACTION" );
}
boolean accOn = state == ACC_ON;
if ( MarkerServiceHandler.getMogoStatusManager().isAccOn() == accOn ) {
return;

View File

@@ -4,11 +4,9 @@ import android.content.Context;
import android.content.Intent;
import android.text.TextUtils;
import com.mogo.module.service.ServiceConst;
import com.mogo.utils.LaunchUtils;
import com.mogo.utils.TipToast;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.HashMap;
@@ -25,7 +23,7 @@ public class AppOperationIntentHandler implements IntentHandler {
public final Map< String, String > sAppPackages = new HashMap<>();
public AppOperationIntentHandler() {
sAppPackages.put( "车聊聊", "com.zhidao.imdemo" );
// sAppPackages.put( "车聊聊", "com.zhidao.imdemo" );
}
@Override

View File

@@ -129,6 +129,7 @@ class LauncherCardRefresher {
switch ( msg.what ) {
case MSG_WAIT_NETWORK:
trtRequestNetworkConfigStrategy();
break;
case MSG_LOAD_NET_CONFIG:
loadNetworkConfigStrategy();
break;
@@ -526,9 +527,18 @@ class LauncherCardRefresher {
} else if ( datum instanceof TtsConfigData.NearRoads ) {
result = handleNearRoadsTtsConfig( ( ( TtsConfigData.NearRoads ) datum ) );
} else if ( datum instanceof TtsConfigData.OnlineCarVsExplorerWay ) {
result = handleExplorerWayTtsConfig( ( ( TtsConfigData.OnlineCarVsExplorerWay ) datum ) );
if ( !result ) {
if ( node.type == LauncherCardRefreshType.ExplorerWay ) {
result = handleExplorerWayTtsConfig( ( ( TtsConfigData.OnlineCarVsExplorerWay ) datum ) );
if ( !result ) {
node.type = LauncherCardRefreshType.OnlineCar;
result = handleOnlineCarTtsConfig( ( ( TtsConfigData.OnlineCarVsExplorerWay ) datum ) );
}
} else if( node.type == LauncherCardRefreshType.OnlineCar ){
result = handleOnlineCarTtsConfig( ( ( TtsConfigData.OnlineCarVsExplorerWay ) datum ) );
if ( !result ) {
node.type = LauncherCardRefreshType.ExplorerWay;
result = handleExplorerWayTtsConfig( ( ( TtsConfigData.OnlineCarVsExplorerWay ) datum ) );
}
}
}
if ( result ) {
@@ -594,7 +604,7 @@ class LauncherCardRefresher {
String tts = mContext.getString( R.string.module_service_launcher_card_tips );
String info = mContext.getString( R.string.module_service_launcher_card_info );
speakTTS( String.format( tts, explorerWay.poiTotal, LauncherCardRefreshType.ExplorerWay.getDesc() ), false );
notifyRefreshChanged( String.format( info, explorerWay.poiTotal, LauncherCardRefreshType.ExplorerWay ), explorerWay.poiTotal, tts );
notifyRefreshChanged( String.format( info, explorerWay.poiTotal, LauncherCardRefreshType.ExplorerWay.getDesc() ), explorerWay.poiTotal, tts );
return true;
}
@@ -611,7 +621,7 @@ class LauncherCardRefresher {
String tts = mContext.getString( R.string.module_service_launcher_card_tips );
String info = mContext.getString( R.string.module_service_launcher_card_info );
speakTTS( String.format( tts, onlineCar.carTotal, LauncherCardRefreshType.OnlineCar.getDesc() ), false );
notifyRefreshChanged( String.format( info, onlineCar.carTotal, LauncherCardRefreshType.OnlineCar ), onlineCar.carTotal, tts );
notifyRefreshChanged( String.format( info, onlineCar.carTotal, LauncherCardRefreshType.OnlineCar.getDesc() ), onlineCar.carTotal, tts );
return true;
}

View File

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

View File

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

View File

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

View File

@@ -96,6 +96,7 @@ public class GlobalUnwakeManager implements IProvider, IMogoIntentListener, IMog
* @param type 面板位置索引
*/
private void showPanelByStatus(String target, int type){
MogoApisHandler.getInstance().getApis().getAdasControllerApi().setSettingStatus(false);
if ( MogoApisHandler.getInstance().getApis().getStatusManagerApi().isMainPageOnResume() ) {
MogoApisHandler.getInstance().getApis().getEventPanelManager().showPanelWithSelectedItem(type);
} else {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 434 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 434 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 434 B

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/service_car_panel_call_pressed" android:state_pressed="true" />
<item android:drawable="@drawable/service_car_panel_call_normal" android:state_pressed="false" />
<item android:drawable="@drawable/service_car_panel_call_normal" />
</selector>

View File

@@ -28,7 +28,7 @@
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_marginTop="@dimen/module_services_online_car_panel_close_margin_top"
android:src="@drawable/module_services_close" />
android:src="@drawable/module_common_close_selector" />
<ProgressBar
android:id="@+id/module_services_id_loading"

View File

@@ -62,7 +62,7 @@
android:layout_width="@dimen/modle_car_panel_call"
android:layout_height="@dimen/modle_car_panel_call"
android:layout_marginEnd="@dimen/modle_car_panel_call_margin"
android:background="@drawable/selector_service_car_panel_call"
android:background="@drawable/module_common_selector_call"
android:padding="@dimen/module_services_panel_item_detail_padding"
android:textColor="@color/module_services_panel_item_detail_textColor"
android:textSize="@dimen/module_services_panel_item_detail_textSize"

View File

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

View File

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

View File

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

Some files were not shown because too many files have changed in this diff Show More