Merge branch 'qa_1.1.5_2' into dev
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
|
||||
@@ -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() );
|
||||
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 ---->");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user