[dev_arch_opt_3.0]
[Change] [ 1、修复多屏幕因连接屏幕树数量不够导致启动异常 ] Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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" />
|
||||
<!–调试用,暂时开启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" />
|
||||
</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
|
||||
|
||||
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user