Merge branch 'qa_1.1.5_2' into dev

This commit is contained in:
tongchenfei
2020-09-16 15:00:47 +08:00
11 changed files with 101 additions and 52 deletions

2
.idea/misc.xml generated
View File

@@ -4,7 +4,7 @@
<asm skipDebug="false" skipFrames="false" skipCode="false" expandFrames="false" />
<groovy codeStyle="LEGACY" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="JDK" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
</project>

View File

@@ -111,6 +111,8 @@ android {
buildConfigField 'boolean', 'USE_CUSTOM_NAVI', 'false'
// 是否加载引导模块
buildConfigField 'boolean', 'LOAD_GUIDE_MODULE', 'false'
// 是否支持换肤
buildConfigField 'boolean', 'IS_SKIN_SUPPORTED', 'true'
}
// f系列-分体机
f80x {
@@ -127,6 +129,8 @@ android {
buildConfigField 'boolean', 'USE_CUSTOM_NAVI', 'false'
// 是否加载引导模块
buildConfigField 'boolean', 'LOAD_GUIDE_MODULE', 'false'
// 是否支持换肤
buildConfigField 'boolean', 'IS_SKIN_SUPPORTED', 'true'
}
// e系列采用Launcher方案
e8xx {
@@ -143,6 +147,8 @@ android {
buildConfigField 'boolean', 'USE_CUSTOM_NAVI', 'false'
// 是否加载引导模块
buildConfigField 'boolean', 'LOAD_GUIDE_MODULE', 'false'
// 是否支持换肤
buildConfigField 'boolean', 'IS_SKIN_SUPPORTED', 'true'
}
// 同上
em4 {
@@ -159,6 +165,8 @@ android {
buildConfigField 'boolean', 'USE_CUSTOM_NAVI', 'false'
// 是否加载引导模块
buildConfigField 'boolean', 'LOAD_GUIDE_MODULE', 'false'
// 是否支持换肤
buildConfigField 'boolean', 'IS_SKIN_SUPPORTED', 'true'
}
// e系列-2+32对标D系列2+32采用独立app的形式
em3 {
@@ -175,6 +183,8 @@ android {
buildConfigField 'boolean', 'USE_CUSTOM_NAVI', 'false'
// 是否加载引导模块
buildConfigField 'boolean', 'LOAD_GUIDE_MODULE', 'false'
// 是否支持换肤
buildConfigField 'boolean', 'IS_SKIN_SUPPORTED', 'false'
}
// e系列-1+16对标D系列1+16采用独立app形式
em1 {
@@ -191,6 +201,8 @@ android {
buildConfigField 'boolean', 'USE_CUSTOM_NAVI', 'false'
// 是否加载引导模块
buildConfigField 'boolean', 'LOAD_GUIDE_MODULE', 'false'
// 是否支持换肤
buildConfigField 'boolean', 'IS_SKIN_SUPPORTED', 'false'
}
// d系列
d8xx {
@@ -207,6 +219,8 @@ android {
buildConfigField 'boolean', 'USE_CUSTOM_NAVI', 'false'
// 是否加载引导模块
buildConfigField 'boolean', 'LOAD_GUIDE_MODULE', 'true'
// 是否支持换肤
buildConfigField 'boolean', 'IS_SKIN_SUPPORTED', 'false'
}
// d系列 2 + 32
d80x {
@@ -223,6 +237,8 @@ android {
buildConfigField 'boolean', 'USE_CUSTOM_NAVI', 'false'
// 是否加载引导模块
buildConfigField 'boolean', 'LOAD_GUIDE_MODULE', 'true'
// 是否支持换肤
buildConfigField 'boolean', 'IS_SKIN_SUPPORTED', 'false'
}
// d系列 1+16 版本
d82x {
@@ -239,6 +255,8 @@ android {
buildConfigField 'boolean', 'USE_CUSTOM_NAVI', 'false'
// 是否加载引导模块
buildConfigField 'boolean', 'LOAD_GUIDE_MODULE', 'true'
// 是否支持换肤
buildConfigField 'boolean', 'IS_SKIN_SUPPORTED', 'false'
}
// 比亚迪
bydauto {
@@ -255,6 +273,8 @@ android {
buildConfigField 'boolean', 'USE_CUSTOM_NAVI', 'true'
// 是否加载引导模块
buildConfigField 'boolean', 'LOAD_GUIDE_MODULE', 'false'
// 是否支持换肤
buildConfigField 'boolean', 'IS_SKIN_SUPPORTED', 'false'
}
qa {
dimension "env"

View File

@@ -30,6 +30,7 @@ import com.mogo.test.crashreport.ITestCrashReportProvider;
import com.mogo.utils.UiThreadHandler;
import com.mogo.utils.logger.LogLevel;
import com.mogo.utils.logger.Logger;
import com.mogo.utils.storage.SharedPrefsMgr;
import com.squareup.leakcanary.LeakCanary;
import com.zhidao.boot.persistent.lib.PersistentManager;
import com.zhidao.mogo.module.left.panel.LeftPanelConst;
@@ -65,6 +66,8 @@ public class MogoApplication extends AbsMogoApplication {
if ( DebugConfig.isLoadGuideModule() ) {
MogoModulePaths.addModule( new MogoModule( PATH_GUIDE_FRAGMENT, PATH_GUIDE_MODULE_NAME ) );
}else{
SharedPrefsMgr.getInstance(this).putBoolean(DebugConfig.getSpGuide(),true);
}
MogoModulePaths.addModule( new MogoModule( MogoServicePaths.PATH_AGREEMENT, AuthorizeConstant.PATH_AGREEMENT_MODULE_NAME ) );
@@ -80,7 +83,7 @@ public class MogoApplication extends AbsMogoApplication {
MogoModulePaths.addModule( new MogoModule( TanluApiConst.MODULE_PATH, TanluApiConst.MODULE_NAME ) );
MogoModulePaths.addBaseModule( new MogoModule( TanluConstants.TAG, TanluConstants.MODEL_NAME ) );
MogoModulePaths.addModule( new MogoModule( MogoServicePaths.PATH_SHARE, "ShareControl" ) );
MogoModulePaths.addBaseModule( new MogoModule( MogoServicePaths.PATH_SHARE, "ShareControl" ) );
MogoModulePaths.addModule( new MogoModule( LeftPanelConst.PATH_NAME, LeftPanelConst.MODULE_NAME ) );
@@ -127,6 +130,7 @@ public class MogoApplication extends AbsMogoApplication {
DebugConfig.setSocketAppId( BuildConfig.SOCKET_APP_ID );
DebugConfig.setRoadEventAnimated( BuildConfig.ROAD_EVENT_ANIMATED );
DebugConfig.setLoadGuideModule( BuildConfig.LOAD_GUIDE_MODULE );
DebugConfig.setSkinSupported( BuildConfig.IS_SKIN_SUPPORTED );
}
@Override

View File

@@ -267,4 +267,14 @@ public class DebugConfig {
public static String getSpGuide(){
return SP_GUIDE;
}
private static boolean isSkinSupported = false;
public static void setSkinSupported( boolean isSkinSupported ) {
DebugConfig.isSkinSupported = isSkinSupported;
}
public static boolean isSkinSupported() {
return isSkinSupported;
}
}

View File

@@ -4,6 +4,7 @@ import android.content.Intent
import android.util.Log
import com.google.gson.Gson
import com.mogo.commons.AbsMogoApplication
import com.mogo.commons.debug.DebugConfig
import com.mogo.utils.TipToast
import com.zhidao.cosupload.DbPriorityConfig
import com.zhidao.cosupload.callback.CosStatusCallback
@@ -105,7 +106,10 @@ class CosStatusController : CosStatusCallback {
} else {
//重试一次,如果还失败就提示
if (entity?.isCustom && mFromType != UPLOAD_FROM_STRATEGY_ACCIDENT_AUTO) {
sendGetInfoFailedReceiver("100")
if(DebugConfig.isLauncher()) {
// 只有Launcher上报的时候失败会提示独立app不会提示
sendGetInfoFailedReceiver("100")
}
}
if (localPath!!.endsWith("mp4") || localPath!!.contains("Thumbnail")) {

View File

@@ -27,7 +27,7 @@ public class BaseFloatDialog extends Dialog {
}
private void addFlag() {
getWindow().setType(WindowManager.LayoutParams.FIRST_SYSTEM_WINDOW + 10);
getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
| WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION
| WindowManager.LayoutParams.FLAG_LOCAL_FOCUS_MODE);

View File

@@ -24,6 +24,7 @@ class GuideFragment : MvpFragment<GuideConstract.View, GuidePresenter>(), GuideC
}
private var duringTime: Long = 0L
private var recordCount = 0
override fun getLayoutId(): Int {
return R.layout.module_guide_fragment
@@ -90,15 +91,18 @@ class GuideFragment : MvpFragment<GuideConstract.View, GuidePresenter>(), GuideC
}
fun closeGuideFragment() {
val recordTime = System.currentTimeMillis() - duringTime
val currentItem = moduleGuideViewPager.currentItem + 1
AnalyticsUtil.track(INVOKE_TRACK_PLAY_PASS_ID,
hashMapOf(INVOKE_TRACK_PASS_TIME to currentItem
, INVOKE_TRACK_PLAY_TIME to recordTime))
Logger.d(TAG, "closeGuideFragment -> recordTime : $recordTime , currentItem : $currentItem")
recordCount = moduleGuideViewPager.currentItem + 1
destroy()
}
private fun track() {
val recordTime = System.currentTimeMillis() - duringTime
AnalyticsUtil.track(INVOKE_TRACK_PLAY_PASS_ID,
hashMapOf(INVOKE_TRACK_PASS_TIME to recordCount
, INVOKE_TRACK_PLAY_TIME to recordTime))
Logger.d(TAG, "closeGuideFragment -> recordTime : $recordTime , recordCount : $recordCount")
}
private fun destroy() {
speak(context!!, context!!.resources.getString(R.string.module_guide_voice_page_end), object : IMogoVoiceCmdCallBack {
override fun onTTSEnd(ttsId: String?, tts: String?) {
@@ -119,6 +123,7 @@ class GuideFragment : MvpFragment<GuideConstract.View, GuidePresenter>(), GuideC
override fun onDestroy() {
super.onDestroy()
track()
invokeAuthorize()
}
}

View File

@@ -6,9 +6,9 @@
<string name="module_guide_skip">跳过</string>
<string name="module_guide_voice_page_one">欢迎使用蘑菇出行,您下次可以直接对我说,打开蘑菇出行来直接进入应用,点击左下方按钮进行摄像头设置</string>
<string name="module_guide_voice_page_two">左边是道路事件的播报,点击右边地图上的事件标示可以查看事件详情</string>
<string name="module_guide_voice_page_two">左边是道路事件的播报,点击右边地图上的事件标示可以查看事件详情,或者直接唤醒小智说,中关村附近堵不堵,来查询目的地周围路况</string>
<string name="module_guide_voice_page_three">这里是道路信息显示,点击后可查看事件详情</string>
<string name="module_guide_voice_page_four">这里是事件汇总,您可以查看您参与的事件和您的分享记录</string>
<string name="module_guide_voice_page_five">更多设置,在左上角的设置功能中,点击右下角的分享,可以把路况分享给其他车友</string>
<string name="module_guide_voice_page_five">更多设置,在左上角的设置功能中,点击右下角的分享,可以把路况分享给其他车友,或者直接唤醒小智说,上报路况</string>
<string name="module_guide_voice_page_end">我们希望让您的出行更加安全高效,更多功能等着你去发现,快去体验体验吧</string>
</resources>

View File

@@ -163,7 +163,9 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
// obuManager.registerObuDataChangedListener(EventDispatchCenter.getInstance());
// }
initAdasControlStatusListener();
if ( DebugConfig.isSkinSupported() ) {
initAdasControlStatusListener();
}
EventDispatchCenter.getInstance().setMapLoadedCallback( () -> {
Logger.d( TAG, "map loaded." + Thread.currentThread().getName() );

View File

@@ -70,8 +70,10 @@ class GridBtnManager(val context: Context, private val container: GridLayout, pr
generateShareButton(FixableButton(poiType = IMogoTanluProvider.TYPE_DENSE_FOG, title = "浓雾"))
} else {
val btnList = GsonUtil.arrayFromJson(config, FixableButton::class.java)
btnList.forEach { btn ->
generateShareButton(btn)
if(btnList!=null&&btnList.isNotEmpty()) {
btnList.forEach { btn ->
generateShareButton(btn)
}
}
}
}

View File

@@ -1086,7 +1086,7 @@ public class TanluListWindow extends RelativeLayout implements IMogoMarkerClickL
if (!NetworkUtils.isConnected(getContext())) { //没有网络
TipToast.shortTip("分享失败,请检查网络",new TipDrawable(getResources().getDrawable(R.drawable.module_tanlu_upload_fail)));
} else if(TanluServiceManager.getMogoStatusManager().isMainPageOnResume()) {
} else {
float bearing = TanluServiceManager.getLocationClient().getLastKnowLocation().getBearing(); //角度
Logger.d(TAG, "onMarkerInfo event.type = " + event.type + " >>event.lat = " + event.lat + " >>event.lon = " + event.lon + " >>event.imageUrl =" + event.imageUrl);
String poiType = event.type;
@@ -1095,49 +1095,51 @@ public class TanluListWindow extends RelativeLayout implements IMogoMarkerClickL
Logger.d(TAG, "onMarkerInfo share poiType = " + poiType + " --isCumtom = " + isCumtom + " >> getMathRandom = " + getMathRandom() + " >>> bearing = " + bearing + ">>>fromType = " + fromType);
if (!fromType.equals("5")) {
if (isCumtom && !poiType.equals("0")) {
double lat = TanluServiceManager.getLocationClient().getLastKnowLocation().getLatitude();
double lon = TanluServiceManager.getLocationClient().getLastKnowLocation().getLongitude();
Log.d(TAG, "onMarkerInfo lat = " + lat + " >>>> lon = " + lon);
String cityName = TanluServiceManager.getLocationClient().getLastKnowLocation().getCityName();
String address = TanluServiceManager.getLocationClient().getLastKnowLocation().getAddress();
MarkerExploreWay markerExploreWay = new MarkerExploreWay();
markerExploreWay.setCityName(cityName);
markerExploreWay.setPoiType(poiType);
MarkerLocation markerLocation = new MarkerLocation();
markerLocation.setLat(lat);
markerLocation.setLon(lon);
markerLocation.setAddress(address);
MarkerShowEntity markerShowEntity = new MarkerShowEntity();
markerShowEntity.setBindObj(markerExploreWay);
markerShowEntity.setTextContent(address);
markerShowEntity.setMarkerType(TanluConstants.MODEL_NAME);
markerShowEntity.setMarkerLocation(markerLocation);
// 不管在不在前台,都要提示分享成功
AIAssist.getInstance(getContext()).speakTTSVoice((
String.format(voiceShareSuccessTts, getMathRandom())), null);
TipToast.shortTip("分享成功",new TipDrawable(getResources().getDrawable(R.drawable.module_tanlu_upload_success)));
TipToast.shortTip("分享成功", new TipDrawable(getResources().getDrawable(R.drawable.module_tanlu_upload_success)));
if(TanluServiceManager.getMogoStatusManager().isMainPageOnResume()) {
double lat = TanluServiceManager.getLocationClient().getLastKnowLocation().getLatitude();
double lon = TanluServiceManager.getLocationClient().getLastKnowLocation().getLongitude();
Log.d(TAG, "onMarkerInfo lat = " + lat + " >>>> lon = " + lon);
String cityName = TanluServiceManager.getLocationClient().getLastKnowLocation().getCityName();
String address = TanluServiceManager.getLocationClient().getLastKnowLocation().getAddress();
MarkerExploreWay markerExploreWay = new MarkerExploreWay();
markerExploreWay.setCityName(cityName);
markerExploreWay.setPoiType(poiType);
IMogoMarker mogoMarker = TanluServiceManager.getServiceApis().getMarkerService().drawMarker(markerShowEntity);
mogoMarker.setClickable(false);
MarkerLocation markerLocation = new MarkerLocation();
markerLocation.setLat(lat);
markerLocation.setLon(lon);
markerLocation.setAddress(address);
//开启动画
mogoMarker.startScaleAnimationWithAlpha(0, 1.2f, 0, 1.2f, 0f, 1f, 300, new LinearInterpolator(), new OnMarkerAnimationListener() {
@Override
public void onAnimStart() {
Logger.d(TAG, " onAnimStart ---1----> ");
}
MarkerShowEntity markerShowEntity = new MarkerShowEntity();
markerShowEntity.setBindObj(markerExploreWay);
markerShowEntity.setTextContent(address);
markerShowEntity.setMarkerType(TanluConstants.MODEL_NAME);
markerShowEntity.setMarkerLocation(markerLocation);
@Override
public void onAnimEnd() {
if (mogoMarker.isDestroyed()) {
return;
IMogoMarker mogoMarker = TanluServiceManager.getServiceApis().getMarkerService().drawMarker(markerShowEntity);
mogoMarker.setClickable(false);
//开启动画
mogoMarker.startScaleAnimationWithAlpha(0, 1.2f, 0, 1.2f, 0f, 1f, 300, new LinearInterpolator(), new OnMarkerAnimationListener() {
@Override
public void onAnimStart() {
Logger.d(TAG, " onAnimStart ---1----> ");
}
mogoMarker.startScaleAnimation(1.2f, 1, 1.2f, 1, 100, new LinearInterpolator(), null);
}
});
@Override
public void onAnimEnd() {
if (mogoMarker.isDestroyed()) {
return;
}
mogoMarker.startScaleAnimation(1.2f, 1, 1.2f, 1, 100, new LinearInterpolator(), null);
}
});
}
} else {
Logger.e(TAG, "onMarkerInfo share onCompleted poiType = -1 --- else ---->");
}