[2.15.0-merge-master]

This commit is contained in:
zhongchao
2023-05-06 20:03:51 +08:00
1466 changed files with 45283 additions and 27080 deletions

View File

@@ -1,6 +1,7 @@
package com.mogo.commons.constants;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
public class HostConst {
public static final String DEVA_HOST = "http://dzt-deva.zhidaozhixing.com";
@@ -29,24 +30,33 @@ public class HostConst {
public static String getHost() {
String host = HOST_RELEASE;
switch (DebugConfig.getNetMode()) {
case DebugConfig.NET_MODE_DEV:
case DebugConfig.NET_MODE_QA:
host = HOST_DEV;
break;
if(FunctionBuildConfig.urlJson.getEagleMisUrl().isEmpty()){
switch (DebugConfig.getNetMode()) {
case DebugConfig.NET_MODE_DEV:
case DebugConfig.NET_MODE_QA:
host = HOST_DEV;
break;
}
return host;
}else{
return FunctionBuildConfig.urlJson.getEagleMisUrl();
}
return host;
}
public static String getEagleHost(){
String eagleHost = HOST_EAGLE_RELEASE;
switch (DebugConfig.getNetMode()){
case DebugConfig.NET_MODE_DEV:
case DebugConfig.NET_MODE_QA:
eagleHost = HOST_EAGLE_QA;
break;
String host = HOST_EAGLE_RELEASE;
if(FunctionBuildConfig.urlJson.getEagleDnsUrl().isEmpty()){
switch (DebugConfig.getNetMode()){
case DebugConfig.NET_MODE_DEV:
case DebugConfig.NET_MODE_QA:
host = HOST_EAGLE_QA;
break;
}
return host;
}else{
return FunctionBuildConfig.urlJson.getEagleDnsUrl();
}
return eagleHost;
}

View File

@@ -189,4 +189,13 @@ public class DebugConfig {
public static boolean isCarModelChange() {
return isCarModelChange;
}
private static boolean isReplaceStatusview = true;
public static void setReplaceStatusview(boolean status) {
isReplaceStatusview = status;
}
public static boolean isReplaceStatusview() {
return isReplaceStatusview;
}
}

View File

@@ -43,6 +43,19 @@ public interface IMogoStatusManager extends IProvider {
*/
boolean isSocketOnLine();
/**
* 压屏是否消失
* @return
*/
boolean isScreenCoverDismiss();
/**
* 设置压屏 状态
* @param tag 业务类型
* @param mode true:消失false:存在
*/
void setScreenCoverMode(String tag, boolean mode);
/**
* 设置云端 socket 状态
* @param tag 业务类型

View File

@@ -20,6 +20,7 @@ public class MogoStatusManager implements IMogoStatusManager {
private static final byte[] obj = new byte[0];
private MogoStatusManager() {
}
public static MogoStatusManager getInstance() {
@@ -73,6 +74,16 @@ public class MogoStatusManager implements IMogoStatusManager {
return get_bool_val(StatusDescriptor.CLOUD_SOCKET);
}
@Override
public boolean isScreenCoverDismiss() {
return get_bool_val(StatusDescriptor.SCREEN_COVER);
}
@Override
public void setScreenCoverMode(String tag, boolean mode) {
doSetStatus(tag, StatusDescriptor.SCREEN_COVER, mode);
}
@Override
public void setCloudSocketMode(String tag, boolean mode) {
doSetStatus(tag, StatusDescriptor.CLOUD_SOCKET, mode);

View File

@@ -41,6 +41,11 @@ public enum StatusDescriptor {
/**
* 云 Socket状态
*/
CLOUD_SOCKET
CLOUD_SOCKET,
/**
* 压屏状态
*/
SCREEN_COVER
}

View File

@@ -76,6 +76,13 @@ public abstract class MvpDialogFragment< V extends IView, P extends Presenter< V
@NonNull
protected abstract P createPresenter();
/**
* 获取绑定的TAG标记
*
* @return 返回唯一TAG标记
*/
public abstract String getTagName();
@Nullable
protected < T extends View > T findViewById( int id ) {
if ( mRootView != null ) {

View File

@@ -1,8 +1,12 @@
package com.mogo.commons.screen;
import android.app.Application;
import android.content.Context;
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils;
import me.jessyan.autosize.AutoSizeConfig;
import me.jessyan.autosize.utils.AutoSizeUtils;
@@ -12,11 +16,26 @@ public class ScreenHelper {
* 正常屏幕和长屏分辨设置
*/
public static void setScreenConfig(Context context) {
int baseWidth = 2560;
int baseHeight = 1600;
boolean baseOnWidth = true;
if (AppIdentityModeUtils.isM1(FunctionBuildConfig.appIdentityMode) &&
AppIdentityModeUtils.isPassenger((FunctionBuildConfig.appIdentityMode))) {
baseWidth = 1920;
baseHeight = 1080;
} else if (AppIdentityModeUtils.isM2(FunctionBuildConfig.appIdentityMode) &&
AppIdentityModeUtils.isPassenger((FunctionBuildConfig.appIdentityMode))) {
baseWidth = 1080;
baseHeight = 1920;
}
AutoSizeConfig.getInstance()
.setBaseOnWidth(true)
.setBaseOnWidth(baseOnWidth)
.setCustomFragment(true)
.setDesignWidthInDp(2560)
.setDesignHeightInDp(1600)
.setDesignWidthInDp(baseWidth)
.setDesignHeightInDp(baseHeight)
.getUnitsManager().setSupportSP(false);
}
}