changed the sp_guide to module_common
This commit is contained in:
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@@ -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="1.8" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="JDK" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -251,12 +251,6 @@ public class DebugConfig {
|
||||
DebugConfig.sRoadEventAnimated = sRoadEventAnimated;
|
||||
}
|
||||
|
||||
private static String SP_GUIDE = "SP_GUIDE_2020_09_09";
|
||||
|
||||
public static String getSpGuide() {
|
||||
return SP_GUIDE;
|
||||
}
|
||||
|
||||
private static boolean isSkinSupported = false;
|
||||
|
||||
public static void setSkinSupported( boolean isSkinSupported ) {
|
||||
|
||||
@@ -101,7 +101,7 @@ CRASHREPORT_NOOP_VERSION=2.0.0
|
||||
|
||||
######## 外部依赖引用
|
||||
# 车聊聊
|
||||
CARCHATTING_VERSION=1.7.1
|
||||
CARCHATTING_VERSION=1.7.3
|
||||
# 车聊聊接口
|
||||
CARCHATTINGPROVIDER_VERSION=1.4.1
|
||||
# loglib
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.mogo.module.authorize.util
|
||||
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.commons.debug.DebugConfig.getSpGuide
|
||||
import com.mogo.module.common.utils.SPConst.getSpGuide
|
||||
import com.mogo.utils.storage.SharedPrefsMgr
|
||||
|
||||
object SharedPreferenceUtil {
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.mogo.module.common.utils;
|
||||
|
||||
/**
|
||||
* 多模块之间SP状态公共类
|
||||
*/
|
||||
public class SPConst {
|
||||
|
||||
private static String SP_GUIDE = "SP_GUIDE_2020_09_09";
|
||||
|
||||
//用于多模块之间引导状态判断
|
||||
public static String getSpGuide() {
|
||||
return SP_GUIDE;
|
||||
}
|
||||
|
||||
private static String SP_GUIDE_FIRST_TIME_RECORD = "SP_GUIDE_FIRST_TIME_RECORD";
|
||||
|
||||
//用于多模块之间首次引导时间记录
|
||||
public static String getSPGuideRecord(){
|
||||
return SP_GUIDE_FIRST_TIME_RECORD;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,7 +4,6 @@ import android.content.Intent;
|
||||
import android.graphics.Rect;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.util.TypedValue;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MotionEvent;
|
||||
@@ -74,6 +73,7 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
||||
import static com.mogo.module.common.utils.SPConst.getSpGuide;
|
||||
import static com.mogo.module.share.constant.ShareConstants.KEY_CLICK_SHARE_BUTTON;
|
||||
import static com.mogo.module.share.constant.ShareConstants.KEY_CLICK_SHARE_TIME;
|
||||
import static com.mogo.module.share.constant.ShareConstants.KEY_SERVER_SHOW_DAY_COUNT;
|
||||
@@ -354,7 +354,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
|
||||
debugTopView();
|
||||
|
||||
boolean isShowGuide = SharedPrefsMgr.getInstance(AbsMogoApplication.getApp()).getBoolean(DebugConfig.getSpGuide(), false);
|
||||
boolean isShowGuide = SharedPrefsMgr.getInstance(AbsMogoApplication.getApp()).getBoolean(getSpGuide(), false);
|
||||
Logger.d(TAG, " isShowGuide = " + isShowGuide);
|
||||
if (isShowGuide) {
|
||||
UiThreadHandler.postDelayed(() -> {
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.mogo.module.guide.GuideConstant.Companion.PATH_GUIDE_MODULE_NAME
|
||||
import com.mogo.module.guide.fragment.GuideFragment
|
||||
import com.mogo.module.guide.util.SharedPreferenceUtil.hasGuide
|
||||
import com.mogo.module.guide.util.SharedPreferenceUtil.setGuideFinish
|
||||
import com.mogo.module.guide.util.SharedPreferenceUtil.setGuideRecord
|
||||
import com.mogo.service.IMogoServiceApis
|
||||
import com.mogo.service.MogoServicePaths
|
||||
import com.mogo.service.fragmentmanager.FragmentDescriptor
|
||||
@@ -48,6 +49,7 @@ object GuideBizManager {
|
||||
fun removeGuideFragmentToStack() {
|
||||
Logger.d("GuideBizManager", "removeGuideFragmentToStack")
|
||||
setGuideFinish()
|
||||
setGuideRecord()
|
||||
serviceApi?.let {
|
||||
it.fragmentManagerApi.pop()
|
||||
}
|
||||
|
||||
@@ -1,17 +1,22 @@
|
||||
package com.mogo.module.guide.util
|
||||
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.module.common.utils.SPConst.getSPGuideRecord
|
||||
import com.mogo.module.common.utils.SPConst.getSpGuide
|
||||
import com.mogo.utils.storage.SharedPrefsMgr
|
||||
|
||||
object SharedPreferenceUtil {
|
||||
|
||||
fun hasGuide(): Boolean {
|
||||
return SharedPrefsMgr.getInstance(AbsMogoApplication.getApp()).getBoolean(DebugConfig.getSpGuide(), false)
|
||||
return SharedPrefsMgr.getInstance(AbsMogoApplication.getApp()).getBoolean(getSpGuide(), false)
|
||||
}
|
||||
|
||||
fun setGuideFinish() {
|
||||
SharedPrefsMgr.getInstance(AbsMogoApplication.getApp()).putBoolean(DebugConfig.getSpGuide(), true)
|
||||
SharedPrefsMgr.getInstance(AbsMogoApplication.getApp()).putBoolean(getSpGuide(), true)
|
||||
}
|
||||
|
||||
fun setGuideRecord() {
|
||||
SharedPrefsMgr.getInstance(AbsMogoApplication.getApp()).putLong(getSPGuideRecord(), System.currentTimeMillis())
|
||||
}
|
||||
|
||||
}
|
||||
@@ -5,22 +5,16 @@ import android.app.Application;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.os.RemoteException;
|
||||
import android.util.Log;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.map.MogoOverlayManager;
|
||||
import com.mogo.map.uicontroller.EnumMapUI;
|
||||
import com.mogo.module.common.utils.CarSeries;
|
||||
import com.mogo.service.MogoServicePaths;
|
||||
import com.mogo.service.adas.IMogoADASController;
|
||||
import com.mogo.service.impl.MogoServiceApis;
|
||||
import com.mogo.service.impl.singleton.SingletonsHolder;
|
||||
import com.mogo.service.impl.statusmanager.MogoStatusManager;
|
||||
import com.mogo.service.statusmanager.IMogoStatusManager;
|
||||
import com.mogo.skin.support.SkinMode;
|
||||
import com.mogo.utils.UiThreadHandler;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.mogo.utils.storage.SharedPrefsMgr;
|
||||
@@ -35,7 +29,7 @@ import org.json.JSONObject;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.mogo.commons.debug.DebugConfig.getSpGuide;
|
||||
import static com.mogo.module.common.utils.SPConst.getSpGuide;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
|
||||
Reference in New Issue
Block a user