..
This commit is contained in:
1
.idea/gradle.xml
generated
1
.idea/gradle.xml
generated
@@ -91,6 +91,7 @@
|
||||
</set>
|
||||
</option>
|
||||
<option name="resolveModulePerSourceSet" value="false" />
|
||||
<option name="useQualifiedModuleNames" value="true" />
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
|
||||
@@ -183,20 +183,16 @@ public class MogoApplication extends AbsMogoApplication {
|
||||
*/
|
||||
private void prepareBaseService(IMogoServiceApis apis, long delay) {
|
||||
|
||||
UiThreadHandler.postDelayed(() -> {
|
||||
// 第三方平台的sn是服务端生成的,所以必须在返回后才能开启
|
||||
if (TextUtils.isEmpty(Utils.getSn())) {
|
||||
preparePassportEnvironment(apis, () -> {
|
||||
prepareSocketAndLocationServices(apis);
|
||||
});
|
||||
} else {
|
||||
preparePassportEnvironment(apis, null);
|
||||
prepareSocketAndLocationServices(apis);
|
||||
}
|
||||
}, delay);
|
||||
// 第三方平台的sn是由AI云SDK中服务调用通过服务端生成的
|
||||
preparePassportEnvironment();
|
||||
prepareSocketAndLocationServices(apis);
|
||||
//无延迟
|
||||
// UiThreadHandler.postDelayed(() -> {
|
||||
//
|
||||
// }, delay);
|
||||
}
|
||||
|
||||
private void preparePassportEnvironment(IMogoServiceApis apis, Runnable after) {
|
||||
private void preparePassportEnvironment() {
|
||||
// 配置云服务API
|
||||
MoGoAiCloudClientConfig clientConfig = MoGoAiCloudClientConfig.getInstance();
|
||||
// 设置网络环境:HTTP_DNS_ENV_QA、HTTP_DNS_ENV_RELEASE、HTTP_DNS_ENV_DEV
|
||||
@@ -257,6 +253,7 @@ public class MogoApplication extends AbsMogoApplication {
|
||||
}
|
||||
|
||||
private void prepareSocketAndLocationServices(IMogoServiceApis apis) {
|
||||
//开启Socket长链服务
|
||||
apis.getSocketManagerApi(getApplicationContext()).init(getApplicationContext(), DebugConfig.getSocketAppId());
|
||||
if (DebugConfig.getCarMachineType() != DebugConfig.CAR_MACHINE_TYPE_SELF_INNOVATE) {
|
||||
apis.getLocationInfoApi().start();
|
||||
|
||||
Reference in New Issue
Block a user