From 5bd7c8a7ab91c501e4b2fbcb1b2622c0ca60eab9 Mon Sep 17 00:00:00 2001 From: zhongchao Date: Wed, 26 Jul 2023 14:24:05 +0800 Subject: [PATCH 1/6] [3.4.0] add null if in util --- .../eagle/core/network/RequestOptions.java | 3 +- .../eagle/core/network/SubscribeImpl.java | 2 +- .../mogo/eagle/core/network/utils/Util.java | 37 +++++++++++-------- 3 files changed, 25 insertions(+), 17 deletions(-) diff --git a/core/mogo-core-network/src/main/java/com/mogo/eagle/core/network/RequestOptions.java b/core/mogo-core-network/src/main/java/com/mogo/eagle/core/network/RequestOptions.java index 3ebc77c468..c74aa4bb7e 100644 --- a/core/mogo-core-network/src/main/java/com/mogo/eagle/core/network/RequestOptions.java +++ b/core/mogo-core-network/src/main/java/com/mogo/eagle/core/network/RequestOptions.java @@ -2,6 +2,7 @@ package com.mogo.eagle.core.network; import android.content.Context; +import android.view.KeyEvent; import com.mogo.eagle.core.network.utils.Util; @@ -96,7 +97,7 @@ public class RequestOptions { } public Object getCaller() { - return caller; + return caller == null ? null : caller; } public Context getContext() { diff --git a/core/mogo-core-network/src/main/java/com/mogo/eagle/core/network/SubscribeImpl.java b/core/mogo-core-network/src/main/java/com/mogo/eagle/core/network/SubscribeImpl.java index 3c5a354a61..694ce2bec2 100644 --- a/core/mogo-core-network/src/main/java/com/mogo/eagle/core/network/SubscribeImpl.java +++ b/core/mogo-core-network/src/main/java/com/mogo/eagle/core/network/SubscribeImpl.java @@ -28,7 +28,7 @@ public abstract class SubscribeImpl implements Observer { } private void onFinish() { - if (!Util.checkAlive(mRequestOptions.getCaller())) { + if (Util.checkAlive(mRequestOptions.getCaller())) { } } diff --git a/core/mogo-core-network/src/main/java/com/mogo/eagle/core/network/utils/Util.java b/core/mogo-core-network/src/main/java/com/mogo/eagle/core/network/utils/Util.java index 397f5bc20d..aadb0d10db 100644 --- a/core/mogo-core-network/src/main/java/com/mogo/eagle/core/network/utils/Util.java +++ b/core/mogo-core-network/src/main/java/com/mogo/eagle/core/network/utils/Util.java @@ -15,30 +15,37 @@ import com.mogo.eagle.core.network.CallerNotAliveException; public class Util { - public static boolean checkAlive( Object caller ) { - if ( caller instanceof Activity) { - return Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1 ? !( ( Activity ) caller ).isDestroyed() : !( ( Activity ) caller ).isFinishing(); - } else if ( caller instanceof Fragment) { - return ( ( Fragment ) caller ).isAdded(); - } else if ( caller instanceof androidx.fragment.app.Fragment ) { - return ( ( androidx.fragment.app.Fragment ) caller ).isAdded(); - } else if ( caller instanceof View) { - return true; - } else if ( caller instanceof Dialog) { - return ( ( Dialog ) caller ).getWindow() != null; - } else if ( caller instanceof PopupWindow) { - return ( ( PopupWindow ) caller ).getContentView() != null; + public static boolean checkAlive(Object caller ) { + if ( caller == null){ + return false; + } + if ( caller instanceof Activity) { + return Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1 ? ((Activity) caller).isDestroyed() : ((Activity) caller).isFinishing(); + } else if ( caller instanceof Fragment) { + return !((Fragment) caller).isAdded(); + } else if ( caller instanceof androidx.fragment.app.Fragment ) { + return !((androidx.fragment.app.Fragment) caller).isAdded(); + } else if ( caller instanceof View) { + return false; + } else if ( caller instanceof Dialog) { + return ((Dialog) caller).getWindow() == null; + } else if ( caller instanceof PopupWindow) { + return ((PopupWindow) caller).getContentView() == null; + } else { + return false; } - return caller != null; } public static void assertCallerAlive( Object caller ) throws CallerNotAliveException { - if ( !checkAlive( caller ) ) { + if (checkAlive(caller)) { throw new CallerNotAliveException( "Caller is not alive any more" ); } } public static Context getContext(Object object ) { + if( object == null){ + return null; + } if ( object instanceof Activity ) { return ( Activity ) object; } else if ( object instanceof Fragment ) { From 6af1aca661033a2a9fd5c52037f023f6f3c5653c Mon Sep 17 00:00:00 2001 From: renwj Date: Wed, 26 Jul 2023 14:35:09 +0800 Subject: [PATCH 2/6] =?UTF-8?q?[3.4.0][=E9=AD=94=E6=96=B9]=20=E6=8C=89?= =?UTF-8?q?=E9=94=AEA=E7=94=B1-1=E5=8F=98=E6=88=90-1.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mofang/MoFangCommandExecutor.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/mofang/MoFangCommandExecutor.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/mofang/MoFangCommandExecutor.kt index 0c14eff08c..4d20acf430 100644 --- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/mofang/MoFangCommandExecutor.kt +++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/mofang/MoFangCommandExecutor.kt @@ -192,7 +192,7 @@ internal class MoFangCommandExecutor { handler.removeMessages(MSG_WHAT_KEY_CODE_AL) handler.sendMessage(Message.obtain().also { it.what = MSG_WHAT_KEY_CODE_A - it.obj = -1.0 + it.obj = -1.2 }) linkedLog?.record(mapOf("发送[A]:${System.currentTimeMillis()}" to "${whatToString(MSG_WHAT_KEY_CODE_A)}")) } From 9c2030743220229ba9578cd8998fba2699040b33 Mon Sep 17 00:00:00 2001 From: zhongchao Date: Wed, 26 Jul 2023 15:13:47 +0800 Subject: [PATCH 3/6] [3.4.0] ui seekbar width fix --- .../src/main/res/layout/taxi_p_setting_view.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OCH/mogo-och-taxi-passenger/src/main/res/layout/taxi_p_setting_view.xml b/OCH/mogo-och-taxi-passenger/src/main/res/layout/taxi_p_setting_view.xml index 589674a874..19a3c926e0 100644 --- a/OCH/mogo-och-taxi-passenger/src/main/res/layout/taxi_p_setting_view.xml +++ b/OCH/mogo-och-taxi-passenger/src/main/res/layout/taxi_p_setting_view.xml @@ -28,7 +28,7 @@ Date: Wed, 26 Jul 2023 18:26:13 +0800 Subject: [PATCH 4/6] =?UTF-8?q?[3.4.0/2.4.0]=E6=9B=B4=E6=96=B0HDMap=20sdk?= =?UTF-8?q?=202.14.1.5=EF=BC=88=E8=A7=A3=E5=86=B3=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E9=97=AE=E9=A2=98=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index e6236b6f23..893bf27e7d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -85,7 +85,7 @@ MOGO_LOCATION_VERSION=1.4.7.11 MOGO_TELEMATIC_VERSION=1.4.7.11 ######## MogoAiCloudSDK Version ######## # 自研地图 -MAP_SDK_VERSION=2.14.1.2 +MAP_SDK_VERSION=2.14.1.5 MAP_SDK_OPERATION_VERSION=1.1.4.1 # websocket WEBSOCKET_VERSION=1.1.7 From 6085575ea4587bc55c0d56bd8dc8206a26c2f15e Mon Sep 17 00:00:00 2001 From: zhongchao Date: Wed, 26 Jul 2023 18:51:06 +0800 Subject: [PATCH 5/6] [3.4.0] reset looper to main --- .../biz/v2x/trafficlight/core/MogoTrafficLightManager.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/trafficlight/core/MogoTrafficLightManager.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/trafficlight/core/MogoTrafficLightManager.kt index c2f683500e..184b173cbb 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/trafficlight/core/MogoTrafficLightManager.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/trafficlight/core/MogoTrafficLightManager.kt @@ -3,6 +3,7 @@ package com.mogo.eagle.function.biz.v2x.trafficlight.core import android.content.Context import android.os.Handler import android.os.HandlerThread +import android.os.Looper import com.mogo.eagle.core.data.biz.trafficlight.RoadIDResult import com.mogo.eagle.core.data.biz.trafficlight.TrafficLightControl import com.mogo.eagle.core.data.biz.trafficlight.TrafficLightResult @@ -49,10 +50,8 @@ class MogoTrafficLightManager : IMoGoChassisLocationGCJ02Listener { fun initServer(context: Context) { mContext = context CallerChassisLocationGCJ02ListenerManager.addListener(TAG, this) - val thread = HandlerThread("v2x_traffic_light") - thread.start() mThreadHandler = - TrafficLightThreadHandler(thread.looper, { + TrafficLightThreadHandler(Looper.getMainLooper(), { //第一次查询路口时,如果红绿灯显示,则隐藏掉 if (firstLoopCrossRoad) { CallerTrafficLightListenerManager.resetTrafficLightStatus() From f10ed237a5b2a87f1960a9fbe08111b9c2b4140b Mon Sep 17 00:00:00 2001 From: zhongchao Date: Wed, 26 Jul 2023 20:32:58 +0800 Subject: [PATCH 6/6] [3.4.0] ui fix --- .../main/res/layout/taxi_p_setting_view.xml | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/OCH/mogo-och-taxi-passenger/src/main/res/layout/taxi_p_setting_view.xml b/OCH/mogo-och-taxi-passenger/src/main/res/layout/taxi_p_setting_view.xml index 19a3c926e0..94c9432ca1 100644 --- a/OCH/mogo-och-taxi-passenger/src/main/res/layout/taxi_p_setting_view.xml +++ b/OCH/mogo-och-taxi-passenger/src/main/res/layout/taxi_p_setting_view.xml @@ -18,10 +18,10 @@ app:layout_constraintTop_toTopOf="parent" /> @@ -41,10 +41,10 @@ app:layout_constraintWidth_percent="0.253" /> @@ -75,10 +75,10 @@ app:layout_constraintTop_toBottomOf="@+id/tvSettingLight" /> @@ -98,10 +98,10 @@ app:layout_constraintWidth_percent="0.253" />