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

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()
}
}