[dev_arch_opt_3.0]

[Change]
[
1、修复多屏幕因连接屏幕树数量不够导致启动异常
]

Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
donghongyu
2023-03-02 20:06:23 +08:00
parent 730ee8c8df
commit 5bde1bc81e
3 changed files with 8 additions and 33 deletions

View File

@@ -11,7 +11,6 @@ import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02Lis
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
import com.mogo.eagle.core.function.call.map.CallerGaoDeMapLocationListenerManager
import com.mogo.eagle.core.function.call.obu.CallerObuLocationWGS84ListenerManager
import com.mogo.eagle.core.utilcode.util.MultiDisplayUtils
import com.mogo.eagle.core.utilcode.util.TimeUtils
import mogo.telematics.pad.MessagePad
@@ -93,7 +92,6 @@ object MoGoLocationDispatcher :
DataSourceType.TELEMATIC
)
}
MultiDisplayUtils.getOtherDisplay()
}

View File

@@ -66,11 +66,11 @@
android:windowSoftInputMode="adjustPan|stateHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<!--调试用暂时开启LAUNCHER这个属性-->
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.LAUNCHER_APP" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
<!--调试用暂时开启LAUNCHER这个属性-->
<category android:name="android.intent.category.HOME" />
</intent-filter>
<intent-filter>
<data
@@ -95,23 +95,7 @@
android:stateNotNeeded="true"
android:theme="@style/Main"
android:windowSoftInputMode="adjustPan|stateHidden">
<!--<intent-filter>
<action android:name="android.intent.action.MAIN" />
&lt;!&ndash;调试用暂时开启LAUNCHER这个属性&ndash;&gt;
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.LAUNCHER_APP" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>-->
<intent-filter>
<data
android:host="launcher"
android:path="/main/switch2"
android:scheme="mogo" />
<category android:name="android.intent.category.DEFAULT" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
</activity>
<activity
@@ -126,15 +110,7 @@
android:stateNotNeeded="true"
android:theme="@style/Main"
android:windowSoftInputMode="adjustPan|stateHidden">
<intent-filter>
<data
android:host="launcher"
android:path="/main/switch2"
android:scheme="mogo" />
<category android:name="android.intent.category.DEFAULT" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
</activity>
<activity

View File

@@ -38,12 +38,13 @@ object MultiDisplayUtils {
Utils.getApp().getSystemService(Context.DISPLAY_SERVICE) as DisplayManager
// 获取除了内置屏幕(主屏幕)的其它屏幕
val displays = mDisplayManager.getDisplays(DisplayManager.DISPLAY_CATEGORY_PRESENTATION)
// 初始化新的集合进行接收排序后的屏幕信息
var displaysList = arrayOfNulls<Display>(displays.size)
// 初始化新的集合进行接收排序后的屏幕信息,防止数组越界初始化列表相同的集合集合中会有null需要在使用判断null即没有连接屏幕
var displaysList = arrayOfNulls<Display>(lcd_sub_port_six_lcd_mode.size)
Log.d(TAG, "displays:$displays")
// 判断副屏个数
if (displays.isNotEmpty()) {
displaysList = arrayOfNulls(displays.size)
displaysList = arrayOfNulls(lcd_sub_port_six_lcd_mode.size)
// 循环出来副屏幕进行重新排序
for (i in displays.indices) {
// 这里如果需要固定某个屏幕, 使用 if( display.toString().indexOf("port=1")!=-1) ) 而不是使用 display[i]