changed the getSn and visual func

This commit is contained in:
zhongchao
2021-05-27 21:13:36 +08:00
parent aecdc24636
commit 504fc47132
54 changed files with 216 additions and 192 deletions

View File

@@ -95,11 +95,10 @@ public abstract class AbsMogoApplication extends Application {
}
protected void init() {
syncInit();
asyncInit();
}
private void syncInit() {
protected void initMogoHttpDns() {
MogoHttpDnsHandler.getHttpDnsApi().init(this, this::getCurrentLocation);
TipToast.init( this, ( ( context, message, tipDrawable ) -> {
if ( TextUtils.isEmpty( message ) ) {

View File

@@ -6,6 +6,7 @@ import android.text.TextUtils;
import androidx.annotation.NonNull;
import androidx.collection.ArrayMap;
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
import com.mogo.commons.AbsMogoApplication;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.commons.storage.SpStorage;
@@ -37,7 +38,7 @@ public class ParamsUtil {
params.put( ServerParam.CELL_ID, Utils.getCellId( AbsMogoApplication.getApp() ) );
// params.put( ServerParam.DISPLAY_ID, DeviceUtil.getSystemVersion() );
params.put( ServerParam.SN, Utils.getSn() );
params.put( ServerParam.SN, MoGoAiCloudClientConfig.getInstance().getSn());
params.put( ServerParam.TICKET, SpStorage.getTicket() );
return params;
@@ -73,7 +74,7 @@ public class ParamsUtil {
map.put( "debug", DebugConfig.isDebug() ? 1 : 0 );
String fota = Utils.getFotaVersion();
map.put( "systemversion", TextUtils.isEmpty( fota ) ? DebugConfig.getProductFlavor() : fota );
map.put( "sn", Utils.getSn() );
map.put( "sn", MoGoAiCloudClientConfig.getInstance().getSn() );
return map;
}

View File

@@ -64,8 +64,7 @@ public class Utils {
public static final String FOTA_VERSION = "ro.fota.version";
public static final String PROPERTIES = "android.os.SystemProperties";
public static String getSn() {
// return "X2020210526D3DC7BA891CE2D76";
public static String getDevicesId() {
if ( DebugConfig.getCarMachineType() != DebugConfig.CAR_MACHINE_TYPE_SELF_INNOVATE ) {
return DeviceIdUtils.getDeviceId(AbsMogoApplication.getApp());
}