3
.idea/misc.xml
generated
3
.idea/misc.xml
generated
@@ -20,7 +20,8 @@
|
||||
<entry key="core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_traffic_light_vr.xml" value="1.0" />
|
||||
<entry key="modules/mogo-module-adas/src/main/res/drawable/module_adas_left_corner_bg.xml" value="0.22125" />
|
||||
<entry key="modules/mogo-module-adas/src/main/res/layout/dialog_adas_dispatch_remind.xml" value="0.22658490296325878" />
|
||||
<entry key="modules/mogo-module-extensions/src/main/res/layout/module_ext_layout_entrance.xml" value="1.0" />
|
||||
<entry key="modules/mogo-module-apps/src/main/res/layout/module_apps_fragment_apps_navigator.xml" value="0.27395833333333336" />
|
||||
<entry key="modules/mogo-module-extensions/src/main/res/layout/module_ext_layout_entrance.xml" value="0.375" />
|
||||
<entry key="modules/mogo-module-hmi/src/main/res/layout/fragment_warning.xml" value="0.34427083333333336" />
|
||||
<entry key="modules/mogo-module-hmi/src/main/res/layout/module_hmi_warning_v2x.xml" value="0.246875" />
|
||||
<entry key="modules/mogo-module-hmi/src/main/res/layout/notification_v2x_msg_vr.xml" value="0.3453125" />
|
||||
|
||||
@@ -5,6 +5,7 @@ import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
import com.mogo.eagle.core.data.autopilot.AutoPilotStationInfo
|
||||
import com.mogo.eagle.core.data.autopilot.AutoPilotStatusInfo
|
||||
@@ -17,10 +18,10 @@ import com.mogo.eagle.core.function.call.obu.CallerOBUManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.util.AppUtils
|
||||
import com.mogo.eagle.core.utilcode.util.DeviceUtils
|
||||
import com.mogo.eagle.core.utilcode.util.GsonUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.map.MogoMap
|
||||
import com.mogo.utils.DeviceIdUtils
|
||||
import com.mogo.utils.network.utils.GsonUtil
|
||||
import com.mogo.utils.storage.SharedPrefsMgr
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.*
|
||||
@@ -68,7 +69,7 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
appConfigInfo.appVersionCode = AppUtils.getAppVersionCode()
|
||||
appConfigInfo.appVersionName = AppUtils.getAppVersionName()
|
||||
appConfigInfo.appPackageName = AppUtils.getAppPackageName()
|
||||
appConfigInfo.uniqueDeviceId = DeviceUtils.getUniqueDeviceId()
|
||||
appConfigInfo.uniqueDeviceId = DeviceIdUtils.getDeviceId(AbsMogoApplication.getApp())
|
||||
appConfigInfo.mogoSN = MoGoAiCloudClient.getInstance().aiCloudClientConfig.sn
|
||||
appConfigInfo.mogoToken = MoGoAiCloudClient.getInstance().aiCloudClientConfig.token
|
||||
appConfigInfo.mapVersion = MogoMap.getInstance().mogoMap.mapVersion
|
||||
|
||||
@@ -98,18 +98,17 @@ public class SmallMapDirectionView
|
||||
SmpServiceManager.getMogoRegisterCenter()
|
||||
.registerCarLocationChangedListener(MODULE_NAME, this);
|
||||
|
||||
setOnClickListener(view -> {
|
||||
if (DebugConfig.getCarMachineType() != DebugConfig.CAR_MACHINE_TYPE_LENOVO) {
|
||||
MogoApisHandler.getInstance().getApis()
|
||||
.getMapServiceApi()
|
||||
.getMapUIController()
|
||||
.changeMapMode(
|
||||
MogoApisHandler.getInstance()
|
||||
.getApis()
|
||||
.getAdasControllerApi()
|
||||
.getCurrentSkinMode()
|
||||
);
|
||||
}
|
||||
setOnLongClickListener(view -> {
|
||||
MogoApisHandler.getInstance().getApis()
|
||||
.getMapServiceApi()
|
||||
.getMapUIController()
|
||||
.changeMapMode(
|
||||
MogoApisHandler.getInstance()
|
||||
.getApis()
|
||||
.getAdasControllerApi()
|
||||
.getCurrentSkinMode()
|
||||
);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
package com.mogo.eagle.core.utilcode.util;
|
||||
|
||||
import static android.Manifest.permission.ACCESS_WIFI_STATE;
|
||||
import static android.Manifest.permission.CHANGE_WIFI_STATE;
|
||||
import static android.Manifest.permission.INTERNET;
|
||||
import static android.content.Context.WIFI_SERVICE;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@@ -23,11 +28,6 @@ import java.net.SocketException;
|
||||
import java.util.Enumeration;
|
||||
import java.util.UUID;
|
||||
|
||||
import static android.Manifest.permission.ACCESS_WIFI_STATE;
|
||||
import static android.Manifest.permission.CHANGE_WIFI_STATE;
|
||||
import static android.Manifest.permission.INTERNET;
|
||||
import static android.content.Context.WIFI_SERVICE;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* author: Blankj
|
||||
@@ -403,7 +403,7 @@ public final class DeviceUtils {
|
||||
}
|
||||
|
||||
|
||||
private static final String KEY_UDID = "KEY_UDID";
|
||||
private static final String KEY_UDID = "KEY_UDID";
|
||||
private volatile static String udid;
|
||||
|
||||
/**
|
||||
@@ -479,8 +479,9 @@ public final class DeviceUtils {
|
||||
if (!TextUtils.isEmpty(androidId)) {
|
||||
return saveUdid(prefix + 2, androidId);
|
||||
}
|
||||
|
||||
} catch (Exception ignore) {/**/}
|
||||
} catch (Exception ignore) {
|
||||
ignore.printStackTrace();
|
||||
}
|
||||
return saveUdid(prefix + 9, "");
|
||||
}
|
||||
|
||||
|
||||
@@ -8,10 +8,8 @@ import android.telephony.TelephonyManager;
|
||||
import android.telephony.cdma.CdmaCellLocation;
|
||||
import android.telephony.gsm.GsmCellLocation;
|
||||
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.eagle.core.utilcode.util.DeviceUtils;
|
||||
import com.mogo.utils.DeviceIdUtils;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
@@ -23,36 +21,36 @@ import java.lang.reflect.Method;
|
||||
|
||||
public class Utils {
|
||||
|
||||
public static String getCellId( Context context ) {
|
||||
TelephonyManager tm = ( TelephonyManager ) context.getSystemService( Context.TELEPHONY_SERVICE );
|
||||
if ( tm == null ) {
|
||||
public static String getCellId(Context context) {
|
||||
TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
|
||||
if (tm == null) {
|
||||
return "";
|
||||
}
|
||||
|
||||
PackageManager pm = context.getPackageManager();
|
||||
boolean accessCoarseLocationPermission = ( PackageManager.PERMISSION_GRANTED ==
|
||||
pm.checkPermission( Manifest.permission.ACCESS_COARSE_LOCATION, context.getPackageName() ) );
|
||||
boolean accessFineLocationPermission = ( PackageManager.PERMISSION_GRANTED ==
|
||||
pm.checkPermission( Manifest.permission.ACCESS_FINE_LOCATION, context.getPackageName() ) );
|
||||
if ( !accessCoarseLocationPermission || !accessFineLocationPermission )
|
||||
boolean accessCoarseLocationPermission = (PackageManager.PERMISSION_GRANTED ==
|
||||
pm.checkPermission(Manifest.permission.ACCESS_COARSE_LOCATION, context.getPackageName()));
|
||||
boolean accessFineLocationPermission = (PackageManager.PERMISSION_GRANTED ==
|
||||
pm.checkPermission(Manifest.permission.ACCESS_FINE_LOCATION, context.getPackageName()));
|
||||
if (!accessCoarseLocationPermission || !accessFineLocationPermission)
|
||||
return "noPermission";
|
||||
|
||||
CellLocation location = null;
|
||||
try {
|
||||
location = tm.getCellLocation();
|
||||
} catch ( Exception e ) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if ( location != null ) {
|
||||
if (location != null) {
|
||||
// Gsm网络 , 联通移动的网络属于这一套
|
||||
if ( location instanceof GsmCellLocation ) {
|
||||
GsmCellLocation gsmLoc = ( GsmCellLocation ) location;
|
||||
if (location instanceof GsmCellLocation) {
|
||||
GsmCellLocation gsmLoc = (GsmCellLocation) location;
|
||||
int cellid = gsmLoc.getCid();
|
||||
return String.valueOf( cellid );
|
||||
return String.valueOf(cellid);
|
||||
// Cdma网络 , 电信网络属于这一种
|
||||
} else if ( location instanceof CdmaCellLocation ) {
|
||||
CdmaCellLocation cdmaLoc = ( CdmaCellLocation ) location;
|
||||
return String.valueOf( cdmaLoc.getBaseStationId() );
|
||||
} else if (location instanceof CdmaCellLocation) {
|
||||
CdmaCellLocation cdmaLoc = (CdmaCellLocation) location;
|
||||
return String.valueOf(cdmaLoc.getBaseStationId());
|
||||
}
|
||||
}
|
||||
return "";
|
||||
@@ -66,31 +64,25 @@ public class Utils {
|
||||
public static final String PROPERTIES = "android.os.SystemProperties";
|
||||
|
||||
public static String getDevicesId() {
|
||||
if ( DebugConfig.getCarMachineType() != DebugConfig.CAR_MACHINE_TYPE_SELF_INNOVATE ) {
|
||||
return DeviceUtils.getUniqueDeviceId();
|
||||
if (DebugConfig.getCarMachineType() != DebugConfig.CAR_MACHINE_TYPE_SELF_INNOVATE) {
|
||||
return DeviceIdUtils.getDeviceId(AbsMogoApplication.getApp());
|
||||
}
|
||||
return getSystemProperties( GSM_SERIAL );
|
||||
return getSystemProperties(GSM_SERIAL);
|
||||
}
|
||||
|
||||
public static String getFotaVersion() {
|
||||
return getSystemProperties( FOTA_VERSION );
|
||||
return getSystemProperties(FOTA_VERSION);
|
||||
}
|
||||
|
||||
public static String getSystemProperties( String name ) {
|
||||
public static String getSystemProperties(String name) {
|
||||
String value = "";
|
||||
|
||||
try {
|
||||
Class< ? > c = Class.forName( PROPERTIES );
|
||||
Method get = c.getMethod( GET, String.class );
|
||||
value = ( String ) get.invoke( c, name );
|
||||
} catch ( ClassNotFoundException var3 ) {
|
||||
Class<?> c = Class.forName(PROPERTIES);
|
||||
Method get = c.getMethod(GET, String.class);
|
||||
value = (String) get.invoke(c, name);
|
||||
} catch (ClassNotFoundException | NoSuchMethodException | InvocationTargetException | IllegalAccessException var3) {
|
||||
var3.printStackTrace();
|
||||
} catch ( NoSuchMethodException var4 ) {
|
||||
var4.printStackTrace();
|
||||
} catch ( InvocationTargetException var5 ) {
|
||||
var5.printStackTrace();
|
||||
} catch ( IllegalAccessException var6 ) {
|
||||
var6.printStackTrace();
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
@@ -36,33 +36,25 @@ public final class DeviceIdUtils {
|
||||
|
||||
if ( TextUtils.isEmpty( deviceId )) {
|
||||
deviceId = getDeviceIdInternal(appContext);
|
||||
if (!TextUtils.isEmpty(deviceId)) {
|
||||
saveDeviceId(appContext,deviceId);
|
||||
} else {
|
||||
if ( Build.VERSION.SDK_INT >= Build.VERSION_CODES.M ) {
|
||||
if ( ContextCompat.checkSelfPermission(context, Manifest.permission.READ_PHONE_STATE ) == PackageManager.PERMISSION_GRANTED ) {
|
||||
deviceId = (( TelephonyManager ) appContext.getSystemService( Context.TELEPHONY_SERVICE)).getSimSerialNumber();
|
||||
if (TextUtils.isEmpty(deviceId)) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
if (ContextCompat.checkSelfPermission(context, Manifest.permission.READ_PHONE_STATE) == PackageManager.PERMISSION_GRANTED) {
|
||||
deviceId = ((TelephonyManager) appContext.getSystemService(Context.TELEPHONY_SERVICE)).getSimSerialNumber();
|
||||
}
|
||||
}else{
|
||||
deviceId = (( TelephonyManager ) appContext.getSystemService( Context.TELEPHONY_SERVICE)).getSimSerialNumber();
|
||||
}
|
||||
if (!TextUtils.isEmpty(deviceId)) {
|
||||
saveDeviceId(appContext,deviceId);
|
||||
} else {
|
||||
deviceId = ((TelephonyManager) appContext.getSystemService(Context.TELEPHONY_SERVICE)).getSimSerialNumber();
|
||||
}
|
||||
if (TextUtils.isEmpty(deviceId)) {
|
||||
deviceId = getDeviceSerial();
|
||||
if (!TextUtils.isEmpty(deviceId) && !deviceId.equalsIgnoreCase("unknown")) {
|
||||
saveDeviceId(appContext,deviceId);
|
||||
} else {
|
||||
if (TextUtils.isEmpty(deviceId) || deviceId.equalsIgnoreCase("unknown")) {
|
||||
deviceId = getAndroidId(appContext);
|
||||
if (!TextUtils.isEmpty(deviceId)) {
|
||||
saveDeviceId(appContext,deviceId);
|
||||
} else {
|
||||
deviceId = String.valueOf( System.currentTimeMillis());
|
||||
saveDeviceId(appContext,deviceId);
|
||||
if (TextUtils.isEmpty(deviceId)) {
|
||||
deviceId = String.valueOf(System.currentTimeMillis());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
saveDeviceId(appContext,deviceId);
|
||||
}
|
||||
|
||||
return deviceId;
|
||||
|
||||
@@ -23,9 +23,9 @@ import android.widget.TextView;
|
||||
import com.mogo.commons.FunctionBuildConfig;
|
||||
import com.mogo.commons.constants.SharedPrefsConstants;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.map.IMogoMap;
|
||||
import com.mogo.map.IMogoMapView;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.map.impl.custom.location.GpsTester;
|
||||
import com.mogo.map.impl.custom.navi.NaviClient;
|
||||
import com.mogo.map.impl.custom.utils.MogoMapUtils;
|
||||
@@ -351,28 +351,28 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
Logger.d(TAG, "设置的样式 = %s", ui);
|
||||
if (checkAMapView()) {
|
||||
switch (ui) {
|
||||
// case CarUp_2D:
|
||||
// case CarUp_3D:
|
||||
// case NorthUP_2D:
|
||||
// setUIMode(ui);
|
||||
// break;
|
||||
case CarUp_2D:
|
||||
case CarUp_3D:
|
||||
case NorthUP_2D:
|
||||
setUIMode(ui);
|
||||
break;
|
||||
case Type_VR:
|
||||
mMapView.getMapAutoViewHelper().setScaleVRMode(true);
|
||||
mMapView.getMapAutoViewHelper().setMapStyle(MapAutoApi.MAP_STYLE_VR);
|
||||
return;
|
||||
// case Type_Light:
|
||||
// mMapView.getMapAutoViewHelper().setAutoSwitchStyle(false);
|
||||
// mMapView.getMapAutoViewHelper().setMapStyle(MapAutoApi.MAP_STYLE_DAY);
|
||||
// mIsLightStyle = true;
|
||||
// break;
|
||||
// case Type_Night:
|
||||
// mMapView.getMapAutoViewHelper().setAutoSwitchStyle(false);
|
||||
// mMapView.getMapAutoViewHelper().setMapStyle(MapAutoApi.MAP_STYLE_NIGHT);
|
||||
// mIsLightStyle = false;
|
||||
// break;
|
||||
// case Type_AUTO_LIGHT_Night:
|
||||
// mMapView.getMapAutoViewHelper().setAutoSwitchStyle(true);
|
||||
// break;
|
||||
case Type_Light:
|
||||
mMapView.getMapAutoViewHelper().setAutoSwitchStyle(false);
|
||||
mMapView.getMapAutoViewHelper().setMapStyle(MapAutoApi.MAP_STYLE_DAY);
|
||||
mIsLightStyle = true;
|
||||
break;
|
||||
case Type_Night:
|
||||
mMapView.getMapAutoViewHelper().setAutoSwitchStyle(false);
|
||||
mMapView.getMapAutoViewHelper().setMapStyle(MapAutoApi.MAP_STYLE_NIGHT);
|
||||
mIsLightStyle = false;
|
||||
break;
|
||||
case Type_AUTO_LIGHT_Night:
|
||||
mMapView.getMapAutoViewHelper().setAutoSwitchStyle(true);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -126,7 +126,6 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
IMogoAimlessModeListener,
|
||||
IMogoStatusChangedListener,
|
||||
IMogoIntentListener,
|
||||
// IMogoLocationListener,
|
||||
IMogoCarLocationChangedListener2 {
|
||||
|
||||
private static final String TAG = "EntranceFragment";
|
||||
@@ -210,8 +209,6 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
private TextView tvRed;
|
||||
private TextView tvGreen;
|
||||
|
||||
// private CheckedTextView ctvAutopilotStatus;
|
||||
|
||||
/**
|
||||
* 内部变量标识是否在vrMode,用于方法执行过滤,避免重复或异常调用
|
||||
*/
|
||||
@@ -277,7 +274,6 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
mMove2CurrentLocation = findViewById(R.id.module_entrance_id_move2_current_location);
|
||||
mUserHeadImg = findViewById(R.id.ivUserHeadImg);
|
||||
groupFix = findViewById(R.id.groupFix);
|
||||
// ctvAutopilotStatus = findViewById(R.id.module_mogo_autopilot_status);
|
||||
|
||||
ConstraintLayout rootView = findViewById(R.id.module_entrance_id_top_motion_layout);
|
||||
if (rootView != null) {
|
||||
@@ -348,15 +344,6 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// ctvAutopilotStatus.setOnClickListener(new OnPreventFastClickListener() {
|
||||
// @Override
|
||||
// public void onClickImpl(View v) {
|
||||
// // 如果能自动驾驶,就自动驾驶,不能就提示
|
||||
// autopilotStatusClick();
|
||||
// }
|
||||
// });
|
||||
|
||||
dealWeatherContainer();
|
||||
|
||||
listenSeekNumber();
|
||||
|
||||
@@ -24,27 +24,6 @@
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_speed"
|
||||
android:layout_width="@dimen/module_ext_speed_width"
|
||||
android:layout_height="@dimen/module_ext_speed_height"
|
||||
android:layout_marginLeft="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:background="@drawable/yi_biao_pan_bg_nor"
|
||||
android:elevation="@dimen/dp_10"
|
||||
android:padding="@dimen/dp_20"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.SpeedChartView
|
||||
android:id="@+id/moudule_arc"
|
||||
android:layout_width="@dimen/module_ext_arcView_width"
|
||||
android:layout_height="@dimen/module_ext_arcView_height"
|
||||
android:layout_gravity="center" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<!--切换地图远近事件 @dimen/module_switch_map -->
|
||||
<FrameLayout
|
||||
android:id="@+id/module_switch_model_layout"
|
||||
|
||||
Reference in New Issue
Block a user