Merge remote-tracking branch 'origin/dev_robotaxi-d-app-module_251_220125_2.5.1' into dev_robotaxi-d-app-module_251_220125_2.5.1
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package com.mogo.eagle.core.function.hmi.notification
|
||||
|
||||
import android.content.Context
|
||||
import android.content.ContextWrapper
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.appcompat.view.ContextThemeWrapper
|
||||
@@ -165,6 +164,10 @@ class WarningFloat {
|
||||
this.config.isOverride = isOverride
|
||||
}
|
||||
|
||||
fun isEnqueue(enqueue: Boolean) = apply {
|
||||
this.config.isEnqueue = enqueue
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建浮窗,包括Activity浮窗和系统浮窗,如若系统浮窗无权限,先进行权限申请
|
||||
*/
|
||||
@@ -181,10 +184,14 @@ class WarningFloat {
|
||||
} else if (config.layoutId != null) {
|
||||
content = LayoutInflater.from(activity).inflate(config.layoutId!!, null)
|
||||
}
|
||||
content?.let {
|
||||
config.layoutId = null
|
||||
config.layoutView = it
|
||||
Reminder.enqueue(getLifecycleOwner(activity), WarningFloatReminder(activity, config, it))
|
||||
if (config.isEnqueue) {
|
||||
content?.let {
|
||||
config.layoutId = null
|
||||
config.layoutView = it
|
||||
Reminder.enqueue(getLifecycleOwner(activity), WarningFloatReminder(activity, config, it))
|
||||
}
|
||||
} else {
|
||||
WarningFloatWindowManager.create(activity, config)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,5 +66,6 @@ data class WarningNotificationConfig(
|
||||
// 窗口高度
|
||||
var height: Int = WindowManager.LayoutParams.WRAP_CONTENT
|
||||
) {
|
||||
var isEnqueue: Boolean = false
|
||||
var isOverride: Boolean = true
|
||||
}
|
||||
|
||||
@@ -545,7 +545,6 @@ class MoGoHmiFragment : MvpFragment<MoGoWarningContract.View?, WaringPresenter?>
|
||||
.setSidePattern(SidePattern.RIGHT)
|
||||
.setGravity(Gravity.RIGHT, offsetY = 70)
|
||||
.setImmersionStatusBar(true)
|
||||
.isOverride(false)
|
||||
.setAnimator(object : DefaultAnimator() {
|
||||
override fun enterAnim(
|
||||
view: View,
|
||||
@@ -607,6 +606,7 @@ class MoGoHmiFragment : MvpFragment<MoGoWarningContract.View?, WaringPresenter?>
|
||||
.setCountDownTime(expireTime)
|
||||
.setGravity(Gravity.CENTER_HORIZONTAL, offsetY = 110)
|
||||
.setImmersionStatusBar(true)
|
||||
.isEnqueue(true)
|
||||
.addWarningStatusListener(listenerIMoGo)
|
||||
.addWarningStatusListener(object : IMoGoWarningStatusListener {
|
||||
override fun onShow() {
|
||||
|
||||
@@ -5,6 +5,7 @@ import android.location.Location;
|
||||
import android.os.SystemClock;
|
||||
import android.util.Log;
|
||||
|
||||
import com.mogo.cloud.commons.utils.CoordinateUtils;
|
||||
import com.mogo.eagle.core.data.autopilot.ADASTrajectoryInfo;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotGuardianStatusInfo;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotRouteInfo;
|
||||
@@ -19,8 +20,10 @@ import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListenerManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.map.navi.IMogoCarLocationChangedListener2;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.service.adas.IMogoAdasOCHCallback;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -28,7 +31,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MogoRouteOverlayManager implements IMoGoAutopilotPlanningListener, IMoGoAutopilotStatusListener, IMoGoMapLocationListener {
|
||||
public class MogoRouteOverlayManager implements IMoGoAutopilotPlanningListener, IMoGoAutopilotStatusListener, IMoGoMapLocationListener, IMogoAdasOCHCallback {
|
||||
private static volatile MogoRouteOverlayManager sInstance;
|
||||
private Context mContext;
|
||||
private String TAG = "MogoRouteOverlayManager";
|
||||
@@ -44,6 +47,7 @@ public class MogoRouteOverlayManager implements IMoGoAutopilotPlanningListener,
|
||||
CallerAutopilotPlanningListenerManager.INSTANCE.addListener(TAG, this);
|
||||
CallerAutoPilotStatusListenerManager.INSTANCE.addListener(TAG, this);
|
||||
CallerMapLocationListenerManager.INSTANCE.addListener(TAG,this);
|
||||
MogoApisHandler.getInstance().getApis().getAdasControllerApi().addAdasOCHCallback(this);
|
||||
// intiDrawer();
|
||||
}
|
||||
|
||||
@@ -127,6 +131,12 @@ public class MogoRouteOverlayManager implements IMoGoAutopilotPlanningListener,
|
||||
@Override
|
||||
public void onAutopilotArriveAtStation(@Nullable AutopilotStationInfo autopilotWayArrive) {
|
||||
|
||||
if(autopilotWayArrive == null){
|
||||
return;
|
||||
}
|
||||
Logger.d(TAG, "onArriveAt data : " + autopilotWayArrive.toString());
|
||||
//演示模式下 到达终点将忽略 引导线绘制 选项关闭
|
||||
FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -143,4 +153,14 @@ public class MogoRouteOverlayManager implements IMoGoAutopilotPlanningListener,
|
||||
public void onLocationChanged(@Nullable MogoLocation location) {
|
||||
mLocation = location;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onArriveAt(AutopilotStationInfo data) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStateChanged(int state, String reason) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user