Merge branch 'dev' of gitlab.zhidaoauto.com:ecos/yycp-service/Launcher into dev

This commit is contained in:
wangcongtao
2020-06-12 11:04:38 +08:00
7 changed files with 38 additions and 13 deletions

View File

@@ -88,7 +88,7 @@ android {
// 是否使用自定义导航
buildConfigField 'boolean', 'USE_CUSTOM_NAVI', 'true'
// 是否作为 launcher 运行
buildConfigField 'boolean', 'IS_LAUNCHER', 'false'
buildConfigField 'boolean', 'IS_LAUNCHER', 'true'
}
// f系列-分体机全系列,未细分
f8xx{

BIN
app/libs/persistentlib.jar Normal file

Binary file not shown.

View File

@@ -13,6 +13,19 @@
android:supportsRtl="true"
android:theme="@style/AppTheme.App"
tools:replace="android:label">
<!--保活用-->
<service
android:name="com.zhidao.boot.persistent.lib.PersistentAliveService"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="com.zhidao.boot.persistent.lib.action" />
</intent-filter>
</service>
<activity
android:name="com.zhidao.boot.persistent.lib.PersistentAliveActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
</application>
</manifest>

View File

@@ -1,6 +1,7 @@
package com.mogo.launcher;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import androidx.multidex.MultiDex;
@@ -14,6 +15,7 @@ import com.mogo.module.authorize.authprovider.invoke.AuthorizeConstant;
import com.mogo.module.carchatting.card.CallChatConstant;
import com.mogo.module.common.MogoModule;
import com.mogo.module.common.MogoModulePaths;
import com.mogo.module.main.service.MogoMainService;
import com.mogo.module.media.MediaConstants;
import com.mogo.module.service.ServiceConst;
import com.mogo.module.tanlu.constant.TanluConstants;
@@ -22,6 +24,7 @@ import com.mogo.service.MogoServicePaths;
import com.mogo.service.connection.IMogoSocketManager;
import com.mogo.utils.logger.LogLevel;
import com.mogo.utils.logger.Logger;
import com.zhidao.boot.persistent.lib.PersistentManager;
/**
* @author congtaowang
@@ -67,6 +70,12 @@ public class MogoApplication extends AbsMogoApplication {
MogoModulePaths.addBaseModule( new MogoModule( V2XConst.PATH_V2X_UI, V2XConst.PATH_V2X_UI ) );
// 暂时去掉推送
// MogoModulePaths.addModule(new MogoModule(PushUIConstants.TAG, PushUIConstants.TAG));
if (!DebugConfig.isLauncher()) {
PersistentManager.getInstance().initManager(this);
Intent intent = new Intent( this, MogoMainService.class );
startService( intent );
}
Log.i( "timer", "cost " + ( System.currentTimeMillis() - start ) + "ms" );
}

View File

@@ -41,9 +41,9 @@ dependencies {
implementation rootProject.ext.dependencies.arouter
annotationProcessor rootProject.ext.dependencies.aroutercompiler
if (Boolean.valueOf(RELEASE)) {
implementation rootProject.ext.dependencies.modulemain
api rootProject.ext.dependencies.modulemain
} else {
implementation project(":modules:mogo-module-main")
api project(":modules:mogo-module-main")
}
}

View File

@@ -41,10 +41,10 @@ dependencies {
implementation rootProject.ext.dependencies.arouter
annotationProcessor rootProject.ext.dependencies.aroutercompiler
if (Boolean.valueOf(RELEASE)) {
implementation rootProject.ext.dependencies.modulemain
api rootProject.ext.dependencies.modulemain
api rootProject.ext.dependencies.moduleapps
} else {
implementation project(":modules:mogo-module-main")
api project(":modules:mogo-module-main")
api project(':modules:mogo-module-apps')
}
}

View File

@@ -38,15 +38,8 @@ class MogoMainService extends Service implements IMogoLocationListener {
*/
private IMogoLocationClient mLocationClient;
@Nullable
@Override
public IBinder onBind( Intent intent ) {
return null;
}
@Override
public int onStartCommand( Intent intent, int flags, int startId ) {
public void onCreate() {
Logger.d( TAG, "基本服务启动" );
mServiceApis = ( IMogoServiceApis ) ARouter.getInstance().build( MogoServicePaths.PATH_SERVICE_APIS ).navigation();
initAndStartLocation();
@@ -57,6 +50,16 @@ class MogoMainService extends Service implements IMogoLocationListener {
initADAS();
}, 2_000L
);
}
@Nullable
@Override
public IBinder onBind( Intent intent ) {
return null;
}
@Override
public int onStartCommand( Intent intent, int flags, int startId ) {
return START_STICKY;
}