Merge branch 'dev_robotaxi-d-app-module_290_220715_2.9.0' into 'test_robotaxi-d-app-module_290_220715_2.9.0.1'

Dev robotaxi d app module 290 220715 2.9.0

See merge request zhjt/AndroidApp/MoGoEagleEye!95
This commit is contained in:
wangmingjun
2022-07-31 08:04:27 +00:00
17 changed files with 107 additions and 53 deletions

View File

@@ -137,7 +137,8 @@ public class BaseBusPassengerPresenter extends Presenter<BusPassengerRouteFragme
@Override
public void routeResult(List<LatLng> models, int haveArrivedIndex) {
runOnUIThread(() -> mView.routeResult(models,haveArrivedIndex));
CallerLogger.INSTANCE.d(M_BUS_P + TAG, "routeResult:" + models.size());
mView.routeResult(models,haveArrivedIndex);
}
@Override

View File

@@ -142,7 +142,6 @@ public class BusPassengerRouteFragment extends
}
public void routeResult(List<LatLng> latLngList,int haveArrivedIndex) {
CallerLogger.INSTANCE.d(M_BUS_P + TAG, "routeResult:" + latLngList.size());
if (latLngList.size() > 0) {
drawablePolyline(latLngList,haveArrivedIndex);
} else {

View File

@@ -239,10 +239,10 @@ public class SlidePanelView extends View {
}
private void startBlockBackAnim() {
ObjectAnimator animator = ObjectAnimator.ofInt(this, "blockOffset", blockOffset, 0);
animator.setInterpolator(new DecelerateInterpolator());
animator.setDuration(1000 * blockOffset / getWidth());
animator.start();
ObjectAnimator blockBackanimator = ObjectAnimator.ofInt(this, "blockOffset", blockOffset, 0);
blockBackanimator.setInterpolator(new DecelerateInterpolator());
blockBackanimator.setDuration(1000 * blockOffset / getWidth());
blockBackanimator.start();
lastX = 0;
}

View File

@@ -77,7 +77,8 @@ public class TaxiPassengerServingOrderPresenter extends Presenter<TaxiPassengerS
@Override
public void routeResultByServer(List<LatLng> models, int haveArrivedIndex) {
if (models == null) return;
runOnUIThread(() -> mView.routeResultByServer(models,haveArrivedIndex));
CallerLogger.INSTANCE.d(M_TAXI_P + TAG, "routeResultByServer:" + models.size());
mView.routeResultByServer(models,haveArrivedIndex);
}

View File

@@ -22,7 +22,6 @@ import androidx.fragment.app.FragmentTransaction;
import com.amap.api.maps.model.LatLng;
import com.mogo.commons.mvp.MvpFragment;
import com.mogo.eagle.core.data.map.MogoLatLng;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
@@ -229,7 +228,6 @@ public class TaxiPassengerServingOrderFragment extends
}
public void routeResultByServer(List<LatLng> latLngList,int haveArrivedIndex) {
CallerLogger.INSTANCE.d(M_TAXI_P + TAG, "routeResultByServer:" + latLngList.size());
if (latLngList.size() > 0) {
drawablePolylineByServerRoute(latLngList,haveArrivedIndex);
} else {

View File

@@ -37,8 +37,9 @@ public class TaxiPassengerStartAutopilotView extends RelativeLayout implements V
private static final long TIMER_START_AUTOPILOT_INTERVAL = 20 * 1000L;
private Context mContext;
private View view;
private FrameSurfaceView svCarStartingFrame;
private AnimatorDrawableUtil mAnimationDrawable ;
private AnimatorDrawableUtil mCarAnimationDrawable ;
private ImageView mCarIv;
private Integer[] startingAnimIds = new Integer[]{
R.drawable.light_00000,
R.drawable.light_00001,
@@ -98,6 +99,7 @@ public class TaxiPassengerStartAutopilotView extends RelativeLayout implements V
mCloseIV.setOnClickListener(this);
mAutopilotBtnBg = view.findViewById(R.id.taxi_p_autopilot_btn_bg);
mCarIv = view.findViewById(R.id.taxi_p_autopilot_starting);
initBtnAnimatonDrawable();
@@ -105,9 +107,8 @@ public class TaxiPassengerStartAutopilotView extends RelativeLayout implements V
}
private void initCarStartingFrame() {
svCarStartingFrame = view.findViewById(R.id.taxi_p_autopilot_starting);
svCarStartingFrame.setBitmapIds(Arrays.asList(startingAnimIds));
svCarStartingFrame.setDuration(1300);
mCarAnimationDrawable = new AnimatorDrawableUtil();
mCarAnimationDrawable.setAnimation(mCarIv,Arrays.asList(startingAnimIds));
}
private void initBtnAnimatonDrawable() {
@@ -143,8 +144,8 @@ public class TaxiPassengerStartAutopilotView extends RelativeLayout implements V
@SuppressLint("UseCompatLoadingForDrawables")
public void handleStartAutopilotBtnStatus(boolean isClickable){
if (svCarStartingFrame != null){
svCarStartingFrame.setBackgroundResource(R.drawable.light_00000);
if (mCarIv != null){
mCarIv.setBackgroundResource(R.drawable.light_00000);
}
if (mStartAutopilotBtn == null) return;
@@ -178,7 +179,7 @@ public class TaxiPassengerStartAutopilotView extends RelativeLayout implements V
if (isStart){
if (mAnimationDrawable == null){
initBtnAnimatonDrawable();
}
if (mAnimationDrawable != null){
mAnimationDrawable.start(true, 30, null);
@@ -189,17 +190,18 @@ public class TaxiPassengerStartAutopilotView extends RelativeLayout implements V
}
private void startingCarBgAnimatorDrawable(boolean isStart){
if (isStart && svCarStartingFrame != null){
svCarStartingFrame.setRepeatTimes(-1);
svCarStartingFrame.setBackground(null);
svCarStartingFrame.start();
}else {
if (svCarStartingFrame != null){
svCarStartingFrame.reset();
svCarStartingFrame.setBackgroundResource(R.drawable.light_00000);
if (isStart){
if (mCarAnimationDrawable == null){
initCarStartingFrame();
}
mCarIv.setBackgroundResource(0);
mCarAnimationDrawable.start(true,40, null);
}else {
if (mCarAnimationDrawable != null){
mCarAnimationDrawable.stop();
}
mCarIv.setBackgroundResource(R.drawable.light_00000);
}
}
public void startOrStopLoadingAnim(boolean start) {
@@ -234,10 +236,9 @@ public class TaxiPassengerStartAutopilotView extends RelativeLayout implements V
}
public void clearStartingAnimFrame(){
if (svCarStartingFrame != null){
svCarStartingFrame.destroy();
if (mCarAnimationDrawable != null){
mCarAnimationDrawable.stop();
}
svCarStartingFrame = null;
}
public void onAutopilotStatusSuccess(){
startOrStopLoadingAnim(false);

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/background">
<shape>
<corners android:radius="5px"/>
<solid android:color="@android:color/transparent" />
</shape>
</item>
<item android:id="@android:id/secondaryProgress">
<clip>
<shape>
<corners android:radius="5px"/>
<solid android:color="@android:color/transparent" />
</shape>
</clip>
</item>
<item android:id="@android:id/progress">
<scale android:scaleWidth="100%">
<shape android:shape="rectangle" >
<corners android:radius="7px"/>
<gradient android:startColor="@android:color/transparent" android:endColor="#54D7FF" android:angle="0"/>
</shape>
</scale>
</item>
</layer-list>

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/background">
<shape>
<corners android:radius="5px"/>
<solid android:color="#99D8D8D8" />
</shape>
</item>
<item android:id="@android:id/secondaryProgress">
<clip>
<shape>
<corners android:radius="5px"/>
<solid android:color="#66FFFFFF" />
</shape>
</clip>
</item>
<item android:id="@android:id/progress">
<scale android:scaleWidth="100%">
<shape android:shape="rectangle">
<corners android:radius="5px"/>
<gradient android:startColor="#303CFF" android:centerColor="#216CFF" android:endColor="#25C1F9" android:angle="0"/>
</shape>
</scale>
</item>
</layer-list>

View File

@@ -17,7 +17,7 @@
</item>
<item android:id="@android:id/progress">
<scale android:scaleWidth="100%">
<shape>
<shape android:shape="rectangle" >
<corners android:radius="7px"/>
<gradient android:startColor="@android:color/transparent" android:endColor="#54D7FF"/>
</shape>

View File

@@ -17,7 +17,7 @@
</item>
<item android:id="@android:id/progress">
<scale android:scaleWidth="100%">
<shape>
<shape android:shape="rectangle">
<corners android:radius="5px"/>
<gradient android:startColor="#303CFF" android:centerColor="#216CFF" android:endColor="#25C1F9"/>
</shape>

View File

@@ -7,7 +7,7 @@
android:background="@drawable/taxi_p_passenger_start_panel_bg"
tools:ignore="MissingDefaultResource">
<com.mogo.och.common.module.wigets.sfv.FrameSurfaceView
<ImageView
android:id="@+id/taxi_p_autopilot_starting"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View File

@@ -376,14 +376,14 @@ class MoGoAdasListenerImpl : OnAdasListener {
}
//状态查询应答
// @ChainLog(
// linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_AUTOPILOT,
// linkCode = CHAIN_LINK_ADAS,
// endpoint = PAD,
// nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_STATUS_QUERY_RESP,
// paramIndexes = [0, 1],
// clientPkFileName = "sn"
// )
@ChainLog(
linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_AUTOPILOT,
linkCode = CHAIN_LINK_ADAS,
endpoint = PAD,
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_STATUS_QUERY_RESP,
paramIndexes = [0, 1],
clientPkFileName = "sn"
)
override fun onStatusQueryResp(
header: MessagePad.Header?,
statusInfo: SystemStatusInfo.StatusInfo?

View File

@@ -33,9 +33,7 @@ object EnvChangeManager {
fun getCityName(): String {
val cache = getConfig()
return if (cache == null) {
val cityCode = CallerMapLocationListenerManager.getCurrentLocation()?.cityCode ?: SharedPrefsMgr.getInstance(Utils.getApp()).getString(SharedPrefsConstants.LOCATION_CITY_CODE) ?: "010"
updateCityCode(cityCode)
when(cityCode) {
when(CallerMapLocationListenerManager.getCurrentLocation()?.cityCode ?: SharedPrefsMgr.getInstance(Utils.getApp()).getString(SharedPrefsConstants.LOCATION_CITY_CODE) ?: "010") {
"010" -> "北京"
"0734" -> "衡阳"
else -> "未知"
@@ -51,17 +49,15 @@ object EnvChangeManager {
fun getNetMode(): String {
val cache = getConfig()
if (cache == null) {
val mode = DebugConfig.getNetMode()
updateNetMode(mode)
return when(mode) {
return if (cache == null) {
when(DebugConfig.getNetMode()) {
DebugConfig.NET_MODE_RELEASE -> "生产"
DebugConfig.NET_MODE_QA -> "测试"
DebugConfig.NET_MODE_DEMO -> "演示"
else -> "未知"
}
} else {
return when(cache.second) {
when(cache.second) {
DebugConfig.NET_MODE_RELEASE -> "生产"
DebugConfig.NET_MODE_QA -> "测试"
DebugConfig.NET_MODE_DEMO -> "演示"

View File

@@ -207,9 +207,7 @@ import java.util.*
setViewNotificationProvider(this)
context?.also {
if (!AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
CallerDevaToolsManager.showStatusBar(it)
}
CallerDevaToolsManager.showStatusBar(it)
}
}

View File

@@ -41,6 +41,9 @@ public class TapPositionView extends ConstraintLayout {
tabN = findViewById(R.id.tap_n);
tabD = findViewById(R.id.tap_d);
typedArray = context.obtainStyledAttributes(attrs, R.styleable.TapPositionView);
if(AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)){
tabP.setVisibility(View.GONE);
}
}
public void updateWithGear(@NotNull Chassis.GearPosition gear) {

View File

@@ -15,7 +15,6 @@
android:textColor="@color/p_default_txt_color"
android:textSize="@dimen/dp_46"
android:textStyle="bold"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@+id/tap_r"

View File

@@ -3,12 +3,14 @@ package com.mogo.eagle.core.function.call.devatools
import android.app.Activity
import android.content.Context
import android.view.View
import com.mogo.eagle.core.data.config.*
import com.mogo.eagle.core.data.constants.MogoServicePaths
import com.mogo.eagle.core.data.deva.chain.ChainLogParam
import com.mogo.eagle.core.data.deva.scene.SceneModule
import com.mogo.eagle.core.data.deva.scene.SceneTAG
import com.mogo.eagle.core.function.api.devatools.IDevaToolsProvider
import com.mogo.eagle.core.function.call.base.CallerBase
import com.mogo.eagle.core.utilcode.mogo.*
import record_cache.RecordPanelOuterClass
object CallerDevaToolsManager {
@@ -149,13 +151,17 @@ object CallerDevaToolsManager {
* 展示状态栏
*/
fun showStatusBar(ctx: Context) {
devaToolsProviderApi?.showStatusBar(ctx)
if (!AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
devaToolsProviderApi?.showStatusBar(ctx)
}
}
/**
* 隐藏状态栏
*/
fun hideStatusBar() {
devaToolsProviderApi?.hideStatusBar()
if (!AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
devaToolsProviderApi?.hideStatusBar()
}
}
}