[2.13.0]
[Change] [修复应用身份的配置问题导致Bus无法区分] Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
@@ -18,9 +18,6 @@ project.android.productFlavors {
|
||||
// 高德地图鉴权信息
|
||||
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue, CHANNEL_VALUE: "fPadLenovo",ACTIVITY_ROOT:true]
|
||||
|
||||
// 是否基于地图
|
||||
buildConfigField 'boolean', 'IS_MAP_BASED', 'true'
|
||||
|
||||
// 是否需要实时上报坐标
|
||||
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'
|
||||
// GPS数据提供源: 0-Android系统,1-工控机,2-OBU
|
||||
|
||||
@@ -20,9 +20,6 @@ project.android.productFlavors {
|
||||
//高德地图鉴权信息
|
||||
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue, CHANNEL_VALUE: "fPadLenovoOchBus",ACTIVITY_ROOT:true]
|
||||
|
||||
// 是否基于地图
|
||||
buildConfigField 'boolean', 'IS_MAP_BASED', 'true'
|
||||
|
||||
// 是否需要实时上报坐标
|
||||
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'
|
||||
// GPS数据提供源: 0-Android系统,1-工控机,2-OBU
|
||||
|
||||
@@ -18,9 +18,6 @@ project.android.productFlavors {
|
||||
//高德地图鉴权信息
|
||||
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue, CHANNEL_VALUE: "fPadLenovoOchBusPassenger",ACTIVITY_ROOT:true]
|
||||
|
||||
// 是否基于地图
|
||||
buildConfigField 'boolean', 'IS_MAP_BASED', 'true'
|
||||
|
||||
// 是否需要实时上报坐标
|
||||
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'
|
||||
// GPS数据提供源: 0-Android系统,1-工控机,2-OBU
|
||||
|
||||
@@ -20,9 +20,6 @@ project.android.productFlavors {
|
||||
//高德地图鉴权信息
|
||||
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue, CHANNEL_VALUE: "fPadLenovoOchSweeper",ACTIVITY_ROOT:true]
|
||||
|
||||
// 是否基于地图
|
||||
buildConfigField 'boolean', 'IS_MAP_BASED', 'true'
|
||||
|
||||
// 是否需要实时上报坐标
|
||||
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'
|
||||
// GPS数据提供源: 0-Android系统,1-工控机,2-OBU
|
||||
|
||||
@@ -21,9 +21,6 @@ project.android.productFlavors {
|
||||
//高德地图鉴权信息
|
||||
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue, CHANNEL_VALUE: "fPadLenovoOchTaxi",ACTIVITY_ROOT:true]
|
||||
|
||||
// 是否基于地图
|
||||
buildConfigField 'boolean', 'IS_MAP_BASED', 'true'
|
||||
|
||||
// 是否需要实时上报坐标
|
||||
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'
|
||||
// GPS数据提供源: 0-Android系统,1-工控机,2-OBU
|
||||
|
||||
@@ -20,9 +20,6 @@ project.android.productFlavors {
|
||||
//高德地图鉴权信息
|
||||
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue, CHANNEL_VALUE: "fPadLenovoOchTaxiPassenger",ACTIVITY_ROOT:false]
|
||||
|
||||
// 是否基于地图
|
||||
buildConfigField 'boolean', 'IS_MAP_BASED', 'true'
|
||||
|
||||
// 是否需要实时上报坐标
|
||||
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'
|
||||
// GPS数据提供源: 0-Android系统,1-工控机,2-OBU
|
||||
|
||||
@@ -54,10 +54,10 @@ public class MogoApplication extends MainMoGoApplication {
|
||||
.build();
|
||||
}
|
||||
new StartupManager.Builder()
|
||||
.addStartup(new HttpDnsStartUp())
|
||||
.addStartup(new APMStartup())
|
||||
.addStartup(new ConfigStartUp())
|
||||
.addStartup(new ARouterStartUp())
|
||||
.addStartup(new APMStartup())
|
||||
.addStartup(new HttpDnsStartUp())
|
||||
.setConfig(config)
|
||||
.build(this)
|
||||
.start()
|
||||
|
||||
@@ -44,17 +44,17 @@ class ConfigStartUp : AndroidStartup<Boolean>() {
|
||||
|
||||
Log.d("ConfigStartUp", "ProcessUtils.getCurrentProcessName():" + ProcessUtils.getCurrentProcessName())
|
||||
|
||||
// TODO:这里影响当前Activity的身份信息,多进程先保持与原来于洋,
|
||||
if (ProcessUtils.getCurrentProcessName().contains(":sub")) {
|
||||
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) {
|
||||
// TODO:这里影响当前Activity的身份信息,多进程先保持与原来一样,主进程为司机端,:passenger 进程为乘客端
|
||||
if (ProcessUtils.getCurrentProcessName().contains(":passenger")) {
|
||||
if (AppIdentityModeUtils.isBus(BuildConfig.APP_IDENTITY_MODE)) {
|
||||
FunctionBuildConfig.appIdentityMode = 0xA1
|
||||
} else if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)) {
|
||||
} else if (AppIdentityModeUtils.isTaxi(BuildConfig.APP_IDENTITY_MODE)) {
|
||||
FunctionBuildConfig.appIdentityMode = 0x01
|
||||
}
|
||||
} else {
|
||||
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) {
|
||||
if (AppIdentityModeUtils.isBus(BuildConfig.APP_IDENTITY_MODE)) {
|
||||
FunctionBuildConfig.appIdentityMode = 0xA0
|
||||
} else if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)) {
|
||||
} else if (AppIdentityModeUtils.isTaxi(BuildConfig.APP_IDENTITY_MODE)) {
|
||||
FunctionBuildConfig.appIdentityMode = 0x00
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
android:stateNotNeeded="true"
|
||||
android:theme="@style/Main"
|
||||
android:exported="true"
|
||||
android:process=":sub"
|
||||
android:process=":passenger"
|
||||
android:windowSoftInputMode="adjustPan|stateHidden">
|
||||
<!--<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
@@ -167,9 +167,8 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
// 启动乘客端Act
|
||||
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode) ||
|
||||
AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)) {
|
||||
MultiDisplayUtils.INSTANCE.startActWithProcess(
|
||||
MultiDisplayUtils.INSTANCE.startActWithSecond(
|
||||
this,
|
||||
2,
|
||||
PassengerLauncherActivity.class);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.pm.PackageManager
|
||||
import android.hardware.display.DisplayManager
|
||||
import android.util.Log
|
||||
import android.view.Display
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
|
||||
@@ -35,7 +36,18 @@ object MultiDisplayUtils {
|
||||
* @param context
|
||||
* @param launchDisplayId 指定屏幕ID
|
||||
*/
|
||||
fun startActWithProcess(context: Context, launchDisplayId: Int, activity: Class<*>) {
|
||||
fun startActWithSecond(context: Context, activity: Class<*>) {
|
||||
var launchDisplayId = 0;
|
||||
if (isSupportMultiDisplay(context)) {
|
||||
if (getMultiDisplay(context).size > 1) {
|
||||
launchDisplayId = getMultiDisplay(context)[1].displayId
|
||||
} else {
|
||||
Log.e(TAG, "当前没有外接屏幕,只有一个屏幕")
|
||||
}
|
||||
} else {
|
||||
Log.e(TAG, "当前设备,不支持多个屏幕交互显示")
|
||||
}
|
||||
|
||||
// 要加上Intent.FLAG_ACTIVITY_NEW_TASK
|
||||
val options = ActivityOptions.makeBasic()
|
||||
options.launchDisplayId = launchDisplayId
|
||||
@@ -45,11 +57,11 @@ object MultiDisplayUtils {
|
||||
}
|
||||
|
||||
/**
|
||||
* 在指定ID的屏幕打开Activity,当前应用的,新开进程启动
|
||||
* 在指定ID的屏幕打开Activity,当前应用的,当前进程
|
||||
* @param context
|
||||
* @param launchDisplayId 指定屏幕ID
|
||||
*/
|
||||
fun startActWithOtherProcess(context: Context, launchDisplayId: Int, activity: Class<*>) {
|
||||
fun startActWithProcess(context: Context, launchDisplayId: Int, activity: Class<*>) {
|
||||
// 要加上Intent.FLAG_ACTIVITY_NEW_TASK
|
||||
val options = ActivityOptions.makeBasic()
|
||||
options.launchDisplayId = launchDisplayId
|
||||
|
||||
@@ -85,7 +85,7 @@ MOGO_LOCATION_VERSION=1.4.3.26
|
||||
MOGO_TELEMATIC_VERSION=1.4.3.26
|
||||
######## MogoAiCloudSDK Version ########
|
||||
# 自研地图
|
||||
MAP_SDK_VERSION=2.7.0.10
|
||||
MAP_SDK_VERSION=2.8.0.1
|
||||
MAP_SDK_OPERATION_VERSION=1.1.3.5
|
||||
# websocket
|
||||
WEBSOCKET_VERSION=1.1.7
|
||||
|
||||
Reference in New Issue
Block a user