fix bug of track point
This commit is contained in:
15
.idea/codeStyles/Project.xml
generated
15
.idea/codeStyles/Project.xml
generated
@@ -3,18 +3,9 @@
|
||||
<JetCodeStyleSettings>
|
||||
<option name="PACKAGES_TO_USE_STAR_IMPORTS">
|
||||
<value>
|
||||
<package name="java.util" alias="false" withSubpackages="false" />
|
||||
<package name="kotlinx.android.synthetic" alias="false" withSubpackages="true" />
|
||||
<package name="io.ktor" alias="false" withSubpackages="true" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="PACKAGES_IMPORT_LAYOUT">
|
||||
<value>
|
||||
<package name="" alias="false" withSubpackages="true" />
|
||||
<package name="java" alias="false" withSubpackages="true" />
|
||||
<package name="javax" alias="false" withSubpackages="true" />
|
||||
<package name="kotlin" alias="false" withSubpackages="true" />
|
||||
<package name="" alias="true" withSubpackages="true" />
|
||||
<package name="java.util" withSubpackages="false" static="false" />
|
||||
<package name="kotlinx.android.synthetic" withSubpackages="true" static="false" />
|
||||
<package name="io.ktor" withSubpackages="true" static="false" />
|
||||
</value>
|
||||
</option>
|
||||
</JetCodeStyleSettings>
|
||||
|
||||
@@ -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 ) );
|
||||
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user