Merge branch 'feature/feature_mogo_obu'

This commit is contained in:
董宏宇
2021-09-07 20:45:30 +08:00
899 changed files with 15458 additions and 377839 deletions

2
.idea/.name generated
View File

@@ -1 +1 @@
MogoLauncher
MoGoEagleEye

View File

@@ -7,6 +7,9 @@
<JetCodeStyleSettings>
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</JetCodeStyleSettings>
<codeStyleSettings language="JAVA">
<option name="KEEP_FIRST_COLUMN_COMMENT" value="false" />
</codeStyleSettings>
<codeStyleSettings language="XML">
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />

20
.idea/gradle.xml generated
View File

@@ -4,11 +4,10 @@
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="delegatedBuild" value="true" />
<option name="testRunner" value="PLATFORM" />
<option name="testRunner" value="GRADLE" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="1.8" />
<option name="gradleJvm" value="11" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
@@ -19,24 +18,16 @@
<option value="$PROJECT_DIR$/OCH/mogo-och-taxi" />
<option value="$PROJECT_DIR$/app" />
<option value="$PROJECT_DIR$/foudations" />
<option value="$PROJECT_DIR$/foudations/httpdns-base" />
<option value="$PROJECT_DIR$/foudations/httpdns-mogo" />
<option value="$PROJECT_DIR$/foudations/httpdns-noop" />
<option value="$PROJECT_DIR$/foudations/httpdns-tencent" />
<option value="$PROJECT_DIR$/foudations/mogo-aicloud-services-apk" />
<option value="$PROJECT_DIR$/foudations/mogo-aicloud-services-sdk" />
<option value="$PROJECT_DIR$/foudations/mogo-base-websocket-sdk" />
<option value="$PROJECT_DIR$/foudations/mogo-commons" />
<option value="$PROJECT_DIR$/foudations/mogo-utils" />
<option value="$PROJECT_DIR$/libraries" />
<option value="$PROJECT_DIR$/libraries/map-amap" />
<option value="$PROJECT_DIR$/libraries/map-autonavi" />
<option value="$PROJECT_DIR$/libraries/map-custom" />
<option value="$PROJECT_DIR$/libraries/mogo-map" />
<option value="$PROJECT_DIR$/libraries/mogo-map-api" />
<option value="$PROJECT_DIR$/libraries/tanlulib" />
<option value="$PROJECT_DIR$/main-extensions" />
<option value="$PROJECT_DIR$/main-extensions/mogo-module-main-independent" />
<option value="$PROJECT_DIR$/main-extensions/mogo-module-main-launcher" />
<option value="$PROJECT_DIR$/modules" />
<option value="$PROJECT_DIR$/modules/mogo-module-adas" />
@@ -45,14 +36,14 @@
<option value="$PROJECT_DIR$/modules/mogo-module-back" />
<option value="$PROJECT_DIR$/modules/mogo-module-common" />
<option value="$PROJECT_DIR$/modules/mogo-module-extensions" />
<option value="$PROJECT_DIR$/modules/mogo-module-guide" />
<option value="$PROJECT_DIR$/modules/mogo-module-hmi" />
<option value="$PROJECT_DIR$/modules/mogo-module-left-panel" />
<option value="$PROJECT_DIR$/modules/mogo-module-left-panel-noop" />
<option value="$PROJECT_DIR$/modules/mogo-module-main" />
<option value="$PROJECT_DIR$/modules/mogo-module-map" />
<option value="$PROJECT_DIR$/modules/mogo-module-media" />
<option value="$PROJECT_DIR$/modules/mogo-module-monitor" />
<option value="$PROJECT_DIR$/modules/mogo-module-obu" />
<option value="$PROJECT_DIR$/modules/mogo-module-obu-mogo" />
<option value="$PROJECT_DIR$/modules/mogo-module-push" />
<option value="$PROJECT_DIR$/modules/mogo-module-push-base" />
<option value="$PROJECT_DIR$/modules/mogo-module-push-noop" />
@@ -60,8 +51,6 @@
<option value="$PROJECT_DIR$/modules/mogo-module-service" />
<option value="$PROJECT_DIR$/modules/mogo-module-share" />
<option value="$PROJECT_DIR$/modules/mogo-module-smp" />
<option value="$PROJECT_DIR$/modules/mogo-module-splash" />
<option value="$PROJECT_DIR$/modules/mogo-module-splash-noop" />
<option value="$PROJECT_DIR$/modules/mogo-module-v2x" />
<option value="$PROJECT_DIR$/modules/mogo-module-widgets" />
<option value="$PROJECT_DIR$/services" />
@@ -91,7 +80,6 @@
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
<option name="useQualifiedModuleNames" value="true" />
</GradleProjectSettings>
</option>
</component>

18
.idea/misc.xml generated
View File

@@ -11,11 +11,25 @@
<component name="DesignSurface">
<option name="filePathToZoomLevelMap">
<map>
<entry key="modules/mogo-module-map/src/main/res/layout/module_map_fragment_map.xml" value="0.202734375" />
<entry key="../../../../../layout/custom_preview.xml" value="0.19947916666666668" />
<entry key="modules/mogo-module-hmi/src/main/res/layout/fragment_warning.xml" value="0.34427083333333336" />
<entry key="modules/mogo-module-hmi/src/main/res/layout/notification_v2x_msg_vr.xml" value="0.3453125" />
<entry key="modules/mogo-module-hmi/src/main/res/layout/view_traffic_light_vr.xml" value="0.25" />
<entry key="modules/mogo-module-main/src/main/res/layout/module_main_activity_main.xml" value="0.3125" />
<entry key="modules/mogo-module-service/src/main/res/drawable/bg_adas_dispatch.xml" value="0.184" />
<entry key="modules/mogo-module-service/src/main/res/drawable/bg_adas_dispatch_affirm.xml" value="0.19166666666666668" />
<entry key="modules/mogo-module-service/src/main/res/drawable/bg_map_marker_blue_info.xml" value="0.184" />
<entry key="modules/mogo-module-service/src/main/res/drawable/module_service_dispatch_cars_affirm_bg.xml" value="0.218" />
<entry key="modules/mogo-module-service/src/main/res/drawable/module_service_dispatch_cars_bg.xml" value="0.218" />
<entry key="modules/mogo-module-service/src/main/res/drawable/module_service_dispatch_cars_cancel_bg.xml" value="0.218" />
<entry key="modules/mogo-module-service/src/main/res/drawable/module_service_dispatch_timer_bg.xml" value="0.218" />
<entry key="modules/mogo-module-service/src/main/res/layout/module_dialog_adas_dispatch_cars.xml" value="0.5546876453218006" />
<entry key="modules/mogo-module-service/src/main/res/layout/module_dialog_adas_dispatch_remind.xml" value="0.35734252929687504" />
<entry key="modules/mogo-module-service/src/main/res/layout/module_services_fragment_online_car_panel.xml" value="0.28919677734374993" />
</map>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="Embedded JDK" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
</project>

View File

@@ -8,16 +8,12 @@ import com.alibaba.android.arouter.facade.annotation.Route;
import com.mogo.module.common.MogoApisHandler;
import com.mogo.och.IMogoOCH;
import com.mogo.och.OCHConstants;
import com.mogo.och.bus.bean.OchBusStation;
import com.mogo.och.bus.fragment.OchBusFragment;
import com.mogo.service.connection.IMogoOnMessageListener;
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
import com.mogo.service.statusmanager.StatusDescriptor;
import com.mogo.utils.UiThreadHandler;
import com.mogo.utils.logger.Logger;
import java.util.List;
/**
* 网约车小巴业务实现入口
*

View File

@@ -8,10 +8,14 @@ package com.mogo.och.bus.bean;
public class OchBusResetRequest {
private String sn;
private int siteId;
double lat;
double lon;
public OchBusResetRequest(String sn, int siteId) {
public OchBusResetRequest(String sn, int siteId, double lat, double lon) {
this.sn = sn;
this.siteId = siteId;
this.lat = lat;
this.lon = lon;
}
public String getSn() {
@@ -22,6 +26,22 @@ public class OchBusResetRequest {
this.sn = sn;
}
public double getLat() {
return lat;
}
public void setLat(double lat) {
this.lat = lat;
}
public double getLon() {
return lon;
}
public void setLon(double lon) {
this.lon = lon;
}
public int getSiteId() {
return siteId;
}

View File

@@ -101,7 +101,6 @@ public class OchBusFragment extends BaseOchFragment< OchBusFragment, OchBusPrese
getActivity().runOnUiThread( () -> {
if ( stationList == null ) {
// 获取小巴数据失败
Logger.e("liyz", " stationList == null ");
return;
}
@@ -164,7 +163,6 @@ public class OchBusFragment extends BaseOchFragment< OchBusFragment, OchBusPrese
} else if ( isArriveAtStation ) {
showSlidePanle( "滑动出发" );
}
Logger.d("liyz", "renderCurrentStationStatus -----> ");
mCurrentStationName.setText( currentStationName );
mNextStationName.setText( nextStationName );
mStartStationFlag.setVisibility( startStationFlagVisibility );
@@ -224,6 +222,9 @@ public class OchBusFragment extends BaseOchFragment< OchBusFragment, OchBusPrese
public void changeOperationStatus( boolean launch ) {
isOperationStatus = launch;
if ( launch ) {
// 出车的时候重制站点状态
mPresenter.debugResetStationStatus();
tvOperationStatus.setText( "收车" );
// showSlidePanle("滑动出发");
showPanel();

View File

@@ -5,11 +5,10 @@ import android.os.Looper;
import com.mogo.commons.AbsMogoApplication;
import com.mogo.module.common.MogoApisHandler;
import com.mogo.och.bus.bean.OchBusArriveAtStationMsg;
import com.mogo.och.bus.bean.OchBusOrder;
import com.mogo.och.bus.bean.OchBusStation;
import com.mogo.och.bus.bean.OchBusStationsChangedMsg;
import com.mogo.service.connection.IMogoOnMessageListener;
import com.mogo.service.cloud.socket.IMogoOnMessageListener;
import com.mogo.utils.UiThreadHandler;
import com.mogo.utils.logger.Logger;
import com.mogo.utils.network.utils.GsonUtil;

View File

@@ -36,6 +36,7 @@ import com.mogo.service.adas.entity.AdasOCHData;
import com.mogo.utils.logger.Logger;
import com.mogo.utils.network.RequestOptions;
import com.mogo.utils.network.utils.GsonUtil;
import com.mogo.utils.storage.SharedPrefsMgr;
import java.util.ArrayList;
import java.util.List;
@@ -96,7 +97,6 @@ public class OchBusPresenter extends Presenter< OchBusFragment > implements IMog
public void onCreate( @NonNull LifecycleOwner owner ) {
super.onCreate( owner );
Log.d(TAG, "onCreate ------> ");
Log.d("liyz", "onCreate ------> ");
queryOperationStatus();
queryBusRoutes();
}
@@ -106,7 +106,6 @@ public class OchBusPresenter extends Presenter< OchBusFragment > implements IMog
*/
public void queryBusRoutes() {
Logger.d( TAG, "查询小巴路线");
Logger.d( "liyz", "查询小巴路线------->");
double lat = 40.1974932972;
double lon = 116.7354579447;
@@ -122,16 +121,13 @@ public class OchBusPresenter extends Presenter< OchBusFragment > implements IMog
@Override
public void onSuccess( OchBusRoutesResponse o ) {
super.onSuccess( o );
Logger.d( "liyz", "-----1-------- o =" + o);
if ( o == null
|| o.getResult() == null
|| o.getResult().getSite() == null
|| o.getResult().getSite().isEmpty() ) {
Logger.e( "liyz", "-----2-------- ");
return;
}
Logger.d( TAG, "获取到小巴路线数据: " + o );
Logger.d( "liyz", "获取到小巴路线数据: " + o );
renderBusStationsStatus( o.getResult().getSite() );
}
@@ -139,7 +135,6 @@ public class OchBusPresenter extends Presenter< OchBusFragment > implements IMog
public void onError( Throwable e ) {
super.onError( e );
Logger.e( TAG, e, "获取小巴路线图失败" );
Logger.d( "liyz", "获取小巴路线图失败 ");
// 重复请求小巴路线,直至成功
queryBusStationDelay();
}
@@ -148,7 +143,6 @@ public class OchBusPresenter extends Presenter< OchBusFragment > implements IMog
public void onError( String message, int code ) {
super.onError( message, code );
Logger.e( TAG, "获取小巴路线失败 code: " + code + " msg: " + message );
Logger.e( "liyz", "获取小巴路线失败 code: " + code + " msg: " + message );
// 重复请求小巴路线,直至成功
queryBusStationDelay();
}
@@ -162,7 +156,6 @@ public class OchBusPresenter extends Presenter< OchBusFragment > implements IMog
*/
private void renderBusStationsStatus( List< OchBusStation > site ) {
Logger.d( TAG, "渲染站点信息");
Logger.e( "liyz", "渲染站点信息");
int lastStopStation = getNextStopStation();
@@ -255,40 +248,46 @@ public class OchBusPresenter extends Presenter< OchBusFragment > implements IMog
*/
public void debugResetStationStatus() {
Logger.d( TAG, "测试、重置站点状态");
double lat = 40.1974932972;
double lon = 116.7354579447;
OchBusResetRequest request = new OchBusResetRequest( MoGoAiCloudClientConfig.getInstance().getSn(), 1 );
RequestBody requestBody = RequestBody.create( MediaType.get( "application/json;charset=UTF-8" ), GsonUtil.jsonFromObject( request ) );
mService.debugResetStationStatus( requestBody )
.subscribeOn( Schedulers.io() ).observeOn( AndroidSchedulers.mainThread() )
.subscribe( new SubscribeImpl< OchBusRoutesResponse >( RequestOptions.create( getContext() ) ) {
// ADAS 经纬度,需要启动工控机
lat = MogoApisHandler.getInstance().getApis().getAdasControllerApi().getLastLat();
lon = MogoApisHandler.getInstance().getApis().getAdasControllerApi().getLastLon();
OchBusResetRequest request = new OchBusResetRequest(MoGoAiCloudClientConfig.getInstance().getSn(), 1, lat, lon);
RequestBody requestBody = RequestBody.create(MediaType.get("application/json;charset=UTF-8"), GsonUtil.jsonFromObject(request));
mService.debugResetStationStatus(requestBody)
.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread())
.subscribe(new SubscribeImpl<OchBusRoutesResponse>(RequestOptions.create(getContext())) {
@Override
public void onSuccess( OchBusRoutesResponse o ) {
super.onSuccess( o );
Logger.d( TAG, "获取到小巴路线数据: " + o );
public void onSuccess(OchBusRoutesResponse o) {
super.onSuccess(o);
Logger.d(TAG, "获取到小巴路线数据: " + o);
isGoingToNextStation = false;
if ( o.getResult() == null || o.getResult().getSite() == null || o.getResult().getSite().isEmpty() ) {
if (o.getResult() == null || o.getResult().getSite() == null || o.getResult().getSite().isEmpty()) {
return;
}
renderBusStationsStatus( o.getResult().getSite() );
renderBusStationsStatus(o.getResult().getSite());
}
@Override
public void onError( Throwable e ) {
super.onError( e );
Logger.e( TAG, e, "获取小巴路线图失败" );
public void onError(Throwable e) {
super.onError(e);
Logger.e(TAG, e, "获取小巴路线图失败");
// 重复请求小巴路线,直至成功
queryBusStationDelay();
}
@Override
public void onError( String message, int code ) {
super.onError( message, code );
Logger.e( TAG, "获取小巴路线失败 code: " + code + " msg: " + message );
public void onError(String message, int code) {
super.onError(message, code);
Logger.e(TAG, "获取小巴路线失败 code: " + code + " msg: " + message);
// 重复请求小巴路线,直至成功
queryBusStationDelay();
}
} );
});
}
/**
@@ -328,7 +327,7 @@ public class OchBusPresenter extends Presenter< OchBusFragment > implements IMog
return;
}
isGoingToNextStation = true;
AIAssist.getInstance( getContext() ).speakTTSVoice( "欢迎乘坐蘑菇智行无人驾驶小巴车,请您坐好,注意乘车安全,行程即将开始" );
AIAssist.getInstance( getContext() ).speakTTSVoice( "欢迎乘坐蘑菇车联‘无人驾驶小巴车,请您坐好,注意乘车安全,行程即将开始" );
RequestBody request = RequestBody.create( MediaType.get( "application/json" ), GsonUtil.jsonFromObject( new OchBusLeaveStationRequest( MoGoAiCloudClientConfig.getInstance().getSn(), stationList.get( currentStationIndex ).getSiteId() ) ) );
mService.leaveStation( request ).subscribeOn( Schedulers.io() )
.observeOn( AndroidSchedulers.mainThread() )
@@ -453,17 +452,24 @@ public class OchBusPresenter extends Presenter< OchBusFragment > implements IMog
if ( awayPassengersResponse == null || awayPassengersResponse.result == null || awayPassengersResponse.result.info == null || awayPassengersResponse.result.info.isEmpty() ) {
//
} else {
builder.append( ",请尾号为" );
builder.append( ",请尾号为 " );
for ( QueryLeaveAwayPassengersResponse.LeaveAwayPassenger leaveAwayPassenger : awayPassengersResponse.result.info ) {
if ( leaveAwayPassenger == null ) {
continue;
}
String tailNum = leaveAwayPassenger.userPhone.substring( leaveAwayPassenger.userPhone.length() - 4 );
builder.append( tailNum ).append( "," );
String tailNum = null;
try {
tailNum = leaveAwayPassenger.userPhone.substring(leaveAwayPassenger.userPhone.length() - 4);
} catch (Exception e) {
e.printStackTrace();
tailNum = leaveAwayPassenger.userPhone;
}
builder.append( tailNum ).append( "" );
}
builder.append( "的乘客下车" );
}
builder.append( ",带好随身物品,下车请注意安全" );
builder.append(",带好随身物品,下车请注意安全");
Logger.d(TAG, "TTS:" + builder.toString());
AIAssist.getInstance( getContext() ).speakTTSVoice( builder.toString() );
}
@@ -479,7 +485,7 @@ public class OchBusPresenter extends Presenter< OchBusFragment > implements IMog
}
Logger.d( TAG, "单程结束====" );
MogoApisHandler.getInstance().getApis().getAdasControllerApi().cancelAutopilot();
AIAssist.getInstance( getContext() ).speakTTSVoice( "感谢您体验蘑菇出行无人驾驶小巴车,请您携带好随身物品,我们下次再见" );
AIAssist.getInstance( getContext() ).speakTTSVoice( "感谢您体验蘑菇车联‘无人驾驶小巴车,请您携带好随身物品,我们下次再见" );
RequestBody request = RequestBody.create( MediaType.get( "application/json" ), GsonUtil.jsonFromObject( new OchBusLeaveStationRequest( MoGoAiCloudClientConfig.getInstance().getSn(), stationList.get( currentStationIndex ).getSiteId() ) ) );
mService.leaveStation( request ).subscribeOn( Schedulers.io() )
.observeOn( AndroidSchedulers.mainThread() )
@@ -633,8 +639,15 @@ public class OchBusPresenter extends Presenter< OchBusFragment > implements IMog
return;
}
try {
String tailNum = order.getUserPhone().substring( order.getUserPhone().length() - 4 );
AIAssist.getInstance( getContext() ).speakTTSVoice( "接到新订单,尾号" + tailNum + "上车站点为" + order.getStartStation() );
String tailNum = null;
try {
tailNum = order.getUserPhone().substring( order.getUserPhone().length() - 4 );
} catch (Exception e) {
e.printStackTrace();
tailNum = order.getUserPhone();
}
Logger.d(TAG, "TTS:" + tailNum);
AIAssist.getInstance( getContext() ).speakTTSVoice( "接到新订单,尾号 " + tailNum + " 上车站点为 " + order.getStartStation() );
} catch ( Exception e ) {
e.printStackTrace();
}

View File

@@ -46,7 +46,7 @@ dependencies {
implementation rootProject.ext.dependencies.mogooch
implementation rootProject.ext.dependencies.mogoutils
implementation rootProject.ext.dependencies.mogocommons
implementation rootProject.ext.dependencies.mogomodulecommon
implementation rootProject.ext.dependencies.modulecommon
} else {
implementation project(":OCH:mogo-och")
implementation project(":foudations:mogo-utils")

View File

@@ -17,8 +17,8 @@ import com.mogo.och.taxi.ui.OCHTaxiUiController;
import com.mogo.service.adas.IMogoAdasOCHCallback;
import com.mogo.service.adas.RemoteControlAutoPilotParameters;
import com.mogo.service.adas.entity.AdasOCHData;
import com.mogo.service.connection.IMogoLifecycleListener;
import com.mogo.service.connection.IMogoOnMessageListener;
import com.mogo.service.cloud.socket.IMogoLifecycleListener;
import com.mogo.service.cloud.socket.IMogoOnMessageListener;
import com.mogo.service.intent.IMogoIntentListener;
import com.mogo.utils.NetworkUtils;
import com.mogo.utils.TipToast;

View File

@@ -5,7 +5,7 @@
<string name="module_och_taxi_order_status_ph_text">已到达上车站点,等待乘客上车</string>
<string name="module_och_taxi_order_distance_anchor_text">预计里程</string>
<string name="module_och_taxi_order_distance_text_ph">3.2 km</string>
<string name="module_och_taxi_order_complete">请携带好随身物品,注意侧后\n方来车感谢体验蘑菇智行自\n动驾驶车</string>
<string name="module_och_taxi_order_complete">请携带好随身物品,注意侧后\n方来车感谢体验蘑菇车联‘自\n动驾驶车</string>
<string name="module_och_taxi_order_complete_1">即将到达目的地,请您携带好随身物品,安全下车。</string>
<string name="module_och_taxi_on_the_way_2_end_station">去往下车地点</string>
<string name="module_och_taxi_waiting">已到达,等待乘客上车</string>

View File

@@ -214,7 +214,11 @@ public abstract class BaseOchFragment<V extends IView, P extends Presenter<V>> e
public void showAutopilotBiz() {
getActivity().runOnUiThread(() -> {
ctvAutopilotStatus.setVisibility(View.VISIBLE);
slidePanelView.setVisibility(View.VISIBLE);
if (isOperationStatus) {
slidePanelView.setVisibility(View.VISIBLE);
} else {
slidePanelView.setVisibility(View.GONE);
}
});
}

52
README.md Normal file
View File

@@ -0,0 +1,52 @@
#### 自测试-广播触发
// 增加日志输出空间
adb logcat -G 100m
adb shell
setprop debug.mogo.root 1
exit
adb root
adb remount
adb shell
// (新的HMI)使用命令行触发 V2X 预警场景
// 顶部弹窗场景,控制展示
adb shell am broadcast -a com.hmi.v2x.notification --ez v2xIsShow true --es tag "200011" --ei v2xType 20011 --es alertContent "测试外部传入数据" --es ttsContent "测试TTS"
// 关闭顶部弹窗
adb shell am broadcast -a com.hmi.v2x.notification --ez v2xIsShow false --es tag "20008"
// 控制红绿灯
adb shell am broadcast -a com.hmi.v2x.trafficlight --ez trafficLightIsShow true --ei trafficLightCheckType 1
adb shell am broadcast -a com.hmi.v2x.trafficlight --ez trafficLightIsShow false
// 控制限速
adb shell am broadcast -a com.hmi.v2x.limitingvelocity --ez limitingVelocityIsShow true --ei limitingVelocitySpeed 60
adb shell am broadcast -a com.hmi.v2x.limitingvelocity --ez limitingVelocityIsShow false
// 控制OBU场景自测 obuStates 1-添加2-删除0-更新
adb shell am broadcast -a com.obu.test_trigger --ei obuStates 1 --ei obuLevel 3 --ei obuType 0x2A01
// 控制OBU 模拟自车位置
adb shell am broadcast -a com.obu.test_trigger_recognized
//与Rsu相关
// 红绿灯 0不可用1红灯2绿灯3黄灯
adb shell am broadcast -a com.obu.test_light_recognized --ei obuStates 1 --ei lightLevel 1 --ei obuLevel 3 --ei obuType 0x2B09 --ei rtiType 0x2
// 道路危险情况预警
adb shell am broadcast -a com.obu.test_light_recognized --ei obuStates 1 --ei obuLevel 3 --ei obuType 0x2B06 --ei rtiType 0x7
// 弱势交通参与者
adb shell am broadcast -a com.obu.test_light_recognized --ei obuStates 1 --ei obuLevel 3 --ei obuType 0X2B02 --ei ptcInfo 0x1
// (旧版本)使用命令行触发各种测试场景演示
adb shell am broadcast -a com.v2x.test_panel_control --ei sceneType 1
// 右侧弱势交通参与者
adb shell am broadcast -a com.v2x.adas_data_broadcast --es ADASData right
// 调用应用内的模拟
adb shell am broadcast -a com.mogo.mock --ei oper 46
// 小智语音
adb shell am broadcast -a com.zhidao.auto.txz.receiver --es text "欢迎乘坐’蘑菇车联‘无人驾驶小巴车" --ei speakType 5

4
UploadMaven.bat Normal file
View File

@@ -0,0 +1,4 @@
@echo off
for /f "delims=" %%i in (modules.txt) do (
gradlew %%i:clean %%i:uploadArchives
)

View File

@@ -46,8 +46,8 @@ android {
zipAlignEnabled false
shrinkResources false
signingConfig signingConfigs.release
manifestPlaceholders =[
MAP_SDK_VERSION : properties.getProperty("MAP_SDK_VERSION")
manifestPlaceholders = [
MAP_SDK_VERSION: properties.getProperty("MAP_SDK_VERSION")
]
}
release {
@@ -55,9 +55,10 @@ android {
zipAlignEnabled false
shrinkResources false
signingConfig signingConfigs.release
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
manifestPlaceholders =[
MAP_SDK_VERSION : properties.getProperty("MAP_SDK_VERSION")
manifestPlaceholders = [
MAP_SDK_VERSION: properties.getProperty("MAP_SDK_VERSION")
]
}
}
@@ -70,34 +71,14 @@ android {
main {
manifest.srcFile 'src/main/AndroidManifest.xml'
}
launcher {
manifest.srcFile 'src/launcher/AndroidManifest.xml'
}
independent {
manifest.srcFile 'src/independent/AndroidManifest.xml'
}
f8xxLauncherOnlineRelease {
manifest.srcFile 'src/f8xxLauncherOnlineRelease/AndroidManifest.xml'
}
fPadLenovoLauncherOnlineRelease {
manifest.srcFile 'src/launcher/AndroidManifest.xml'
}
}
flavorDimensions "product", "basic", "env"
productFlavors {
//独立app
independent {
dimension "basic"
// 是否启动位置服务
buildConfigField 'boolean', 'LAUNCH_LOCATION_SERVICE', 'false'
// 是否作为 launcher 运行
buildConfigField 'boolean', 'IS_LAUNCHER', 'false'
buildConfigField 'String', 'SOCKET_APP_ID', '\"com.mogo.launcher\"'
// 是否支持目的地导航策略
buildConfigField 'boolean', 'IS_SUPPORT_SCHEDULE_CALCULATE_NOT_HOME_COMPANY_DISTANCE_FOR_PUSH', 'true'
}
// launcher app
launcher {
dimension "basic"
@@ -108,316 +89,8 @@ android {
buildConfigField 'String', 'SOCKET_APP_ID', '\"com.mogo.launcher\"'
// 是否支持目的地导航策略
buildConfigField 'boolean', 'IS_SUPPORT_SCHEDULE_CALCULATE_NOT_HOME_COMPANY_DISTANCE_FOR_PUSH', 'false'
}
// f系列-网约车-出租车
fochtaxi {
minSdkVersion rootProject.ext.android.minSdkVersion
targetSdkVersion rootProject.ext.android.targetSdkVersion
// 应用包名
applicationId rootProject.ext.android.fLauncherApplicationId
dimension "product"
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'false'
// 车机类型主要用于区分自研车机还是别人家的车机自研车机类型为0
buildConfigField 'int', 'CAR_MACHINE_TYPE', '0'
buildConfigField 'boolean', 'ROAD_EVENT_ANIMATED', 'true'
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue, CHANNEL_VALUE: "fochtaxi"]
// 是否使用高德sdk自定义导航
buildConfigField 'boolean', 'USE_CUSTOM_NAVI', 'false'
// 是否支持换肤
buildConfigField 'boolean', 'IS_SKIN_SUPPORTED', 'true'
// 是否支持查询导航目的地车友
buildConfigField 'boolean', 'IS_SUPPORTED_SEARCH_DESTINATION_ONLINE_CAR_LIST', 'true'
// 是否支持桌面卡片刷新
buildConfigField 'boolean', 'IS_SUPPORT_LAUNCHER_CARD_REFRESH_STRATEGY', 'false'
// 是否基于地图
buildConfigField 'boolean', 'IS_MAP_BASED', 'true'
// 是否加载引导模块
buildConfigField 'boolean', 'IS_NEED_LOAD_GUIDE_MODULE', 'false'
// 分享时是否隐藏 adas
buildConfigField 'boolean', 'IS_NEED_HIDE_ADAS_WHEN_SHARE', 'false'
// 是否需要实时上报坐标
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'
// 是否需要使用工控机的rtk定位
buildConfigField 'boolean', 'IS_USE_ADAS_RTK_LOCATION_INFO', 'true'
}
// f系列-网约车-小巴车
fochbus {
minSdkVersion rootProject.ext.android.minSdkVersion
targetSdkVersion rootProject.ext.android.targetSdkVersion
// 应用包名
applicationId rootProject.ext.android.fLauncherApplicationId
dimension "product"
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'false'
// 车机类型主要用于区分自研车机还是别人家的车机自研车机类型为0
buildConfigField 'int', 'CAR_MACHINE_TYPE', '0'
buildConfigField 'boolean', 'ROAD_EVENT_ANIMATED', 'true'
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue,CHANNEL_VALUE: "fochbus"]
// 是否使用高德sdk自定义导航
buildConfigField 'boolean', 'USE_CUSTOM_NAVI', 'false'
// 是否支持换肤
buildConfigField 'boolean', 'IS_SKIN_SUPPORTED', 'true'
// 是否支持查询导航目的地车友
buildConfigField 'boolean', 'IS_SUPPORTED_SEARCH_DESTINATION_ONLINE_CAR_LIST', 'true'
// 是否支持桌面卡片刷新
buildConfigField 'boolean', 'IS_SUPPORT_LAUNCHER_CARD_REFRESH_STRATEGY', 'false'
// 是否基于地图
buildConfigField 'boolean', 'IS_MAP_BASED', 'true'
// 是否加载引导模块
buildConfigField 'boolean', 'IS_NEED_LOAD_GUIDE_MODULE', 'false'
// 分享时是否隐藏 adas
buildConfigField 'boolean', 'IS_NEED_HIDE_ADAS_WHEN_SHARE', 'false'
// 是否需要实时上报坐标
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'
// 是否需要使用工控机的rtk定位
buildConfigField 'boolean', 'IS_USE_ADAS_RTK_LOCATION_INFO', 'true'
}
// f系列-分体机全系列,未细分
f8xx {
minSdkVersion rootProject.ext.android.minSdkVersion
targetSdkVersion rootProject.ext.android.targetSdkVersion
// 应用包名
applicationId rootProject.ext.android.fLauncherApplicationId
dimension "product"
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'false'
// 车机类型主要用于区分自研车机还是别人家的车机自研车机类型为0
buildConfigField 'int', 'CAR_MACHINE_TYPE', '0'
buildConfigField 'boolean', 'ROAD_EVENT_ANIMATED', 'true'
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue,CHANNEL_VALUE: "f8xx"]
// 是否使用高德sdk自定义导航
buildConfigField 'boolean', 'USE_CUSTOM_NAVI', 'false'
// 是否支持换肤
buildConfigField 'boolean', 'IS_SKIN_SUPPORTED', 'true'
// 是否支持查询导航目的地车友
buildConfigField 'boolean', 'IS_SUPPORTED_SEARCH_DESTINATION_ONLINE_CAR_LIST', 'true'
// 是否支持桌面卡片刷新
buildConfigField 'boolean', 'IS_SUPPORT_LAUNCHER_CARD_REFRESH_STRATEGY', 'false'
// 是否基于地图
buildConfigField 'boolean', 'IS_MAP_BASED', 'true'
// 是否加载引导模块
buildConfigField 'boolean', 'IS_NEED_LOAD_GUIDE_MODULE', 'true'
// 分享时是否隐藏 adas
buildConfigField 'boolean', 'IS_NEED_HIDE_ADAS_WHEN_SHARE', 'false'
// 是否需要实时上报坐标
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'
// 是否需要使用工控机的rtk定位
buildConfigField 'boolean', 'IS_USE_ADAS_RTK_LOCATION_INFO', 'true'
}
// f系列-分体机
f80x {
minSdkVersion rootProject.ext.android.minSdkVersion
targetSdkVersion rootProject.ext.android.targetSdkVersion
// 应用包名
applicationId rootProject.ext.android.fLauncherApplicationId
dimension "product"
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'false'
// 车机类型主要用于区分自研车机还是别人家的车机自研车机类型为0
buildConfigField 'int', 'CAR_MACHINE_TYPE', '0'
buildConfigField 'boolean', 'ROAD_EVENT_ANIMATED', 'true'
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue, CHANNEL_VALUE: "f80x"]
// 是否使用高德sdk自定义导航
buildConfigField 'boolean', 'USE_CUSTOM_NAVI', 'false'
// 是否支持换肤
buildConfigField 'boolean', 'IS_SKIN_SUPPORTED', 'true'
// 是否支持查询导航目的地车友
buildConfigField 'boolean', 'IS_SUPPORTED_SEARCH_DESTINATION_ONLINE_CAR_LIST', 'true'
// 是否支持桌面卡片刷新
buildConfigField 'boolean', 'IS_SUPPORT_LAUNCHER_CARD_REFRESH_STRATEGY', 'false'
// 是否基于地图
buildConfigField 'boolean', 'IS_MAP_BASED', 'true'
// 是否加载引导模块
buildConfigField 'boolean', 'IS_NEED_LOAD_GUIDE_MODULE', 'true'
// 分享时是否隐藏 adas
buildConfigField 'boolean', 'IS_NEED_HIDE_ADAS_WHEN_SHARE', 'false'
// 是否需要实时上报坐标
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'
// 是否需要使用工控机的rtk定位
buildConfigField 'boolean', 'IS_USE_ADAS_RTK_LOCATION_INFO', 'true'
}
// 衡阳-联想Pad
fPadLenovo {
minSdkVersion rootProject.ext.android.minSdkVersionPadLenovo
targetSdkVersion rootProject.ext.android.targetSdkVersionPadLenovo
// 应用包名
applicationId rootProject.ext.android.fLauncherApplicationId
dimension "product"
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'false'
// 车机类型主要用于区分自研车机还是别人家的车机自研车机类型为0
buildConfigField 'int', 'CAR_MACHINE_TYPE', '2'
buildConfigField 'boolean', 'ROAD_EVENT_ANIMATED', 'true'
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue,CHANNEL_VALUE: "fPadLenovo"]
// 是否使用高德sdk自定义导航
buildConfigField 'boolean', 'USE_CUSTOM_NAVI', 'false'
// 是否支持换肤
buildConfigField 'boolean', 'IS_SKIN_SUPPORTED', 'true'
// 是否支持查询导航目的地车友
buildConfigField 'boolean', 'IS_SUPPORTED_SEARCH_DESTINATION_ONLINE_CAR_LIST', 'true'
// 是否支持桌面卡片刷新
buildConfigField 'boolean', 'IS_SUPPORT_LAUNCHER_CARD_REFRESH_STRATEGY', 'false'
// 是否基于地图
buildConfigField 'boolean', 'IS_MAP_BASED', 'true'
// 是否加载引导模块
buildConfigField 'boolean', 'IS_NEED_LOAD_GUIDE_MODULE', 'false'
// 分享时是否隐藏 adas
buildConfigField 'boolean', 'IS_NEED_HIDE_ADAS_WHEN_SHARE', 'false'
// 是否需要实时上报坐标
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'
// 是否需要使用工控机的rtk定位
buildConfigField 'boolean', 'IS_USE_ADAS_RTK_LOCATION_INFO', 'true'
}
// 衡阳-联想Pad-网约车-出租车
fPadLenovoOchTaxi {
minSdkVersion rootProject.ext.android.minSdkVersionPadLenovo
targetSdkVersion rootProject.ext.android.targetSdkVersionPadLenovo
// 应用包名
applicationId rootProject.ext.android.fLauncherApplicationId
dimension "product"
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'false'
// 车机类型主要用于区分自研车机还是别人家的车机自研车机类型为0
buildConfigField 'int', 'CAR_MACHINE_TYPE', '2'
buildConfigField 'boolean', 'ROAD_EVENT_ANIMATED', 'true'
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue, CHANNEL_VALUE: "fPadLenovoOchTaxi"]
// 是否使用高德sdk自定义导航
buildConfigField 'boolean', 'USE_CUSTOM_NAVI', 'false'
// 是否支持换肤
buildConfigField 'boolean', 'IS_SKIN_SUPPORTED', 'true'
// 是否支持查询导航目的地车友
buildConfigField 'boolean', 'IS_SUPPORTED_SEARCH_DESTINATION_ONLINE_CAR_LIST', 'true'
// 是否支持桌面卡片刷新
buildConfigField 'boolean', 'IS_SUPPORT_LAUNCHER_CARD_REFRESH_STRATEGY', 'false'
// 是否基于地图
buildConfigField 'boolean', 'IS_MAP_BASED', 'true'
// 是否加载引导模块
buildConfigField 'boolean', 'IS_NEED_LOAD_GUIDE_MODULE', 'false'
// 分享时是否隐藏 adas
buildConfigField 'boolean', 'IS_NEED_HIDE_ADAS_WHEN_SHARE', 'false'
// 是否需要实时上报坐标
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'
// 是否需要使用工控机的rtk定位
buildConfigField 'boolean', 'IS_USE_ADAS_RTK_LOCATION_INFO', 'true'
}
// 衡阳-联想Pad-网约车-小巴车
fPadLenovoOchBus {
minSdkVersion rootProject.ext.android.minSdkVersionPadLenovo
targetSdkVersion rootProject.ext.android.targetSdkVersionPadLenovo
// 应用包名
applicationId rootProject.ext.android.fLauncherApplicationId
dimension "product"
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'false'
// 车机类型主要用于区分自研车机还是别人家的车机自研车机类型为0
buildConfigField 'int', 'CAR_MACHINE_TYPE', '2'
buildConfigField 'boolean', 'ROAD_EVENT_ANIMATED', 'true'
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue,CHANNEL_VALUE: "fPadLenovoOchBus"]
// 是否使用高德sdk自定义导航
buildConfigField 'boolean', 'USE_CUSTOM_NAVI', 'false'
// 是否支持换肤
buildConfigField 'boolean', 'IS_SKIN_SUPPORTED', 'true'
// 是否支持查询导航目的地车友
buildConfigField 'boolean', 'IS_SUPPORTED_SEARCH_DESTINATION_ONLINE_CAR_LIST', 'true'
// 是否支持桌面卡片刷新
buildConfigField 'boolean', 'IS_SUPPORT_LAUNCHER_CARD_REFRESH_STRATEGY', 'false'
// 是否基于地图
buildConfigField 'boolean', 'IS_MAP_BASED', 'true'
// 是否加载引导模块
buildConfigField 'boolean', 'IS_NEED_LOAD_GUIDE_MODULE', 'false'
// 分享时是否隐藏 adas
buildConfigField 'boolean', 'IS_NEED_HIDE_ADAS_WHEN_SHARE', 'false'
// 是否需要实时上报坐标
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'
// 是否需要使用工控机的rtk定位
buildConfigField 'boolean', 'IS_USE_ADAS_RTK_LOCATION_INFO', 'true'
}
// f系列-分体机
phone {
// 应用包名
applicationId rootProject.ext.android.fLauncherApplicationId
dimension "product"
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'false'
// 车机类型主要用于区分自研车机还是别人家的车机自研车机类型为0
buildConfigField 'int', 'CAR_MACHINE_TYPE', '1'
buildConfigField 'boolean', 'ROAD_EVENT_ANIMATED', 'true'
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue, CHANNEL_VALUE: "phone"]
// 是否使用高德sdk自定义导航
buildConfigField 'boolean', 'USE_CUSTOM_NAVI', 'false'
// 是否支持换肤
buildConfigField 'boolean', 'IS_SKIN_SUPPORTED', 'true'
// 是否支持查询导航目的地车友
buildConfigField 'boolean', 'IS_SUPPORTED_SEARCH_DESTINATION_ONLINE_CAR_LIST', 'true'
// 是否支持桌面卡片刷新
buildConfigField 'boolean', 'IS_SUPPORT_LAUNCHER_CARD_REFRESH_STRATEGY', 'false'
// 是否基于地图
buildConfigField 'boolean', 'IS_MAP_BASED', 'true'
// 是否加载引导模块
buildConfigField 'boolean', 'IS_NEED_LOAD_GUIDE_MODULE', 'true'
// 分享时是否隐藏 adas
buildConfigField 'boolean', 'IS_NEED_HIDE_ADAS_WHEN_SHARE', 'false'
// 是否需要实时上报坐标
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'
// 是否需要使用工控机的rtk定位
buildConfigField 'boolean', 'IS_USE_ADAS_RTK_LOCATION_INFO', 'true'
}
// f系列-分体机-高德
f8Amap {
minSdkVersion rootProject.ext.android.minSdkVersion
targetSdkVersion rootProject.ext.android.targetSdkVersion
// 应用包名
applicationId rootProject.ext.android.fLauncherApplicationId
dimension "product"
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'false'
// 车机类型主要用于区分自研车机还是别人家的车机自研车机类型为0
buildConfigField 'int', 'CAR_MACHINE_TYPE', '0'
buildConfigField 'boolean', 'ROAD_EVENT_ANIMATED', 'true'
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue, CHANNEL_VALUE: "f8Amap"]
// 是否使用高德sdk自定义导航
buildConfigField 'boolean', 'USE_CUSTOM_NAVI', 'false'
// 是否支持换肤
buildConfigField 'boolean', 'IS_SKIN_SUPPORTED', 'true'
// 是否支持查询导航目的地车友
buildConfigField 'boolean', 'IS_SUPPORTED_SEARCH_DESTINATION_ONLINE_CAR_LIST', 'true'
// 是否支持桌面卡片刷新
buildConfigField 'boolean', 'IS_SUPPORT_LAUNCHER_CARD_REFRESH_STRATEGY', 'false'
// 是否基于地图
buildConfigField 'boolean', 'IS_MAP_BASED', 'true'
// 是否加载引导模块
buildConfigField 'boolean', 'IS_NEED_LOAD_GUIDE_MODULE', 'true'
// 分享时是否隐藏 adas
buildConfigField 'boolean', 'IS_NEED_HIDE_ADAS_WHEN_SHARE', 'false'
// 是否需要实时上报坐标
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'
// 是否需要使用工控机的rtk定位
buildConfigField 'boolean', 'IS_USE_ADAS_RTK_LOCATION_INFO', 'false'
}
// 比亚迪
bydauto {
minSdkVersion rootProject.ext.android.minSdkVersion
targetSdkVersion rootProject.ext.android.targetSdkVersion
// 应用包名
applicationId rootProject.ext.android.bydautoIndependentApplicationId
dimension "product"
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'false'
// 车机类型主要用于区分自研车机还是别人家的车机其他车机比亚迪定为1
buildConfigField 'int', 'CAR_MACHINE_TYPE', '1'
buildConfigField 'boolean', 'ROAD_EVENT_ANIMATED', 'true'
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.bydautoIndependentApiValue,CHANNEL_VALUE: "bydauto"]
// 是否使用高德sdk自定义导航
buildConfigField 'boolean', 'USE_CUSTOM_NAVI', 'true'
// 是否支持换肤
buildConfigField 'boolean', 'IS_SKIN_SUPPORTED', 'false'
// 是否支持查询导航目的地车友
buildConfigField 'boolean', 'IS_SUPPORTED_SEARCH_DESTINATION_ONLINE_CAR_LIST', 'false'
// 是否支持桌面卡片刷新
buildConfigField 'boolean', 'IS_SUPPORT_LAUNCHER_CARD_REFRESH_STRATEGY', 'false'
// 是否基于地图
buildConfigField 'boolean', 'IS_MAP_BASED', 'true'
// 是否加载引导模块
buildConfigField 'boolean', 'IS_NEED_LOAD_GUIDE_MODULE', 'true'
// 分享时是否隐藏 adas
buildConfigField 'boolean', 'IS_NEED_HIDE_ADAS_WHEN_SHARE', 'false'
// 是否需要实时上报坐标
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'false'
// 是否需要使用工控机的rtk定位
buildConfigField 'boolean', 'IS_USE_ADAS_RTK_LOCATION_INFO', 'false'
}
// 配置网络环境QA、线上、演示
qa {
dimension "env"
buildConfigField 'int', 'NET_ENV', '2'
@@ -432,17 +105,19 @@ android {
}
}
apply from: "./functions/abiFilters.gradle"
// 配置不同渠道参数,直接影响功能完整度
apply from: "./productFlavors/f8Amap.gradle"
apply from: "./productFlavors/f8xx.gradle"
apply from: "./productFlavors/f80x.gradle"
apply from: "./productFlavors/fochbus.gradle"
apply from: "./productFlavors/fochtaxi.gradle"
apply from: "./productFlavors/fPadLenovo.gradle"
apply from: "./productFlavors/fPadLenovoOchBus.gradle"
apply from: "./productFlavors/fPadLenovoOchTaxi.gradle"
packagingOptions {
exclude 'META-INF/io.netty.versions.properties'
}
sourceSets {
main {
res.srcDirs = ['src/main/res', 'src/main/res-night']
}
}
}
repositories {
@@ -474,31 +149,38 @@ dependencies {
compileOnly rootProject.ext.dependencies.adasconfigapi
if (Boolean.valueOf(RELEASE)) {
implementation rootProject.ext.dependencies.mogoaicloudservicesdk
implementation rootProject.ext.dependencies.mogocommons
implementation rootProject.ext.dependencies.modulecommon
implementation rootProject.ext.dependencies.mogobasewebsocketsdk
implementation rootProject.ext.dependencies.modulesearch
implementation rootProject.ext.dependencies.mogomoduleauth
implementation rootProject.ext.dependencies.modulesplash
implementation rootProject.ext.dependencies.mogoservice
implementation rootProject.ext.dependencies.moduleV2x
implementation rootProject.ext.dependencies.moduleshare
implementation rootProject.ext.dependencies.tanluupload
implementation rootProject.ext.dependencies.mogomonitor
implementation rootProject.ext.dependencies.guideshow
implementation rootProject.ext.dependencies.moduleextensions
implementation rootProject.ext.dependencies.modulemap
implementation rootProject.ext.dependencies.moduleSmallMap
implementation rootProject.ext.dependencies.httpdnsmogo
implementation rootProject.ext.dependencies.moduleHmi
implementation rootProject.ext.dependencies.moduleobumogo
implementation rootProject.ext.dependencies.moduleADAS
implementation rootProject.ext.dependencies.mogomoduleback
implementation rootProject.ext.dependencies.mogomodulewidgets
implementation rootProject.ext.dependencies.modulemainlauncher
implementation rootProject.ext.dependencies.moduleapps
implementation rootProject.ext.dependencies.modulepushbase
implementation rootProject.ext.dependencies.modulepush
implementation rootProject.ext.dependencies.moduleleftpanelnoop
implementation rootProject.ext.dependencies.crashreportupgrade
implementation rootProject.ext.dependencies.crashreportbugly
} else {
implementation project(':foudations:mogo-aicloud-services-sdk')
implementation project(':foudations:mogo-commons')
implementation project(':foudations:mogo-base-websocket-sdk')
implementation project(':modules:mogo-module-common')
implementation project(':modules:mogo-module-search')
implementation project(':modules:mogo-module-authorize')
implementation project(':modules:mogo-module-service')
implementation project(':modules:mogo-module-splash')
implementation project(':modules:mogo-module-service')
implementation project(':modules:mogo-module-v2x')
implementation project(':modules:mogo-module-share')
implementation project(':libraries:tanlulib')
@@ -506,22 +188,23 @@ dependencies {
implementation project(':modules:mogo-module-extensions')
implementation project(':modules:mogo-module-map')
implementation project(':modules:mogo-module-smp')
implementation project(':modules:mogo-module-obu-mogo')
implementation project(':modules:mogo-module-hmi')
implementation project(':modules:mogo-module-adas')
implementation project(':foudations:httpdns-mogo')
implementation project(':modules:mogo-module-back')
implementation project(':modules:mogo-module-widgets')
implementation project(':main-extensions:mogo-module-main-launcher')
implementation project(':modules:mogo-module-apps')
implementation project(":modules:mogo-module-push-base")
implementation project(":modules:mogo-module-push")
implementation project(':modules:mogo-module-left-panel-noop')
implementation project(':test:crashreport-upgrade')
implementation project(':test:crashreport-bugly')
}
apply from: "./functions/aicloudservices.gradle"
apply from: "./functions/basedmap.gradle"
apply from: "./functions/perform.gradle"
apply from: "./functions/socketpush.gradle"
apply from: "./functions/leftpanel.gradle"
apply from: "./functions/skin.gradle"
apply from: "./functions/crashreport.gradle"
apply from: "./functions/widgets.gradle"
apply from: "./functions/tts.gradle"
apply from: "./functions/backwidget.gradle"
apply from: "./functions/mediaui.gradle"
apply from: "./functions/bizguide.gradle"
apply from: "./functions/och.gradle"
// implementation group: "com.tencent.matrix", name: "matrix-android-lib", version: '0.6.6', changing: true

View File

@@ -1,94 +0,0 @@
// 将 install 和 assemble 任务按功能分组
project.android.productFlavors {
// f系列-网约车-出租车
fochtaxi {
externalNativeBuild {
ndk {
// 设置支持的SO库架构
abiFilters "arm64-v8a"
}
}
}
// f系列-网约车小巴车
fochbus {
externalNativeBuild {
ndk {
// 设置支持的SO库架构
abiFilters "arm64-v8a"
}
}
}
// f系列-分体机全系列,未细分
f8xx {
externalNativeBuild {
ndk {
// 设置支持的SO库架构
abiFilters "arm64-v8a"
}
}
}
// 联想Pad
fPadLenovo {
externalNativeBuild {
ndk {
// 设置支持的SO库架构
abiFilters "arm64-v8a"
}
}
}
// 联想Pad
fPadLenovoOchTaxi {
externalNativeBuild {
ndk {
// 设置支持的SO库架构
abiFilters "arm64-v8a"
}
}
}
// 联想Pad
fPadLenovoOchBus {
externalNativeBuild {
ndk {
// 设置支持的SO库架构
abiFilters "arm64-v8a"
}
}
}
// f系列-分体机
f80x {
externalNativeBuild {
ndk {
// 设置支持的SO库架构
abiFilters "arm64-v8a"
}
}
}
// f系列-分体机
phone {
externalNativeBuild {
ndk {
// 设置支持的SO库架构
abiFilters "arm64-v8a"
}
}
}
// f系列-分体机-高德
f8Amap {
externalNativeBuild {
ndk {
// 设置支持的SO库架构
abiFilters "armeabi-v7a"
}
}
}
// 比亚迪
bydauto {
externalNativeBuild {
ndk {
// 设置支持的SO库架构
abiFilters "armeabi-v7a"
}
}
}
}

View File

@@ -1,31 +0,0 @@
// 基础服务仅比亚迪渠道用sdk方式实现其他都基于apk基础服务
project.dependencies {
if (Boolean.valueOf(RELEASE)) {
bydautoImplementation rootProject.ext.dependencies.mogoaicloudservicesdk
phoneImplementation rootProject.ext.dependencies.mogoaicloudservicesdk
f8xxImplementation rootProject.ext.dependencies.mogoaicloudserviceapk
f80xImplementation rootProject.ext.dependencies.mogoaicloudserviceapk
f8AmapImplementation rootProject.ext.dependencies.mogoaicloudserviceapk
fochtaxiImplementation rootProject.ext.dependencies.mogoaicloudserviceapk
fochbusImplementation rootProject.ext.dependencies.mogoaicloudserviceapk
fPadLenovoImplementation rootProject.ext.dependencies.mogoaicloudserviceapk
fPadLenovoOchTaxiImplementation rootProject.ext.dependencies.mogoaicloudserviceapk
fPadLenovoOchBusImplementation rootProject.ext.dependencies.mogoaicloudserviceapk
} else {
bydautoImplementation project(':foudations:mogo-aicloud-services-sdk')
phoneImplementation project(':foudations:mogo-aicloud-services-sdk')
f8xxImplementation project(':foudations:mogo-aicloud-services-apk')
f80xImplementation project(':foudations:mogo-aicloud-services-apk')
f8AmapImplementation project(':foudations:mogo-aicloud-services-apk')
fochtaxiImplementation project(':foudations:mogo-aicloud-services-apk')
fochbusImplementation project(':foudations:mogo-aicloud-services-apk')
fPadLenovoImplementation project(':foudations:mogo-aicloud-services-sdk')
fPadLenovoOchTaxiImplementation project(':foudations:mogo-aicloud-services-sdk')
fPadLenovoOchBusImplementation project(':foudations:mogo-aicloud-services-sdk')
}
}

View File

@@ -1,9 +0,0 @@
// 返回桌面悬浮按钮
project.dependencies {
if (Boolean.valueOf(RELEASE)) {
launcherImplementation rootProject.ext.dependencies.mogomoduleback
} else {
launcherImplementation project(':modules:mogo-module-back')
}
}

View File

@@ -6,14 +6,12 @@ project.dependencies {
f80xImplementation rootProject.ext.dependencies.mapcustom
fochtaxiImplementation rootProject.ext.dependencies.mapcustom
fochbusImplementation rootProject.ext.dependencies.mapcustom
phoneImplementation rootProject.ext.dependencies.mapcustom
fPadLenovoImplementation rootProject.ext.dependencies.mapcustom
fPadLenovoOchTaxiImplementation rootProject.ext.dependencies.mapcustom
fPadLenovoOchBusImplementation rootProject.ext.dependencies.mapcustom
f8AmapImplementation rootProject.ext.dependencies.mapamap
bydautoImplementation rootProject.ext.dependencies.mapamap
//f8AmapImplementation rootProject.ext.dependencies.mapamap
} else {
f8xxImplementation project(':libraries:map-custom')
@@ -25,10 +23,6 @@ project.dependencies {
fPadLenovoOchTaxiImplementation project(':libraries:map-custom')
fPadLenovoOchBusImplementation project(':libraries:map-custom')
phoneImplementation project(':libraries:map-custom')
f8AmapImplementation project(':libraries:map-amap')
bydautoImplementation project(':libraries:map-amap')
//f8AmapImplementation project(':libraries:map-amap')
}
}

View File

@@ -1,31 +0,0 @@
// 基础服务仅比亚迪渠道用sdk方式实现其他都基于apk基础服务
project.dependencies {
if (Boolean.valueOf(RELEASE)) {
bydautoImplementation rootProject.ext.dependencies.mogobaseservicesdk
phoneImplementation rootProject.ext.dependencies.mogobaseservicesdk
f8xxImplementation rootProject.ext.dependencies.mogobaseserviceapk
f80xImplementation rootProject.ext.dependencies.mogobaseserviceapk
f8AmapImplementation rootProject.ext.dependencies.mogobaseserviceapk
fochtaxiImplementation rootProject.ext.dependencies.mogobaseserviceapk
fochbusImplementation rootProject.ext.dependencies.mogobaseserviceapk
fPadLenovoImplementation rootProject.ext.dependencies.mogobaseserviceapk
fPadLenovoOchTaxiImplementation rootProject.ext.dependencies.mogobaseserviceapk
fPadLenovoOchBusImplementation rootProject.ext.dependencies.mogobaseserviceapk
} else {
bydautoImplementation project(':foudations:mogo-base-services-sdk')
phoneImplementation project(':foudations:mogo-base-services-sdk')
f8xxImplementation project(':foudations:mogo-base-services-apk')
f80xImplementation project(':foudations:mogo-base-services-apk')
f8AmapImplementation project(':foudations:mogo-base-services-apk')
fochtaxiImplementation project(':foudations:mogo-base-services-apk')
fochbusImplementation project(':foudations:mogo-base-services-apk')
fPadLenovoImplementation project(':foudations:mogo-base-services-apk')
fPadLenovoOchTaxiImplementation project(':foudations:mogo-base-services-apk')
fPadLenovoOchBusImplementation project(':foudations:mogo-base-services-apk')
}
}

View File

@@ -1,31 +0,0 @@
// 引导模块:部分机型暂不需要引导模块
project.dependencies {
if (Boolean.valueOf(RELEASE)) {
bydautoImplementation rootProject.ext.dependencies.mogomoduleguide
phoneImplementation rootProject.ext.dependencies.mogomoduleguide
f8xxImplementation rootProject.ext.dependencies.mogomoduleguide
f80xImplementation rootProject.ext.dependencies.mogomoduleguide
f8AmapImplementation rootProject.ext.dependencies.mogomoduleguide
fochtaxiImplementation rootProject.ext.dependencies.mogomoduleguide
fochbusImplementation rootProject.ext.dependencies.mogomoduleguide
fPadLenovoImplementation rootProject.ext.dependencies.mogomoduleguide
fPadLenovoOchTaxiImplementation rootProject.ext.dependencies.mogomoduleguide
fPadLenovoOchBusImplementation rootProject.ext.dependencies.mogomoduleguide
} else {
bydautoImplementation project(':modules:mogo-module-guide')
phoneImplementation project(':modules:mogo-module-guide')
f8xxImplementation project(':modules:mogo-module-guide')
f80xImplementation project(':modules:mogo-module-guide')
f8AmapImplementation project(':modules:mogo-module-guide')
fochtaxiImplementation project(':modules:mogo-module-guide')
fochbusImplementation project(':modules:mogo-module-guide')
fPadLenovoImplementation project(':modules:mogo-module-guide')
fPadLenovoOchTaxiImplementation project(':modules:mogo-module-guide')
fPadLenovoOchBusImplementation project(':modules:mogo-module-guide')
}
}

View File

@@ -1,15 +0,0 @@
// bugly 上报目前仅在debug编译下加载bugly
project.dependencies {
if (Boolean.valueOf(RELEASE)) {
implementation rootProject.ext.dependencies.crashreport
implementation rootProject.ext.dependencies.crashreportupgrade
debugImplementation rootProject.ext.dependencies.crashreportbugly
releaseImplementation rootProject.ext.dependencies.crashreportbugly
} else {
implementation project(':test:crashreport')
implementation project(':test:crashreport-upgrade')
implementation project(':test:crashreport-bugly')
releaseImplementation project(':test:crashreport-bugly')
}
}

View File

@@ -1,13 +0,0 @@
// 基础服务仅比亚迪渠道用sdk方式实现其他都基于apk基础服务
project.dependencies {
if (Boolean.valueOf(RELEASE)) {
qaImplementation rootProject.ext.dependencies.httpdnsnoop
demoImplementation rootProject.ext.dependencies.httpdnsnoop
onlineImplementation rootProject.ext.dependencies.httpdnsmogo
} else {
qaImplementation project(':foudations:httpdns-mogo')
demoImplementation project(':foudations:httpdns-mogo')
onlineImplementation project(':foudations:httpdns-mogo')
}
}

View File

@@ -1,34 +0,0 @@
// 辅助驾驶占位模块,目前部分车机不上辅助驾驶功能,使用该模块能力代替
project.dependencies {
if (Boolean.valueOf(RELEASE)) {
bydautoImplementation rootProject.ext.dependencies.moduleleftpanel
phoneImplementation rootProject.ext.dependencies.moduleleftpanelnoop
f8xxImplementation rootProject.ext.dependencies.moduleleftpanelnoop
f80xImplementation rootProject.ext.dependencies.moduleleftpanelnoop
f8AmapImplementation rootProject.ext.dependencies.moduleleftpanelnoop
fochtaxiImplementation rootProject.ext.dependencies.moduleleftpanelnoop
fochbusImplementation rootProject.ext.dependencies.moduleleftpanelnoop
fPadLenovoImplementation rootProject.ext.dependencies.moduleleftpanelnoop
fPadLenovoOchTaxiImplementation rootProject.ext.dependencies.moduleleftpanelnoop
fPadLenovoOchBusImplementation rootProject.ext.dependencies.moduleleftpanelnoop
} else {
bydautoImplementation project(':modules:mogo-module-left-panel')
phoneImplementation project(':modules:mogo-module-left-panel-noop')
f8xxImplementation project(':modules:mogo-module-left-panel-noop')
f80xImplementation project(':modules:mogo-module-left-panel-noop')
f8AmapImplementation project(':modules:mogo-module-left-panel-noop')
fochtaxiImplementation project(':modules:mogo-module-left-panel-noop')
fochbusImplementation project(':modules:mogo-module-left-panel-noop')
fPadLenovoImplementation project(':modules:mogo-module-left-panel-noop')
fPadLenovoOchTaxiImplementation project(':modules:mogo-module-left-panel-noop')
fPadLenovoOchBusImplementation project(':modules:mogo-module-left-panel-noop')
}
}

View File

@@ -1,9 +0,0 @@
// 音乐播放模块
project.dependencies {
if (Boolean.valueOf(RELEASE)) {
launcherImplementation rootProject.ext.dependencies.modulemedia
} else {
launcherImplementation project(':modules:mogo-module-media')
}
}

View File

@@ -1,9 +1,6 @@
// 网约车服务:仅小巴车、出租车渠道用
project.dependencies {
if (Boolean.valueOf(RELEASE)) {
bydautoImplementation rootProject.ext.dependencies.mogoochnoop
phoneImplementation rootProject.ext.dependencies.mogoochnoop
f8xxImplementation rootProject.ext.dependencies.mogoochnoop
f80xImplementation rootProject.ext.dependencies.mogoochnoop
f8AmapImplementation rootProject.ext.dependencies.mogoochnoop
@@ -15,9 +12,6 @@ project.dependencies {
fPadLenovoOchTaxiImplementation rootProject.ext.dependencies.mogoochtaxi
fPadLenovoOchBusImplementation rootProject.ext.dependencies.mogoochbus
} else {
bydautoImplementation project(':OCH:mogo-och-noop')
phoneImplementation project(':OCH:mogo-och-noop')
f8xxImplementation project(':OCH:mogo-och-noop')
f80xImplementation project(':OCH:mogo-och-noop')
f8AmapImplementation project(':OCH:mogo-och-noop')

View File

@@ -1,17 +0,0 @@
// 表现:独立 app 和 launcher
project.dependencies {
if (Boolean.valueOf(RELEASE)) {
launcherImplementation rootProject.ext.dependencies.modulemainlauncher
independentImplementation rootProject.ext.dependencies.modulemainindependent
// 仅launcher需要引入该模块
launcherImplementation rootProject.ext.dependencies.moduleapps
} else {
launcherImplementation project(':main-extensions:mogo-module-main-launcher')
independentImplementation project(':main-extensions:mogo-module-main-independent')
// 仅launcher需要引入该模块
launcherImplementation project(':modules:mogo-module-apps')
}
}

View File

@@ -1,7 +1,5 @@
project.dependencies {
if (Boolean.valueOf(RELEASE)) {
bydautoImplementation rootProject.ext.dependencies.skinsupportnoop
phoneImplementation rootProject.ext.dependencies.skinsupportimpl
f8xxImplementation rootProject.ext.dependencies.skinsupportimpl
f80xImplementation rootProject.ext.dependencies.skinsupportimpl
@@ -14,9 +12,6 @@ project.dependencies {
fPadLenovoOchTaxiImplementation rootProject.ext.dependencies.skinsupportimpl
fPadLenovoOchBusImplementation rootProject.ext.dependencies.skinsupportimpl
phoneImplementation rootProject.ext.dependencies.skinsupportlight
f8xxImplementation rootProject.ext.dependencies.skinsupportlight
f80xImplementation rootProject.ext.dependencies.skinsupportlight
f8AmapImplementation rootProject.ext.dependencies.skinsupportlight
@@ -28,10 +23,6 @@ project.dependencies {
fPadLenovoOchTaxiImplementation rootProject.ext.dependencies.skinsupportlight
fPadLenovoOchBusImplementation rootProject.ext.dependencies.skinsupportlight
} else {
bydautoImplementation project(':skin:mogo-skin-support-noop')
phoneImplementation project(':skin:mogo-skin-support-impl')
f8xxImplementation project(':skin:mogo-skin-support-impl')
f80xImplementation project(':skin:mogo-skin-support-impl')
f8AmapImplementation project(':skin:mogo-skin-support-impl')
@@ -43,9 +34,6 @@ project.dependencies {
fPadLenovoOchTaxiImplementation project(':skin:mogo-skin-support-impl')
fPadLenovoOchBusImplementation project(':skin:mogo-skin-support-impl')
phoneImplementation project(':skin:mogo-skin-light')
f8xxImplementation project(':skin:mogo-skin-light')
f80xImplementation project(':skin:mogo-skin-light')
f8AmapImplementation project(':skin:mogo-skin-light')

View File

@@ -1,13 +0,0 @@
// 基于socket长链的push推送
project.dependencies {
if (Boolean.valueOf(RELEASE)) {
implementation rootProject.ext.dependencies.modulepushbase
launcherImplementation rootProject.ext.dependencies.modulepush
independentImplementation rootProject.ext.dependencies.modulepushnoop
} else {
implementation project(":modules:mogo-module-push-base")
launcherImplementation project(":modules:mogo-module-push")
independentImplementation project(":modules:mogo-module-push-noop")
}
}

View File

@@ -1,8 +1,5 @@
project.dependencies {
if (Boolean.valueOf(RELEASE)) {
bydautoImplementation rootProject.ext.dependencies.ttsdi
phoneImplementation rootProject.ext.dependencies.ttszhi
f8xxImplementation rootProject.ext.dependencies.ttszhi
f80xImplementation rootProject.ext.dependencies.ttszhi
f8AmapImplementation rootProject.ext.dependencies.ttszhi
@@ -14,9 +11,6 @@ project.dependencies {
fPadLenovoOchTaxiImplementation rootProject.ext.dependencies.ttspad
fPadLenovoOchBusImplementation rootProject.ext.dependencies.ttspad
} else {
bydautoImplementation project(':tts:tts-di')
phoneImplementation project(':tts:tts-zhi')
f8xxImplementation project(':tts:tts-zhi')
f80xImplementation project(':tts:tts-zhi')
f8AmapImplementation project(':tts:tts-zhi')

View File

@@ -1,9 +0,0 @@
// 悬浮控件:独立 app 和 launcher
project.dependencies {
if (Boolean.valueOf(RELEASE)) {
implementation rootProject.ext.dependencies.mogomodulewidgets
} else {
implementation project(':modules:mogo-module-widgets')
}
}

View File

@@ -0,0 +1,44 @@
project.android.productFlavors {
// f系列-分体机
f80x {
externalNativeBuild {
ndk {
// 设置支持的SO库架构
abiFilters "arm64-v8a"
}
}
minSdkVersion rootProject.ext.android.minSdkVersion
targetSdkVersion rootProject.ext.android.targetSdkVersion
// 应用包名
applicationId rootProject.ext.android.fLauncherApplicationId
dimension "product"
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'false'
// 车机类型主要用于区分自研车机还是别人家的车机自研车机类型为0
buildConfigField 'int', 'CAR_MACHINE_TYPE', '0'
buildConfigField 'boolean', 'ROAD_EVENT_ANIMATED', 'true'
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue, CHANNEL_VALUE: "f80x"]
// 是否使用高德sdk自定义导航
buildConfigField 'boolean', 'USE_CUSTOM_NAVI', 'false'
// 是否支持换肤
buildConfigField 'boolean', 'IS_SKIN_SUPPORTED', 'true'
// 是否支持查询导航目的地车友
buildConfigField 'boolean', 'IS_SUPPORTED_SEARCH_DESTINATION_ONLINE_CAR_LIST', 'true'
// 是否支持桌面卡片刷新
buildConfigField 'boolean', 'IS_SUPPORT_LAUNCHER_CARD_REFRESH_STRATEGY', 'false'
// 是否基于地图
buildConfigField 'boolean', 'IS_MAP_BASED', 'true'
// 是否加载引导模块
buildConfigField 'boolean', 'IS_NEED_LOAD_GUIDE_MODULE', 'true'
// 分享时是否隐藏 adas
buildConfigField 'boolean', 'IS_NEED_HIDE_ADAS_WHEN_SHARE', 'false'
// 是否需要实时上报坐标
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'
// 是否需要使用工控机的rtk定位
buildConfigField 'boolean', 'IS_USE_ADAS_RTK_LOCATION_INFO', 'true'
// 是否需要悬浮窗权限申请
buildConfigField 'boolean', 'IS_NEED_REQUEST_FLOAT_PERMISSION', 'true'
// GPS数据提供源 0-Android系统1-工控机2-OBU
buildConfigField 'int', 'GPS_PROVIDER', "1"
}
}

View File

@@ -0,0 +1,44 @@
project.android.productFlavors {
// f系列-分体机-高德
f8Amap {
externalNativeBuild {
ndk {
// 设置支持的SO库架构
abiFilters "armeabi-v7a"
}
}
minSdkVersion rootProject.ext.android.minSdkVersion
targetSdkVersion rootProject.ext.android.targetSdkVersion
// 应用包名
applicationId rootProject.ext.android.fLauncherApplicationId
dimension "product"
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'false'
// 车机类型主要用于区分自研车机还是别人家的车机自研车机类型为0
buildConfigField 'int', 'CAR_MACHINE_TYPE', '0'
buildConfigField 'boolean', 'ROAD_EVENT_ANIMATED', 'true'
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue, CHANNEL_VALUE: "f8Amap"]
// 是否使用高德sdk自定义导航
buildConfigField 'boolean', 'USE_CUSTOM_NAVI', 'false'
// 是否支持换肤
buildConfigField 'boolean', 'IS_SKIN_SUPPORTED', 'true'
// 是否支持查询导航目的地车友
buildConfigField 'boolean', 'IS_SUPPORTED_SEARCH_DESTINATION_ONLINE_CAR_LIST', 'true'
// 是否支持桌面卡片刷新
buildConfigField 'boolean', 'IS_SUPPORT_LAUNCHER_CARD_REFRESH_STRATEGY', 'false'
// 是否基于地图
buildConfigField 'boolean', 'IS_MAP_BASED', 'true'
// 是否加载引导模块
buildConfigField 'boolean', 'IS_NEED_LOAD_GUIDE_MODULE', 'true'
// 分享时是否隐藏 adas
buildConfigField 'boolean', 'IS_NEED_HIDE_ADAS_WHEN_SHARE', 'false'
// 是否需要实时上报坐标
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'
// 是否需要使用工控机的rtk定位
buildConfigField 'boolean', 'IS_USE_ADAS_RTK_LOCATION_INFO', 'false'
// 是否需要悬浮窗权限申请
buildConfigField 'boolean', 'IS_NEED_REQUEST_FLOAT_PERMISSION', 'true'
// GPS数据提供源 0-Android系统1-工控机2-OBU
buildConfigField 'int', 'GPS_PROVIDER', "1"
}
}

View File

@@ -0,0 +1,44 @@
project.android.productFlavors {
// f系列-分体机全系列,未细分
f8xx {
externalNativeBuild {
ndk {
// 设置支持的SO库架构
abiFilters "arm64-v8a"
}
}
minSdkVersion rootProject.ext.android.minSdkVersion
targetSdkVersion rootProject.ext.android.targetSdkVersion
// 应用包名
applicationId rootProject.ext.android.fLauncherApplicationId
dimension "product"
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'false'
// 车机类型主要用于区分自研车机还是别人家的车机自研车机类型为0
buildConfigField 'int', 'CAR_MACHINE_TYPE', '0'
buildConfigField 'boolean', 'ROAD_EVENT_ANIMATED', 'true'
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue, CHANNEL_VALUE: "f8xx"]
// 是否使用高德sdk自定义导航
buildConfigField 'boolean', 'USE_CUSTOM_NAVI', 'false'
// 是否支持换肤
buildConfigField 'boolean', 'IS_SKIN_SUPPORTED', 'true'
// 是否支持查询导航目的地车友
buildConfigField 'boolean', 'IS_SUPPORTED_SEARCH_DESTINATION_ONLINE_CAR_LIST', 'true'
// 是否支持桌面卡片刷新
buildConfigField 'boolean', 'IS_SUPPORT_LAUNCHER_CARD_REFRESH_STRATEGY', 'false'
// 是否基于地图
buildConfigField 'boolean', 'IS_MAP_BASED', 'true'
// 是否加载引导模块
buildConfigField 'boolean', 'IS_NEED_LOAD_GUIDE_MODULE', 'true'
// 分享时是否隐藏 adas
buildConfigField 'boolean', 'IS_NEED_HIDE_ADAS_WHEN_SHARE', 'false'
// 是否需要实时上报坐标
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'
// 是否需要使用工控机的rtk定位
buildConfigField 'boolean', 'IS_USE_ADAS_RTK_LOCATION_INFO', 'true'
// 是否需要悬浮窗权限申请
buildConfigField 'boolean', 'IS_NEED_REQUEST_FLOAT_PERMISSION', 'true'
// GPS数据提供源 0-Android系统1-工控机2-OBU
buildConfigField 'int', 'GPS_PROVIDER', "1"
}
}

View File

@@ -0,0 +1,43 @@
project.android.productFlavors {
// 衡阳-联想Pad
fPadLenovo {
externalNativeBuild {
ndk {
// 设置支持的SO库架构
abiFilters "arm64-v8a"
}
}
minSdkVersion rootProject.ext.android.minSdkVersionPadLenovo
targetSdkVersion rootProject.ext.android.targetSdkVersionPadLenovo
// 应用包名
applicationId rootProject.ext.android.fLauncherApplicationId
dimension "product"
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'false'
// 车机类型主要用于区分自研车机还是别人家的车机自研车机类型为0
buildConfigField 'int', 'CAR_MACHINE_TYPE', '2'
buildConfigField 'boolean', 'ROAD_EVENT_ANIMATED', 'true'
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue, CHANNEL_VALUE: "fPadLenovo"]
// 是否使用高德sdk自定义导航
buildConfigField 'boolean', 'USE_CUSTOM_NAVI', 'false'
// 是否支持换肤
buildConfigField 'boolean', 'IS_SKIN_SUPPORTED', 'true'
// 是否支持查询导航目的地车友
buildConfigField 'boolean', 'IS_SUPPORTED_SEARCH_DESTINATION_ONLINE_CAR_LIST', 'true'
// 是否支持桌面卡片刷新
buildConfigField 'boolean', 'IS_SUPPORT_LAUNCHER_CARD_REFRESH_STRATEGY', 'false'
// 是否基于地图
buildConfigField 'boolean', 'IS_MAP_BASED', 'true'
// 是否加载引导模块
buildConfigField 'boolean', 'IS_NEED_LOAD_GUIDE_MODULE', 'false'
// 分享时是否隐藏 adas
buildConfigField 'boolean', 'IS_NEED_HIDE_ADAS_WHEN_SHARE', 'false'
// 是否需要实时上报坐标
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'
// 是否需要使用工控机的rtk定位
buildConfigField 'boolean', 'IS_USE_ADAS_RTK_LOCATION_INFO', 'true'
// 是否需要悬浮窗权限申请
buildConfigField 'boolean', 'IS_NEED_REQUEST_FLOAT_PERMISSION', 'true'
// GPS数据提供源 0-Android系统1-工控机2-OBU
buildConfigField 'int', 'GPS_PROVIDER', "2"
}
}

View File

@@ -0,0 +1,43 @@
project.android.productFlavors {
// 衡阳-联想Pad-网约车-小巴车
fPadLenovoOchBus {
externalNativeBuild {
ndk {
// 设置支持的SO库架构
abiFilters "arm64-v8a"
}
}
minSdkVersion rootProject.ext.android.minSdkVersionPadLenovo
targetSdkVersion rootProject.ext.android.targetSdkVersionPadLenovo
// 应用包名
applicationId rootProject.ext.android.fLauncherApplicationId
dimension "product"
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'false'
// 车机类型主要用于区分自研车机还是别人家的车机自研车机类型为0
buildConfigField 'int', 'CAR_MACHINE_TYPE', '2'
buildConfigField 'boolean', 'ROAD_EVENT_ANIMATED', 'true'
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue, CHANNEL_VALUE: "fPadLenovoOchBus"]
// 是否使用高德sdk自定义导航
buildConfigField 'boolean', 'USE_CUSTOM_NAVI', 'false'
// 是否支持换肤
buildConfigField 'boolean', 'IS_SKIN_SUPPORTED', 'true'
// 是否支持查询导航目的地车友
buildConfigField 'boolean', 'IS_SUPPORTED_SEARCH_DESTINATION_ONLINE_CAR_LIST', 'true'
// 是否支持桌面卡片刷新
buildConfigField 'boolean', 'IS_SUPPORT_LAUNCHER_CARD_REFRESH_STRATEGY', 'false'
// 是否基于地图
buildConfigField 'boolean', 'IS_MAP_BASED', 'true'
// 是否加载引导模块
buildConfigField 'boolean', 'IS_NEED_LOAD_GUIDE_MODULE', 'false'
// 分享时是否隐藏 adas
buildConfigField 'boolean', 'IS_NEED_HIDE_ADAS_WHEN_SHARE', 'false'
// 是否需要实时上报坐标
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'
// 是否需要使用工控机的rtk定位
buildConfigField 'boolean', 'IS_USE_ADAS_RTK_LOCATION_INFO', 'true'
// 是否需要悬浮窗权限申请
buildConfigField 'boolean', 'IS_NEED_REQUEST_FLOAT_PERMISSION', 'true'
// GPS数据提供源 0-Android系统1-工控机2-OBU
buildConfigField 'int', 'GPS_PROVIDER', "1"
}
}

View File

@@ -0,0 +1,47 @@
project.android.productFlavors {
// 衡阳-联想Pad-网约车-出租车
fPadLenovoOchTaxi {
externalNativeBuild {
ndk {
// 设置支持的SO库架构
abiFilters "arm64-v8a"
}
}
minSdkVersion rootProject.ext.android.minSdkVersionPadLenovo
targetSdkVersion rootProject.ext.android.targetSdkVersionPadLenovo
// 应用包名
applicationId rootProject.ext.android.fLauncherApplicationId
dimension "product"
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'false'
// 车机类型主要用于区分自研车机还是别人家的车机自研车机类型为0
buildConfigField 'int', 'CAR_MACHINE_TYPE', '2'
buildConfigField 'boolean', 'ROAD_EVENT_ANIMATED', 'true'
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue, CHANNEL_VALUE: "fPadLenovoOchTaxi"]
// 是否使用高德sdk自定义导航
buildConfigField 'boolean', 'USE_CUSTOM_NAVI', 'false'
// 是否支持换肤
buildConfigField 'boolean', 'IS_SKIN_SUPPORTED', 'true'
// 是否支持查询导航目的地车友
buildConfigField 'boolean', 'IS_SUPPORTED_SEARCH_DESTINATION_ONLINE_CAR_LIST', 'true'
// 是否支持桌面卡片刷新
buildConfigField 'boolean', 'IS_SUPPORT_LAUNCHER_CARD_REFRESH_STRATEGY', 'false'
// 是否基于地图
buildConfigField 'boolean', 'IS_MAP_BASED', 'true'
// 是否加载引导模块
buildConfigField 'boolean', 'IS_NEED_LOAD_GUIDE_MODULE', 'false'
// 分享时是否隐藏 adas
buildConfigField 'boolean', 'IS_NEED_HIDE_ADAS_WHEN_SHARE', 'false'
// 是否需要实时上报坐标
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'
// 是否需要使用工控机的rtk定位
buildConfigField 'boolean', 'IS_USE_ADAS_RTK_LOCATION_INFO', 'true'
// 是否需要悬浮窗权限申请
buildConfigField 'boolean', 'IS_NEED_REQUEST_FLOAT_PERMISSION', 'true'
// 是否需要悬浮窗权限申请
buildConfigField 'boolean', 'IS_NEED_REQUEST_FLOAT_PERMISSION', 'true'
// GPS数据提供源 0-Android系统1-工控机2-OBU
buildConfigField 'int', 'GPS_PROVIDER', "1"
}
}

View File

@@ -0,0 +1,44 @@
project.android.productFlavors {
// f系列-网约车-小巴车
fochbus {
externalNativeBuild {
ndk {
// 设置支持的SO库架构
abiFilters "arm64-v8a"
}
}
minSdkVersion rootProject.ext.android.minSdkVersion
targetSdkVersion rootProject.ext.android.targetSdkVersion
// 应用包名
applicationId rootProject.ext.android.fLauncherApplicationId
dimension "product"
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'false'
// 车机类型主要用于区分自研车机还是别人家的车机自研车机类型为0
buildConfigField 'int', 'CAR_MACHINE_TYPE', '0'
buildConfigField 'boolean', 'ROAD_EVENT_ANIMATED', 'true'
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue, CHANNEL_VALUE: "fochbus"]
// 是否使用高德sdk自定义导航
buildConfigField 'boolean', 'USE_CUSTOM_NAVI', 'false'
// 是否支持换肤
buildConfigField 'boolean', 'IS_SKIN_SUPPORTED', 'true'
// 是否支持查询导航目的地车友
buildConfigField 'boolean', 'IS_SUPPORTED_SEARCH_DESTINATION_ONLINE_CAR_LIST', 'true'
// 是否支持桌面卡片刷新
buildConfigField 'boolean', 'IS_SUPPORT_LAUNCHER_CARD_REFRESH_STRATEGY', 'false'
// 是否基于地图
buildConfigField 'boolean', 'IS_MAP_BASED', 'true'
// 是否加载引导模块
buildConfigField 'boolean', 'IS_NEED_LOAD_GUIDE_MODULE', 'false'
// 分享时是否隐藏 adas
buildConfigField 'boolean', 'IS_NEED_HIDE_ADAS_WHEN_SHARE', 'false'
// 是否需要实时上报坐标
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'
// 是否需要使用工控机的rtk定位
buildConfigField 'boolean', 'IS_USE_ADAS_RTK_LOCATION_INFO', 'true'
// 是否需要悬浮窗权限申请
buildConfigField 'boolean', 'IS_NEED_REQUEST_FLOAT_PERMISSION', 'true'
// GPS数据提供源 0-Android系统1-工控机2-OBU
buildConfigField 'int', 'GPS_PROVIDER', "1"
}
}

View File

@@ -0,0 +1,44 @@
project.android.productFlavors {
// f系列-网约车-出租车
fochtaxi {
externalNativeBuild {
ndk {
// 设置支持的SO库架构
abiFilters "arm64-v8a"
}
}
minSdkVersion rootProject.ext.android.minSdkVersion
targetSdkVersion rootProject.ext.android.targetSdkVersion
// 应用包名
applicationId rootProject.ext.android.fLauncherApplicationId
dimension "product"
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'false'
// 车机类型主要用于区分自研车机还是别人家的车机自研车机类型为0
buildConfigField 'int', 'CAR_MACHINE_TYPE', '0'
buildConfigField 'boolean', 'ROAD_EVENT_ANIMATED', 'true'
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue, CHANNEL_VALUE: "fochtaxi"]
// 是否使用高德sdk自定义导航
buildConfigField 'boolean', 'USE_CUSTOM_NAVI', 'false'
// 是否支持换肤
buildConfigField 'boolean', 'IS_SKIN_SUPPORTED', 'true'
// 是否支持查询导航目的地车友
buildConfigField 'boolean', 'IS_SUPPORTED_SEARCH_DESTINATION_ONLINE_CAR_LIST', 'true'
// 是否支持桌面卡片刷新
buildConfigField 'boolean', 'IS_SUPPORT_LAUNCHER_CARD_REFRESH_STRATEGY', 'false'
// 是否基于地图
buildConfigField 'boolean', 'IS_MAP_BASED', 'true'
// 是否加载引导模块
buildConfigField 'boolean', 'IS_NEED_LOAD_GUIDE_MODULE', 'false'
// 分享时是否隐藏 adas
buildConfigField 'boolean', 'IS_NEED_HIDE_ADAS_WHEN_SHARE', 'false'
// 是否需要实时上报坐标
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'
// 是否需要使用工控机的rtk定位
buildConfigField 'boolean', 'IS_USE_ADAS_RTK_LOCATION_INFO', 'true'
// 是否需要悬浮窗权限申请
buildConfigField 'boolean', 'IS_NEED_REQUEST_FLOAT_PERMISSION', 'true'
// GPS数据提供源 0-Android系统1-工控机2-OBU
buildConfigField 'int', 'GPS_PROVIDER', "1"
}
}

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.mogo.launcher">
</manifest>

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:sharedUserId="android.uid.system"
package="com.mogo.launcher">
</manifest>

View File

@@ -1,23 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.mogo.launcher">
<application
android:name=".MogoApplication"
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_shell_name"
android:supportsRtl="true"
android:theme="@style/AppTheme.App"
tools:replace="android:label">
<!-- 高德地图 -->
<!-- <meta-data-->
<!-- tools:replace="android:value"-->
<!-- android:name="com.amap.api.v2.apikey"-->
<!-- android:value="1c3fbc5f5e183619ffb1e7bc01e6751f" />-->
</application>
<uses-permission android:name="android.permission.WAKE_LOCK" />
</manifest>

View File

@@ -1,28 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.mogo.launcher">
<uses-permission android:name="android.permission.WAKE_LOCK" />
<application
android:name=".MogoApplication"
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_shell_name"
android:supportsRtl="true"
android:theme="@style/AppTheme.App"
tools:replace="android:label">
<!-- <provider-->
<!-- android:name="com.mogo.module.navi.cp.AddressContentProvider"-->
<!-- android:authorities="com.zhidao.auto.personal.provider"-->
<!-- android:enabled="true"-->
<!-- android:exported="true" />-->
<!-- <meta-data-->
<!-- android:name="com.amap.api.v2.apikey"-->
<!-- android:value="a36b9f7b086fa3951bb35338a5a06dd3"-->
<!-- tools:replace="android:value" />-->
<!-- 高德地图 -->
</application>
</manifest>

View File

@@ -49,13 +49,6 @@
android:screenOrientation="landscape"
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
<receiver android:name=".SocketTestBroadCastReceiver">
<intent-filter>
<action android:name="com.socket.test_panel_control" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</receiver>
</application>

View File

@@ -10,11 +10,11 @@ import com.auto.zhidao.logsdk.CrashSystem;
import com.bytedance.boost_multidex.BoostMultiDex;
import com.mogo.cloud.httpdns.MogoHttpDnsConfig;
import com.mogo.cloud.httpdns.bean.HttpDnsSimpleLocation;
import com.mogo.cloud.httpdns.listener.IHttpDnsCurrentLocation;
import com.mogo.cloud.passport.IMoGoTokenCallback;
import com.mogo.cloud.passport.MoGoAiCloudClient;
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
import com.mogo.commons.AbsMogoApplication;
import com.mogo.commons.FunctionBuildConfig;
import com.mogo.commons.constants.SharedPrefsConstants;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.commons.network.Utils;
@@ -36,7 +36,6 @@ import com.mogo.service.MogoServicePaths;
import com.mogo.test.crashreport.ITestCrashReportProvider;
import com.mogo.test.crashreport.upgrade.UpgradeReportProvider;
import com.mogo.utils.ProcessUtils;
import com.mogo.utils.httpdns.HttpSimpleLocation;
import com.mogo.utils.logger.LogLevel;
import com.mogo.utils.logger.Logger;
import com.mogo.utils.storage.SharedPrefsMgr;
@@ -70,7 +69,7 @@ public class MogoApplication extends AbsMogoApplication {
CrashSystem crashSystem = CrashSystem.getInstance(this);
crashSystem.init();
//设置debug模式日志不上传
// crashSystem.setDebug(BuildConfig.DEBUG);
// crashSystem.setDebug(BuildConfig.DEBUG);
Logger.init(BuildConfig.DEBUG ? LogLevel.DEBUG : LogLevel.OFF);
initTipToast();
initModules();
@@ -107,7 +106,10 @@ public class MogoApplication extends AbsMogoApplication {
DebugConfig.setNeedHideAdasWhenShare(BuildConfig.IS_NEED_HIDE_ADAS_WHEN_SHARE);
DebugConfig.setNeedUploadCoordinatesInTime(BuildConfig.IS_NEED_UPLOAD_COORDINATES_IN_TIME);
DebugConfig.setUseAdasRtkLocationInfo(BuildConfig.IS_USE_ADAS_RTK_LOCATION_INFO);
DebugConfig.setNeedRequestFloatPermission(BuildConfig.IS_NEED_REQUEST_FLOAT_PERMISSION);
DebugConfig.setObuType(SharedPrefsMgr.getInstance(this).getInt("OBU_TYPE", DebugConfig.OBU_TYPE_CIDI));
FunctionBuildConfig.gpsProvider = BuildConfig.GPS_PROVIDER;
}
@Override
@@ -179,49 +181,40 @@ public class MogoApplication extends AbsMogoApplication {
// 设置循环检测间隔时间
clientConfig.setLoopCheckDelay(5 * 1000);
// 设置DNS经纬度位置
// clientConfig.setIHttpDnsCurrentLocation(() -> {
// SocketTestBroadCastReceiver.SocketTestData socketTestData = SocketTestBroadCastReceiver.SocketTestData.getInstance();
// Log.d("TEST-SOCKET","socketTestData cityCode: " + socketTestData.getCityCode());
// return new HttpDnsSimpleLocation(socketTestData.getCityCode(),socketTestData.getLat(),socketTestData.getLon()); //todo 对象唯一实例优化
// });
clientConfig.setIHttpDnsCurrentLocation(new IHttpDnsCurrentLocation() {
@Override
public HttpDnsSimpleLocation getCurrentLocation() {
MogoLocation mogoLocation =
MogoApisHandler.getInstance()
.getApis().getMapServiceApi()
.getSingletonLocationClient(getApp())
.getLastKnowLocation();
HttpDnsSimpleLocation httpDnsSimpleLocation;
if (mogoLocation != null
&& mogoLocation.getLatitude() != 0
&& mogoLocation.getLongitude() != 0) {
clientConfig.setIHttpDnsCurrentLocation(() -> {
MogoLocation mogoLocation =
MogoApisHandler.getInstance()
.getApis().getMapServiceApi()
.getSingletonLocationClient(getApp())
.getLastKnowLocation();
HttpDnsSimpleLocation httpDnsSimpleLocation;
if (mogoLocation != null
&& mogoLocation.getLatitude() != 0
&& mogoLocation.getLongitude() != 0) {
httpDnsSimpleLocation = new HttpDnsSimpleLocation(
mogoLocation.getCityCode(),
mogoLocation.getLatitude(),
mogoLocation.getLongitude());
Logger.i(TAG, "使用实时GPS信息" + httpDnsSimpleLocation);
} else {
String ciyCode = SharedPrefsMgr.getInstance(getApp())
.getString(SharedPrefsConstants.LOCATION_CITY_CODE);
String latitude = SharedPrefsMgr.getInstance(getApp())
.getString(SharedPrefsConstants.LOCATION_LATITUDE);
String longitude = SharedPrefsMgr.getInstance(getApp())
.getString(SharedPrefsConstants.LOCATION_LONGITUDE);
try {
httpDnsSimpleLocation = new HttpDnsSimpleLocation(
mogoLocation.getCityCode(),
mogoLocation.getLatitude(),
mogoLocation.getLongitude());
Logger.i(TAG, "使用实时GPS信息" + httpDnsSimpleLocation);
} else {
String ciyCode = SharedPrefsMgr.getInstance(getApp())
.getString(SharedPrefsConstants.LOCATION_CITY_CODE);
String latitude = SharedPrefsMgr.getInstance(getApp())
.getString(SharedPrefsConstants.LOCATION_LATITUDE);
String longitude = SharedPrefsMgr.getInstance(getApp())
.getString(SharedPrefsConstants.LOCATION_LONGITUDE);
try {
httpDnsSimpleLocation = new HttpDnsSimpleLocation(
ciyCode,
Double.parseDouble(latitude),
Double.parseDouble(longitude));
} catch (NumberFormatException e) {
e.printStackTrace();
httpDnsSimpleLocation = new HttpDnsSimpleLocation("010", 1, 1);
}
Logger.i(TAG, "使用缓存GPS信息" + httpDnsSimpleLocation);
ciyCode,
Double.parseDouble(latitude),
Double.parseDouble(longitude));
} catch (NumberFormatException e) {
e.printStackTrace();
httpDnsSimpleLocation = new HttpDnsSimpleLocation("010", 1, 1);
}
return httpDnsSimpleLocation;
Logger.i(TAG, "使用缓存GPS信息" + httpDnsSimpleLocation);
}
return httpDnsSimpleLocation;
});
// 初始化SDK可以设置状态回调来监听
@@ -246,7 +239,7 @@ public class MogoApplication extends AbsMogoApplication {
);
}
private void uploadLocPerFiveSecond(){
private void uploadLocPerFiveSecond() {
if (DebugConfig.getCarMachineType() != DebugConfig.CAR_MACHINE_TYPE_SELF_INNOVATE) {
IMogoServiceApis apis = MogoApisHandler.getInstance().getApis();
apis.getLocationInfoApi().start();
@@ -256,7 +249,7 @@ public class MogoApplication extends AbsMogoApplication {
}
}
private void prepareSocketAndLocationServices() {
private void startSocketService() {
IMogoServiceApis apis = MogoApisHandler.getInstance().getApis();
// 关闭长链服务
apis.getSocketManagerApi(getApplicationContext()).destroy();
@@ -267,19 +260,15 @@ public class MogoApplication extends AbsMogoApplication {
@Override
protected void socketTTL() {
// 鉴权成功后开启socket长链服务
prepareSocketAndLocationServices();
startSocketService();
}
private void initModules() {
Logger.d(TAG, "initModules");
if (DebugConfig.isNeedLoadGuideModule()) {
MogoModulePaths.addModule(new MogoModule(MogoModulePaths.PATH_GUIDE, MogoModulePaths.PATH_GUIDE));
}
MogoModulePaths.addModule(new MogoModule(MogoServicePaths.PATH_AGREEMENT, AuthorizeConstant.PATH_AGREEMENT_MODULE_NAME));
if (DebugConfig.isLauncher()) {
MogoModulePaths.addModule(new MogoModule(MogoServicePaths.PATH_BACK, MogoServicePaths.PATH_BACK));
MogoModulePaths.addModule(new MogoModule(MogoModulePaths.PATH_MEDIA, MogoModulePaths.PATH_MEDIA));
}
MogoModulePaths.addModule(new MogoModule(ServiceConst.PATH_TTS_CONFIG, ServiceConst.PATH_TTS_CONFIG));
@@ -303,13 +292,16 @@ public class MogoApplication extends AbsMogoApplication {
MogoModulePaths.addModule(new MogoModule(PushUIConstants.PATH, PushUIConstants.NAME));
// 碰撞报警模块
MogoModulePaths.addModule(new MogoModule(MogoServicePaths.PATH_CRASH_WARNING, "CrashWarning"));
// MogoModulePaths.addModule( new MogoModule( IMogoMachineVisionProvider.path, "IMogoMachineVisionProvider" ) );
// OBU 模块
MogoModulePaths.addModule(new MogoModule(MogoServicePaths.PATH_V2X_OBU_MOGO, "IMoGoObuProvider"));
// widgets 模块
MogoModulePaths.addModule(new MogoModule(MogoServicePaths.PATH_V2X_WARNING, "IMoGoWaringProvider"));
// 小地图模块
MogoModulePaths.addModule(new MogoModule(MogoServicePaths.PATH_SMALL_MAP, "IMogoSmallMapProvider"));
// ADAS模块
MogoModulePaths.addModule(new MogoModule(MogoServicePaths.PATH_ADAS, "AdasProvider"));
//前方碰撞预警
// 前方碰撞预警
MogoModulePaths.addModule(new MogoModule(MogoServicePaths.PATH_V2X_FRONT_CRASH_WARNING, "IV2XManagerProvider"));
MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_GLOBAL_UNWAKE, "GlobalUnwake"));
@@ -326,9 +318,7 @@ public class MogoApplication extends AbsMogoApplication {
// 初始化 bugly 升级
ARouter.getInstance().navigation(UpgradeReportProvider.class);
// debug 下初始化 bugly 上报
// if (DebugConfig.isDebug()) {
// }
// 初始化 bugly 日志采集
ARouter.getInstance().navigation(ITestCrashReportProvider.class);
Log.i("timer", "cost " + (System.currentTimeMillis() - start) + "ms");
}

View File

@@ -1,99 +0,0 @@
package com.mogo.launcher;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import com.mogo.utils.logger.Logger;
public class SocketTestBroadCastReceiver extends BroadcastReceiver {
private static final String TAG = "SocketTestBroadCastReceiver";
/**
* Adas测试控制面板广播Action
*/
public static final String BROADCAST_TEST_PANEL_CONTROL_TYPE_EXTRA_KEY = "sceneType";
private Context mContext;
@Override
public void onReceive(Context context, Intent intent) {
try {
this.mContext = context;
int sceneType = intent.getIntExtra(BROADCAST_TEST_PANEL_CONTROL_TYPE_EXTRA_KEY, 0);
Logger.d(TAG, "textPanelOpenType:" + sceneType);
// 分发场景
dispatchSceneTest(sceneType);
} catch (Exception e) {
e.printStackTrace();
}
}
private void dispatchSceneTest(int sceneType) {
if (sceneType == 0) {
// 更改地址为衡阳
SocketTestData socketTestData = SocketTestData.getInstance();
socketTestData.setCityCode("0734");
socketTestData.setLat(26.81624);
socketTestData.setLon(112.580089);
}
if (sceneType == 1) {
// 更改地址为北京
SocketTestData socketTestData = SocketTestData.getInstance();
socketTestData.setCityCode("010");
socketTestData.setLat(40.1993457314);
socketTestData.setLon(116.7355931215);
}
}
public static class SocketTestData {
private SocketTestData(){}
private static final byte[] bytes = new byte[0];
private volatile static SocketTestData instance;
public static SocketTestData getInstance(){
if(instance == null){
synchronized (bytes){
if(instance == null){
instance = new SocketTestData();
}
}
}
return instance;
}
private String cityCode = "010";
private Double lat = 0.0;
private Double lon = 0.0;
public String getCityCode() {
return cityCode;
}
public void setCityCode(String cityCode) {
this.cityCode = cityCode;
}
public Double getLat() {
return lat;
}
public void setLat(Double lat) {
this.lat = lat;
}
public Double getLon() {
return lon;
}
public void setLon(Double lon) {
this.lon = lon;
}
}
}

View File

@@ -1,3 +1,3 @@
<resources>
<string name="app_shell_name">蘑菇知途</string>
<string name="app_shell_name">蘑菇车联</string>
</resources>

View File

@@ -1,3 +1,3 @@
<resources>
<string name="app_shell_name">蘑菇出行</string>
<string name="app_shell_name">蘑菇车联</string>
</resources>

View File

@@ -14,8 +14,8 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.2'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.0'
classpath 'com.android.tools.build:gradle:3.5.3'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.20'
classpath "com.alibaba:arouter-register:1.0.2"
classpath 'com.hujiang.aspectjx:gradle-android-plugin-aspectjx:2.0.4'
// classpath ("com.tencent.matrix:matrix-gradle-plugin:0.6.6") { changing = true }
@@ -35,12 +35,6 @@ allprojects {
maven { url 'http://nexus.zhidaoauto.com/repository/maven-releases/' }
maven { url 'http://nexus.zhidaoauto.com/repository/maven-public/' }
google()
// flatDir {
// 由于Library module中引用了 youkuplayer 库的 aar在多 module 的情况下,
// 其他的module编译会报错所以需要在所有工程的repositories
// 下把Library module中的libs目录添加到依赖关系中
// dirs project(':libraries:map-baidu').file('libs')
// }
}
}
@@ -52,7 +46,7 @@ task clean(type: Delete) {
task cleanAll(type: Delete) {
group = "custom"
rootProject.allprojects {
println "delete ${it.buildDir}"
//println "delete ${it.buildDir}"
delete it.buildDir
}
}

View File

@@ -1,6 +1,6 @@
ext {
time = ""
kotlin_version = "1.4.10"
kotlin_version = "1.4.31"
android = [
launcherApplicationId : "com.mogo.launcher",
independentApplicationId : "com.mogo.launcher.app",
@@ -19,9 +19,9 @@ ext {
]
dependencies = [
// androidx
androidxappcompat : "androidx.appcompat:appcompat:1.1.0",
androidxccorektx : "androidx.core:core-ktx:1.3.0",
androidxconstraintlayout : "androidx.constraintlayout:constraintlayout:1.1.3",
androidxappcompat : "androidx.appcompat:appcompat:1.3.1",
androidxccorektx : "androidx.core:core-ktx:1.5.0",
androidxconstraintlayout : "androidx.constraintlayout:constraintlayout:2.1.0",
boostmultidex : "com.bytedance.boost_multidex:boost_multidex:1.0.1",
androidxviewpager2 : "androidx.viewpager2:viewpager2:1.0.0",
androidxrecyclerview : "androidx.recyclerview:recyclerview:1.1.0",
@@ -31,8 +31,8 @@ ext {
flexbox : 'com.google.android:flexbox:2.0.1',
// 测试
junit : "junit:junit:4.12",
androidxjunit : "androidx.test.ext:junit:1.1.0",
androidxespressocore : "androidx.test.espresso:espresso-core:3.1.1",
androidxjunit : "androidx.test.ext:junit:1.1.2",
androidxespressocore : "androidx.test.espresso:espresso-core:3.3.0",
// 地图
amapnavi3dmap : "com.amap.api:navi-3dmap:7.2.0_3dmap7.2.0",
amapsearch : "com.amap.api:search:7.1.0",
@@ -45,16 +45,16 @@ ext {
testleakcanary : "com.squareup.leakcanary:leakcanary-android-no-op:1.6.1",
//rxJava
rxjava : "io.reactivex.rxjava2:rxjava:2.2.2",
rxandroid : "io.reactivex.rxjava2:rxandroid:2.1.0",
rxandroid : "io.reactivex.rxjava2:rxandroid:2.1.1",
// arouter
arouter : "com.alibaba:arouter-api:1.5.0",
aroutercompiler : "com.alibaba:arouter-compiler:1.2.2",
arouter : "com.alibaba:arouter-api:1.5.2",
aroutercompiler : "com.alibaba:arouter-compiler:1.5.2",
// glide
glide : 'com.github.bumptech.glide:glide:4.8.0',
glideokhttp3 : 'com.github.bumptech.glide:okhttp3-integration:4.8.0',
glideanno : 'com.github.bumptech.glide:annotations:4.8.0',
glidecompiler : 'com.github.bumptech.glide:compiler:4.8.0',
supportannos : "com.android.support:support-annotations:28.0.0",
androidxannotation : "androidx.annotation:annotation:1.2.0",
okhttpinterceptor : "com.squareup.okhttp3:logging-interceptor:3.12.0",
// fresco
fresco : 'com.facebook.fresco:fresco:1.9.0',
@@ -75,15 +75,9 @@ ext {
leakcanary : 'com.squareup.leakcanary:leakcanary-android:1.5.4',
leakcanarynoop : 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4',
// add for room
room : "android.arch.persistence.room:runtime:1.1.1",
roomAnnotationProcessor : 'android.arch.persistence.room:compiler:1.1.1',
// rxjava2 with room
roomRxjava : "android.arch.persistence.room:rxjava2:1.1.1",
// material
material : 'com.google.android.material:material:1.1.0',
material : 'com.google.android.material:material:1.4.0',
indicator : 'com.github.zhpanvip:viewpagerindicator:1.0.4',
@@ -116,8 +110,9 @@ ext {
guideshow : "com.mogo.module:module-guide:${MOGO_MODULE_GUIDESHOW_VERSION}",
// V2X
moduleV2x : "com.mogo.module:module-v2x:${MOGO_MODULE_V2X_VERSION}",
moduleSmallMap : "com.mogo.module:module-small-map:${MOGO_MODULES_SMALL_MAP}",
moduleADAS : "com.mogo.module:mogo-module-adas:${MOGO_MODULES_ADAS}",
moduleSmallMap : "com.mogo.module:module-small-map:${MOGO_MODULE_SMP_VERSION}",
moduleADAS : "com.mogo.module:mogo-module-adas:${MOGO_MODULE_ADAS_VERSION}",
moduleHmi : "com.mogo.module:module-hmi:${MOGO_MODULE_HMI_VERSION}",
modulemedia : "com.mogo.module:module-media:${MOGO_MODULE_MEDIA_VERSION}",
modulesearch : "com.mogo.module:module-search:${MOGO_MODULE_SEARCH_VERSION}",
// push
@@ -128,18 +123,14 @@ ext {
mogomoduleback : "com.mogo.module:module-back:${MOGO_MODULE_BACK_VERSION}",
mogomoduleauth : "com.mogo.module:module-authorize:${MOGO_MODULE_AUTHORIZE_VERSION}",
mogomoduleguide : "com.mogo.module:module-guide:${MOGO_MODULE_GUIDE_VERSION}",
// 长链
socketsdk : 'com.zhidao.socketsdk:socketsdk:2.1.4',
socketsdkconnsvrprotoco : 'com.zhidao.ptech:connsvr-protoco:0.1.23',
socketsdkprotobufjava : 'com.google.protobuf:protobuf-java:3.5.1',
// OBU
moduleobu : "com.mogo.module:module-obu:${MOGO_MODULE_OBU_VERSION}",
moduleobumogo : "com.mogo.module:module-obu:${MOGO_MODULE_OBU_MOGO_VERSION}",
crashwarning : "com.mogo.module:module-crash-warning:1.1.0",
//
jetbrainsannotationsjava5 : "org.jetbrains:annotations-java5:15.0",
// 统一登录
accountsdk : "com.zhidao.accountservice:account-sdk:1.0.18",
// crash
crashSdk : "com.zhidaoauto.crash.log:library:1.0.5",
kotlinstdlibjdk7 : "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${kotlin_version}",
@@ -172,7 +163,8 @@ ext {
// obu sdk
obusdk : "com.zhidao.enterprise.smartv2x:smartv2x:1.0.0.3",
// mebulaobu : 'com.zhidao.support.nebulaobu:nebulaobu:1.0.0.3',
mogoobu : 'com.zhidao.support.obu:mogoobu:1.0.0.7',
mogoobu : 'com.zhidao.support.obu:mogoobu:1.0.0.11',
mogoami : 'com.zhidao.support.obu.ami:mogoami:1.0.0.1',
// 左侧面板
moduleleftpanel : "com.mogo.module:module-left-panel:${MOGO_MODULE_LEFT_PANEL_VERSION}",
@@ -198,6 +190,8 @@ ext {
androidxroomruntime : "androidx.room:room-runtime:2.2.3",
androidxroomcompiler : "androidx.room:room-compiler:2.2.3",
androidxroomktx : "androidx.room:room-ktx:2.2.3",
// rxjava2 with room
roomRxjava : 'androidx.room:room-rxjava2:2.2.3',
//
mogomodulewidgets : "com.mogo.module:module-widgets:${MOGO_MODULE_WIDGETS_VERSION}",
@@ -227,20 +221,11 @@ ext {
ttspad : "com.mogo.tts:tts-pad:${TTS_ZHI_VERSION}",
ttsnoop : "com.mogo.tts:tts-noop:${TTS_NOOP_VERSION}",
// mogomodulemachinevision : "com.mogo.module:module-machine-vision:${MOGO_MODULES_MVISION_VERSION}",
httpdnsbase : "com.mogo.httpdns:httpdns-base:${HTTPDNS_BASE_VERSION}",
httpdnsnoop : "com.mogo.httpdns:httpdns-noop:${HTTPDNS_NOOP_VERSION}",
httpdnstencent : "com.mogo.httpdns:httpdns-tencent:${HTTPDNS_TENCENT_VERSION}",
httpdnsmogo : "com.mogo.httpdns:httpdns-mogo:${HTTPDNS_MOGO_VERSION}",
mogooch : "com.mogo.och:och:${MOGO_OCH_VERSION}",
mogoochbus : "com.mogo.och:och-bus:${MOGO_OCH_BUS_VERSION}",
mogoochtaxi : "com.mogo.och:och-taxi:${MOGO_OCH_TAXI_VERSION}",
mogoochnoop : "com.mogo.och:och-noop:${MOGO_OCH_NOOP_VERSION}",
mogoaicloudserviceapk : "com.mogo.aicloud.services:services-apk:${MOGO_AICLOUD_SERVICES_APK_VERSION}",
mogoaicloudservicesdk : "com.mogo.aicloud.services:services-sdk:${MOGO_AICLOUD_SERVICES_SDK_VERSION}",
mogoaicloudsocket : "com.mogo.cloud:socket:${MOGO_SOCKET_VERSION}",
@@ -251,6 +236,7 @@ ext {
mogoaicloudtanlu : "com.mogo.cloud:tanlu:${MOGO_TANLU_VERSION}",
mogoaicloudtrafficlive : "com.mogo.cloud:trafficlive:${MOGO_TRAFFICLIVE_VERSION}",
mogoaicloudlocation : "com.mogo.cloud:location:${MOGO_LOCATION_VERSION}",
]
}

View File

@@ -1 +0,0 @@
这个编写基础功能组件

View File

@@ -1,43 +0,0 @@
apply plugin: 'com.android.library'
android {
compileSdkVersion rootProject.ext.android.compileSdkVersion
// buildToolsVersion rootProject.ext.android.buildToolsVersion
defaultConfig {
minSdkVersion rootProject.ext.android.minSdkVersion
targetSdkVersion rootProject.ext.android.targetSdkVersion
versionCode Integer.valueOf(VERSION_CODE)
versionName getValueFromRootProperties("${project.name.replace("-", "_").toUpperCase()}_VERSION")
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
javaCompileOptions {
annotationProcessorOptions {
arguments = [AROUTER_MODULE_NAME: project.getName()]
}
}
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation rootProject.ext.dependencies.arouter
annotationProcessor rootProject.ext.dependencies.aroutercompiler
if (Boolean.valueOf(RELEASE)) {
api rootProject.ext.dependencies.mogoutils
} else {
api project(':foudations:mogo-utils')
}
}
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()

View File

@@ -1,3 +0,0 @@
GROUP=com.mogo.httpdns
POM_ARTIFACT_ID=httpdns-base
VERSION_CODE=1

View File

@@ -1,4 +0,0 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mogo.httpdns.base">
</manifest>

View File

@@ -1,15 +0,0 @@
package com.mogo.httpdns;
import android.location.Location;
import androidx.annotation.Keep;
import com.mogo.utils.httpdns.HttpSimpleLocation;
@Keep
public interface IHttpDnsLocationChanged {
/**
* 获取当前定位
* @return 当前定位
*/
HttpSimpleLocation getLocation();
}

View File

@@ -1,46 +0,0 @@
apply plugin: 'com.android.library'
android {
compileSdkVersion rootProject.ext.android.compileSdkVersion
// buildToolsVersion rootProject.ext.android.buildToolsVersion
defaultConfig {
minSdkVersion rootProject.ext.android.minSdkVersion
targetSdkVersion rootProject.ext.android.targetSdkVersion
versionCode Integer.valueOf(VERSION_CODE)
versionName getValueFromRootProperties("${project.name.replace("-", "_").toUpperCase()}_VERSION")
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
javaCompileOptions {
annotationProcessorOptions {
arguments = [AROUTER_MODULE_NAME: project.getName()]
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation rootProject.ext.dependencies.arouter
annotationProcessor rootProject.ext.dependencies.aroutercompiler
implementation 'com.mogo.httpdns:httpdns-helper:1.0.17'
if (Boolean.valueOf(RELEASE)) {
implementation rootProject.ext.dependencies.httpdnsbase
implementation rootProject.ext.dependencies.mogocommons
} else {
implementation project(':foudations:httpdns-base')
implementation project(':foudations:mogo-commons')
}
}
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()

View File

@@ -1,3 +0,0 @@
GROUP=com.mogo.httpdns
POM_ARTIFACT_ID=httpdns-mogo
VERSION_CODE=1

View File

@@ -1,26 +0,0 @@
package com.mogo.httpdns.mogo;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.mogo.httpdns.mogo.test", appContext.getPackageName());
}
}

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mogo.httpdns.mogo">
</manifest>

View File

@@ -1,17 +0,0 @@
package com.mogo.httpdns.mogo;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}

View File

@@ -1 +0,0 @@
/build

View File

@@ -1,43 +0,0 @@
apply plugin: 'com.android.library'
android {
compileSdkVersion rootProject.ext.android.compileSdkVersion
// buildToolsVersion rootProject.ext.android.buildToolsVersion
defaultConfig {
minSdkVersion rootProject.ext.android.minSdkVersion
targetSdkVersion rootProject.ext.android.targetSdkVersion
versionCode Integer.valueOf(VERSION_CODE)
versionName getValueFromRootProperties("${project.name.replace("-", "_").toUpperCase()}_VERSION")
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
javaCompileOptions {
annotationProcessorOptions {
arguments = [AROUTER_MODULE_NAME: project.getName()]
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation rootProject.ext.dependencies.arouter
annotationProcessor rootProject.ext.dependencies.aroutercompiler
if (Boolean.valueOf(RELEASE)) {
implementation rootProject.ext.dependencies.httpdnsbase
} else {
implementation project(':foudations:httpdns-base')
}
}
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()

View File

@@ -1 +0,0 @@
-keep class com.mogo.httpdns.noop.*{*;}

View File

@@ -1,3 +0,0 @@
GROUP=com.mogo.httpdns
POM_ARTIFACT_ID=httpdns-noop
VERSION_CODE=1

View File

@@ -1,21 +0,0 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

View File

@@ -1,13 +0,0 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mogo.httpdns.noop">
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<!-- 用于获取手机imei码进行数据上报非必须 -->
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<!-- 灯塔 -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
</manifest>

View File

@@ -1,47 +0,0 @@
package com.mogo.httpdns.noop;
import android.content.Context;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.mogo.cloud.httpdns.listener.OnAddressChangedListener;
import com.mogo.httpdns.HttpDnsConst;
import com.mogo.httpdns.IHttpDnsCallback;
import com.mogo.httpdns.IMogoHttpDns;
public
/**
* @author congtaowang
* @since 2020/11/18
*
* 描述
*/
@Route(path = HttpDnsConst.PATH)
class HttpDnsNoop implements IMogoHttpDns {
@Override
public String getCachedHttpDnsIps(String host, int type) {
return host;
}
@Override
public String syncGetHttpDns(String host, int type, boolean useCache) {
return host;
}
@Override
public void addressChangedListener(OnAddressChangedListener listener) {
}
@Override
public void getHttpDnsIp(String host, int type, boolean useCache, IHttpDnsCallback callback) {
if (callback != null) {
callback.onParsed(host);
}
}
@Override
public void init(Context context) {
}
}

View File

@@ -1 +0,0 @@
/build

View File

@@ -1,46 +0,0 @@
apply plugin: 'com.android.library'
android {
compileSdkVersion rootProject.ext.android.compileSdkVersion
// buildToolsVersion rootProject.ext.android.buildToolsVersion
defaultConfig {
minSdkVersion rootProject.ext.android.minSdkVersion
targetSdkVersion rootProject.ext.android.targetSdkVersion
versionCode Integer.valueOf(VERSION_CODE)
versionName getValueFromRootProperties("${project.name.replace("-", "_").toUpperCase()}_VERSION")
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
javaCompileOptions {
annotationProcessorOptions {
arguments = [AROUTER_MODULE_NAME: project.getName()]
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.mogo.tencent.httpdns:android-httpdns:+@aar"
implementation rootProject.ext.dependencies.arouter
annotationProcessor rootProject.ext.dependencies.aroutercompiler
if (Boolean.valueOf(RELEASE)) {
implementation rootProject.ext.dependencies.httpdnsbase
implementation rootProject.ext.dependencies.mogocommons
} else {
implementation project(':foudations:httpdns-base')
implementation project(':foudations:mogo-commons')
}
}
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()

View File

@@ -1,3 +0,0 @@
GROUP=com.mogo.httpdns
POM_ARTIFACT_ID=httpdns-tencent
VERSION_CODE=1

View File

@@ -1,21 +0,0 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

View File

@@ -1,19 +0,0 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mogo.httpdns">
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<!-- 用于获取手机imei码进行数据上报非必须 -->
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<!-- 灯塔 -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application>
<meta-data android:name="HTTP_DNS_APP_KEY" android:value="0I00093F244N42WU"/>
<meta-data android:name="HTTP_DNS_ID" android:value="2742"/>
<meta-data android:name="HTTP_DNS_KEY" android:value="7Pplkaua"/>
</application>
</manifest>

View File

@@ -1,170 +0,0 @@
package com.mogo.httpdns.tencent;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.text.TextUtils;
import com.mogo.utils.ThreadPoolService;
import com.mogo.utils.logger.Logger;
import com.tencent.msdk.dns.MSDKDnsResolver;
import java.util.Collection;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
/**
* @author congtaowang
* @since 2020/11/18
* <p>
* 描述
*/
class HttpDnsIpsCache {
private static final String TAG = "HttpDnsIpsCache";
// 缓存过期时间
public static final long INTERVAL_CACHE = 60 * 60 * 1000;
// 刷新缓存时间
public static final long TTL = ( long ) ( INTERVAL_CACHE * 0.75 );
// 使用dns新域名
public static final int MSG_DNS_FLUSH = 6000000;
// ttl
public static final int MSG_DNS_TTL = 6000001;
private final static Map< String, String > sCaches = new ConcurrentHashMap<>();
private final static Map< String, String > sTTLCaches = new ConcurrentHashMap<>();
private final static Map< String, IHttpDnsTtlCallback > sTtlCallbacks = new ConcurrentHashMap<>();
private final static Handler sHandler = new Handler( Looper.getMainLooper() ) {
@Override
public void handleMessage( Message msg ) {
super.handleMessage( msg );
if ( msg.what == MSG_DNS_FLUSH ) {
flushNewDnsCache();
postTtlCallback();
loopDnsParse();
} else if ( msg.what == MSG_DNS_TTL ) {
parseHosts();
}
}
};
/**
* 将 ttl 消息回调
*/
static void postTtlCallback() {
if ( sTtlCallbacks.isEmpty() ) {
return;
}
Collection<IHttpDnsTtlCallback> callbacks = sTtlCallbacks.values();
if (callbacks.isEmpty()) {
return;
}
for ( IHttpDnsTtlCallback callback : callbacks ) {
if ( callback == null ) {
continue;
}
try {
callback.onTtl();
} catch ( Exception e ) {
e.printStackTrace();
}
}
}
/**
* 缓存域名
*
* @param host
* @param ip
*/
static void cache( String host, String ip ) {
sCaches.put( host, ip );
}
/**
* 获取缓存中的域名
*
* @param host
* @return
*/
static String getHttpDnsIps( String host ) {
return sCaches.get( host );
}
/**
* 使用新的 dns 缓存
*/
static void flushNewDnsCache() {
sCaches.clear();
sCaches.putAll( sTTLCaches );
}
/**
* ttl 到达后,刷新一遍 dns 域名
*/
static void loopDnsParse() {
Logger.d( TAG, "使用新的dns列表" );
sHandler.sendEmptyMessageDelayed( MSG_DNS_FLUSH, INTERVAL_CACHE );
sHandler.sendEmptyMessageDelayed( MSG_DNS_TTL, TTL );
}
/**
* ttl 到期,刷新域名
*/
static void parseHosts() {
Logger.d( TAG, "ttl 过期刷新dns列表" );
ThreadPoolService.execute( new Runnable() {
@Override
public void run() {
Set< String > hostSet = sCaches.keySet();
if ( hostSet.isEmpty() ) {
return;
}
for ( String host : hostSet ) {
String newIp = parseHostFromHttpDns( host );
if ( TextUtils.isEmpty( newIp ) ) {
continue;
}
sTTLCaches.put( host, newIp );
}
}
} );
}
/**
* 使用腾讯服务解析域名
*
* @param host
* @return
*/
static String parseHostFromHttpDns( String host ) {
String ips = MSDKDnsResolver.getInstance().getAddrByName( host );
String[] ipArr = ips.split( ";" );
if ( 0 == ipArr.length ) {
return null;
}
for ( String ip : ipArr ) {
if ( TextUtils.isEmpty( ip ) || TextUtils.equals( "0", ip ) ) {
continue;
}
Logger.d( TAG, "parse: %s - %s", host, ip );
return ip;
}
return null;
}
static void addHttpDnsTtlCallback( String host, IHttpDnsTtlCallback callback ) {
sTtlCallbacks.put( host, callback );
}
static void removeHttpDnsTtlCallback( String host ) {
sTtlCallbacks.remove( host );
}
}

View File

@@ -1,6 +0,0 @@
package com.mogo.httpdns.tencent;
public class IHttpDnsTtlCallback {
public void onTtl() {
}
}

View File

@@ -1,127 +0,0 @@
package com.mogo.httpdns.tencent;
import android.content.Context;
import android.text.TextUtils;
import androidx.annotation.Keep;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.mogo.cloud.httpdns.listener.OnAddressChangedListener;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.httpdns.HttpDnsConst;
import com.mogo.httpdns.IHttpDnsCallback;
import com.mogo.httpdns.IMogoHttpDns;
import com.mogo.utils.logger.Logger;
import com.mogo.utils.network.HttpDns;
import com.tencent.msdk.dns.MSDKDnsResolver;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import static com.mogo.httpdns.HttpDnsConst.HTTP_DNS_ADDRESS_TYPE_IM;
import static com.mogo.httpdns.HttpDnsConst.HTTP_DNS_ADDRESS_TYPE_WS;
@Route( path = HttpDnsConst.PATH )
public class TencentHttpDns implements IMogoHttpDns, HttpDns {
private static volatile boolean sInited = false;
private static final String TAG = "TencentHttpDns";
@Override
public List< InetAddress > lookup( String hostname ) throws UnknownHostException {
Logger.d( TAG, "需要dns解析" );
String cacheIp = getCacheOrParseIpIfNecessary( hostname );
if ( TextUtils.isEmpty( cacheIp ) ) {
return Collections.emptyList();
}
return Arrays.asList( InetAddress.getAllByName( cacheIp ) );
}
@Override
public String getCachedHttpDnsIps( String host,int type ) {
String ip = HttpDnsIpsCache.getHttpDnsIps(host);
if (ip == null) {
return null;
} else {
return tailPort(ip, type);
}
}
private String getCacheOrParseIpIfNecessary( String host ) {
String cacheIp = HttpDnsIpsCache.getHttpDnsIps( host );
if ( TextUtils.isEmpty( cacheIp ) ) {
cacheIp = HttpDnsIpsCache.parseHostFromHttpDns( host );
if ( !TextUtils.isEmpty( cacheIp ) ) {
HttpDnsIpsCache.cache( host, cacheIp );
}
}
return cacheIp;
}
@Override
public void getHttpDnsIp( String host,int type, boolean useCache, IHttpDnsCallback callback ) {
String cacheIp;
if ( useCache ) {
cacheIp = getCacheOrParseIpIfNecessary( host );
} else {
cacheIp = HttpDnsIpsCache.parseHostFromHttpDns( host );
if ( !TextUtils.isEmpty( cacheIp ) ) {
HttpDnsIpsCache.cache( host, cacheIp );
}
}
if ( !TextUtils.isEmpty( cacheIp ) ) {
if ( callback != null ) {
callback.onParsed( tailPort(cacheIp,type) );
return;
}
}
if ( callback != null ) {
callback.onParsed( null );
}
}
@Override
public String syncGetHttpDns(String host, int type, boolean useCache) {
return null;
}
@Override
public void addressChangedListener(OnAddressChangedListener listener) {
}
@Keep
@Override
public void init( Context context ) {
if ( sInited ) {
return;
}
MSDKDnsResolver.getInstance().init( context.getApplicationContext(),
"0I00093F244N42WU",
"2742",
"7Pplkaua",
DebugConfig.isDebug(),
1_000
);
MSDKDnsResolver.getInstance().WGSetDnsOpenId( "1AE58PG9444E3G9L" );
HttpDnsIpsCache.loopDnsParse();
sInited = true;
}
private String tailPort(String ip, int type) {
switch (type) {
case HTTP_DNS_ADDRESS_TYPE_WS:
return ip + ":4004";
case HTTP_DNS_ADDRESS_TYPE_IM:
return ip + ":4002";
default:
return ip;
}
}
}

View File

@@ -1 +0,0 @@
/build

View File

@@ -1,41 +0,0 @@
plugins {
id 'com.android.library'
}
android {
compileSdkVersion rootProject.ext.android.compileSdkVersion
defaultConfig {
minSdkVersion rootProject.ext.android.minSdkVersion
targetSdkVersion rootProject.ext.android.targetSdkVersion
versionCode Integer.valueOf(VERSION_CODE)
versionName getValueFromRootProperties("${project.name.replace("-", "_").toUpperCase()}_VERSION")
consumerProguardFiles "consumer-rules.pro"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation rootProject.ext.dependencies.mogoaicloudsocket
if (Boolean.valueOf(RELEASE)) {
implementation rootProject.ext.dependencies.mogoutils
implementation rootProject.ext.dependencies.mogoserviceapi
} else {
implementation project(":foudations:mogo-utils")
implementation project(":services:mogo-service-api")
}
}
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()

View File

@@ -1,3 +0,0 @@
GROUP=com.mogo.aicloud.services
POM_ARTIFACT_ID=services-apk
VERSION_CODE=1

View File

@@ -1,21 +0,0 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mogo.aicloud.services">
</manifest>

View File

@@ -1,63 +0,0 @@
package com.mogo.aicloud.services.locationinfo;
import android.content.Context;
import androidx.annotation.Keep;
import com.mogo.map.location.MogoLocation;
import com.mogo.service.locationinfo.IMogoLocationInfoService;
import com.mogo.utils.logger.Logger;
public
/**
* @author congtaowang
* @since 2020/7/16
*
* 位置服务
*/
@Keep
class MogoLocationInfoServices implements IMogoLocationInfoService {
private static final String TAG = "MogoLocationInfoServices-apk";
private static volatile MogoLocationInfoServices sInstance;
private MogoLocationInfoServices() {
}
@Keep
public static MogoLocationInfoServices getInstance() {
if ( sInstance == null ) {
synchronized ( MogoLocationInfoServices.class ) {
if ( sInstance == null ) {
sInstance = new MogoLocationInfoServices();
}
}
}
return sInstance;
}
public synchronized void release() {
sInstance = null;
}
@Override
public void provideLocation( MogoLocation location ) {
Logger.d( TAG, "apk - provideLocation" );
}
@Override
public void start() {
Logger.d( TAG, "apk - start" );
}
@Override
public void stop() {
Logger.d( TAG, "apk - stop" );
}
@Override
public void init( Context context ) {
Logger.d( TAG, "apk - init" );
}
}

View File

@@ -1,71 +0,0 @@
package com.mogo.aicloud.services.passport;
import android.content.Context;
import androidx.annotation.Keep;
import com.mogo.cloud.passport.IMoGoTokenCallback;
import com.mogo.cloud.passport.MoGoAiCloudClient;
import com.mogo.service.passport.IMogoPassportManager;
import com.mogo.service.passport.IMogoTicketCallback;
public
/*
* @author congtaowang
* @since 2020/7/16
*
* 描述
*/
@Keep
class PassportManager implements IMogoPassportManager {
private static volatile PassportManager sInstance;
private IMogoTicketCallback mCallBack;
private PassportManager() {
MoGoAiCloudClient.getInstance().addTokenCallbacks(new IMoGoTokenCallback() {
@Override
public void onTokenGot(String token, String sn) {
if (mCallBack != null) {
mCallBack.onTicketGot(token);
}
}
@Override
public void onError(int code, String msg) {
if (mCallBack != null) {
mCallBack.onError(code, msg);
}
}
});
}
@Keep
public static PassportManager getInstance() {
if (sInstance == null) {
synchronized (PassportManager.class) {
if (sInstance == null) {
sInstance = new PassportManager();
}
}
}
return sInstance;
}
public synchronized void release() {
mCallBack = null;
sInstance = null;
}
@Override
public void requestTicket(final IMogoTicketCallback callback) {
this.mCallBack = callback;
MoGoAiCloudClient.getInstance().refreshToken();
}
@Override
public void init(Context context) {
}
}

View File

@@ -1,211 +0,0 @@
package com.mogo.aicloud.services.socket;
import android.content.Context;
import androidx.annotation.Keep;
import com.mogo.cloud.socket.IMogoCloudSocketMsgAckListener;
import com.mogo.cloud.socket.IMogoCloudSocketOnMessageListener;
import com.mogo.cloud.socket.SocketManager;
import com.mogo.cloud.socket.entity.MsgBody;
import com.mogo.service.connection.IMogoLifecycleListener;
import com.mogo.service.connection.IMogoMsgAckListener;
import com.mogo.service.connection.IMogoOnMessageListener;
import com.mogo.service.connection.IMogoSocketManager;
import com.mogo.utils.logger.Logger;
import com.zhidao.ptech.connsvr.commom.protocol.MogoCommon;
import com.zhidao.socket.ConnectionLifecycleListener;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
/**
* @author arrow
* @since 2021-02-22
* <p>
* 长链实现:基于 netty
*/
@Keep
public class MogoAiCloudSocketManager extends ConnectionLifecycleListener implements IMogoSocketManager {
private static final String TAG = "MogoAiCloudSocketManager-apk";
private static volatile MogoAiCloudSocketManager sInstance;
private String mAppId;
private MogoAiCloudSocketManager(Context context) {
}
@Keep
public static MogoAiCloudSocketManager getInstance(Context context) {
if (sInstance == null) {
synchronized (MogoAiCloudSocketManager.class) {
if (sInstance == null) {
sInstance = new MogoAiCloudSocketManager(context);
}
}
}
return sInstance;
}
/**
* 管理消息分发
* <p>
* key - msgType
*/
private final Map<Integer, List<IMogoOnMessageListener>> mListeners = new ConcurrentHashMap<>();
private final Map<Integer, IMogoLifecycleListener> mLifeCycleListeners = new ConcurrentHashMap<>();
/**
* 管理消息回执
* <p>
* key - msgId
*/
private final Map<Long, IMogoMsgAckListener> mAckListeners = new ConcurrentHashMap<>();
@Override
public void init(Context context, String appId) {
this.mAppId = appId;
SocketManager.getInstance().init(context);
SocketManager.getInstance().registerSocketConnCallback(this);
}
@Override
public void registerOnMessageListener(int msgType, IMogoOnMessageListener listener) {
if (mListeners.containsKey(msgType)) {
com.mogo.cloud.utils.logger.Logger.w(TAG, "msgType %d is exist.", msgType);
return;
}
if (!mListeners.containsKey(msgType)) {
mListeners.put(msgType, new ArrayList<>());
}
mListeners.get(msgType).add(listener);
SocketManager.getInstance().registerOnMessageListener(msgType, mogoCloudSocketOnMessageListener);
}
@Override
public void unregisterOnMessageListener(int msgType) {
}
@Override
public void unregisterOnMessageListener(int msgType, IMogoOnMessageListener listener) {
if (listener == null) {
return;
}
if (!mListeners.containsKey(msgType)) {
return;
}
List<IMogoOnMessageListener> listeners = mListeners.get(msgType);
if (listeners != null) {
listeners.remove(listener);
}
SocketManager.getInstance().unregisterOnMessageListener(msgType, mogoCloudSocketOnMessageListener);
}
@Override
public void registerLifecycleListener(int msgType, IMogoLifecycleListener listener) {
if (mLifeCycleListeners.containsKey(msgType)) {
return;
}
if (!mLifeCycleListeners.containsKey(msgType)) {
mLifeCycleListeners.put(msgType, listener);
}
}
@Override
public void unregisterLifecycleListener(int msgType) {
if (!mLifeCycleListeners.containsKey(msgType)) {
return;
}
mLifeCycleListeners.remove(msgType);
}
@Override
public void sendMsg(MsgBody body, IMogoMsgAckListener listener) {
Logger.d(TAG, "sendMsg.");
mAckListeners.put(body.getMsgId(), listener);
MsgBody msgBody = new MsgBody();
msgBody.msgType(body.getMsgType());
msgBody.ack(body.isAck());
msgBody.content(body.getContent());
SocketManager.getInstance().sendMsg(mAppId, MogoCommon.Product.mogoBussiness.getNumber(), msgBody, mogoCloudSocketMsgAckListener);
}
@Override
public void destroy() {
release();
}
public synchronized void release() {
SocketManager.getInstance().release();
}
@Override
public void init(Context context) {
}
private final IMogoCloudSocketMsgAckListener mogoCloudSocketMsgAckListener = msgId -> mAckListeners.get(msgId).onAck(msgId);
private final IMogoCloudSocketOnMessageListener mogoCloudSocketOnMessageListener = new IMogoCloudSocketOnMessageListener() {
@Override
public Class<Object> target(int msgType) {
List<IMogoOnMessageListener> listeners = mListeners.get(msgType);
if (listeners != null) {
return listeners.get(0).target();
} else {
return Object.class;
}
}
@Override
public void onMsgReceived(int msgType, Object obj) {
Logger.d(TAG,"onMsgReceived obj className : " + obj.getClass().getName());
List<IMogoOnMessageListener> listeners = mListeners.get(msgType);
if (listeners != null && !listeners.isEmpty()) {
for (IMogoOnMessageListener listener : listeners) {
if (listener != null) {
Logger.d(TAG, "received msgId = %s, content = %s", mAckListeners.get(msgType), obj);
listener.onMsgReceived(obj);
}
}
}
}
};
@Override
public void onConnectSuccess() {
if (mLifeCycleListeners.size() > 0){
for (IMogoLifecycleListener lifecycleListener : mLifeCycleListeners.values()){
if (lifecycleListener != null){
lifecycleListener.onConnectSuccess();
}
}
}
}
@Override
public void onConnectFailure() {
if (mLifeCycleListeners.size() > 0){
for (IMogoLifecycleListener lifecycleListener : mLifeCycleListeners.values()){
if (lifecycleListener != null){
lifecycleListener.onConnectFailure();
}
}
}
}
@Override
public void onConnectLost(boolean reconnect) {
if (mLifeCycleListeners.size() > 0){
for (IMogoLifecycleListener lifecycleListener : mLifeCycleListeners.values()){
if (lifecycleListener != null){
lifecycleListener.onConnectLost();
}
}
}
}
}

View File

@@ -1,5 +1,6 @@
plugins {
id 'com.android.library'
id 'com.alibaba.arouter'
}
android {
@@ -12,6 +13,12 @@ android {
versionName getValueFromRootProperties("${project.name.replace("-", "_").toUpperCase()}_VERSION")
consumerProguardFiles "consumer-rules.pro"
javaCompileOptions {
annotationProcessorOptions {
arguments = [AROUTER_MODULE_NAME: project.getName()]
}
}
}
buildTypes {
@@ -27,16 +34,17 @@ android {
}
dependencies {
implementation rootProject.ext.dependencies.arouter
annotationProcessor rootProject.ext.dependencies.aroutercompiler
implementation rootProject.ext.dependencies.mogoaicloudsocket
implementation rootProject.ext.dependencies.mogoaicloudlocation
if (Boolean.valueOf(RELEASE)) {
implementation rootProject.ext.dependencies.mogoutils
implementation rootProject.ext.dependencies.mogocommons
implementation rootProject.ext.dependencies.mogoserviceapi
} else {
implementation project(":foudations:mogo-utils")
implementation project(":foudations:mogo-commons")
implementation project(":services:mogo-service-api")
}

View File

@@ -1,4 +1,4 @@
package com.mogo.httpdns;
package com.mogo.aicloud.services.httpdns;
import androidx.annotation.Keep;

View File

@@ -1,4 +1,4 @@
package com.mogo.httpdns;
package com.mogo.aicloud.services.httpdns;
import androidx.annotation.Keep;
import androidx.annotation.Nullable;

View File

@@ -1,4 +1,4 @@
package com.mogo.httpdns;
package com.mogo.aicloud.services.httpdns;
import androidx.annotation.Keep;

View File

@@ -1,4 +1,4 @@
package com.mogo.httpdns.mogo;
package com.mogo.aicloud.services.httpdns;
import android.content.Context;
@@ -7,9 +7,6 @@ import androidx.annotation.Keep;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.mogo.cloud.httpdns.MogoHttpDnsClient;
import com.mogo.cloud.httpdns.listener.OnAddressChangedListener;
import com.mogo.httpdns.HttpDnsConst;
import com.mogo.httpdns.IHttpDnsCallback;
import com.mogo.httpdns.IMogoHttpDns;
import com.mogo.utils.logger.Logger;
@Keep

View File

@@ -1,4 +1,4 @@
package com.mogo.httpdns;
package com.mogo.aicloud.services.httpdns;
import androidx.annotation.Keep;

View File

@@ -6,10 +6,11 @@ import androidx.annotation.Keep;
import com.mogo.cloud.location.LocationManager;
import com.mogo.map.location.MogoLocation;
import com.mogo.service.locationinfo.IMogoLocationInfoService;
import com.mogo.service.cloud.location.IMogoLocationInfoService;
import com.mogo.utils.logger.Logger;
@Keep
public class MogoLocationInfoServices implements IMogoLocationInfoService {
private static final String TAG = "MogoLocationInfoServices-sdk";

View File

@@ -6,8 +6,8 @@ import androidx.annotation.Keep;
import com.mogo.cloud.passport.IMoGoTokenCallback;
import com.mogo.cloud.passport.MoGoAiCloudClient;
import com.mogo.service.passport.IMogoPassportManager;
import com.mogo.service.passport.IMogoTicketCallback;
import com.mogo.service.cloud.passport.IMogoPassportManager;
import com.mogo.service.cloud.passport.IMogoTicketCallback;
public
/*

View File

@@ -8,10 +8,10 @@ import com.mogo.cloud.socket.IMogoCloudSocketMsgAckListener;
import com.mogo.cloud.socket.IMogoCloudSocketOnMessageListener;
import com.mogo.cloud.socket.SocketManager;
import com.mogo.cloud.socket.entity.MsgBody;
import com.mogo.service.connection.IMogoLifecycleListener;
import com.mogo.service.connection.IMogoMsgAckListener;
import com.mogo.service.connection.IMogoOnMessageListener;
import com.mogo.service.connection.IMogoSocketManager;
import com.mogo.service.cloud.socket.IMogoLifecycleListener;
import com.mogo.service.cloud.socket.IMogoMsgAckListener;
import com.mogo.service.cloud.socket.IMogoOnMessageListener;
import com.mogo.service.cloud.socket.IMogoSocketManager;
import com.mogo.utils.logger.Logger;
import com.zhidao.ptech.connsvr.commom.protocol.MogoCommon;
import com.zhidao.socket.ConnectionLifecycleListener;

View File

@@ -1 +0,0 @@
/build

View File

@@ -1,7 +0,0 @@
## 基实现功能
基础服务apk实现对应功能位置上报、长连接、passport
位置上报com.zhidao.locationinfo
长链com.zhidao.socketservice
passport

View File

@@ -1,51 +0,0 @@
apply plugin: 'com.android.library'
android {
compileSdkVersion rootProject.ext.android.compileSdkVersion
// buildToolsVersion rootProject.ext.android.buildToolsVersion
defaultConfig {
minSdkVersion rootProject.ext.android.minSdkVersion
targetSdkVersion rootProject.ext.android.targetSdkVersion
versionCode Integer.valueOf(VERSION_CODE)
versionName getValueFromRootProperties("${project.name.replace("-", "_").toUpperCase()}_VERSION")
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation rootProject.ext.dependencies.arouter
api rootProject.ext.dependencies.socketsdk
api rootProject.ext.dependencies.socketsdkconnsvrprotoco
api rootProject.ext.dependencies.socketsdkprotobufjava
implementation rootProject.ext.dependencies.accountsdk
if (Boolean.valueOf(RELEASE)) {
implementation rootProject.ext.dependencies.mogoutils
implementation rootProject.ext.dependencies.mogocommons
implementation rootProject.ext.dependencies.mogoserviceapi
} else {
implementation project(":foudations:mogo-utils")
implementation project(":foudations:mogo-commons")
implementation project(":services:mogo-service-api")
}
}
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()

View File

@@ -1,3 +0,0 @@
GROUP=com.mogo.base
POM_ARTIFACT_ID=services-apk
VERSION_CODE=1

View File

@@ -1,21 +0,0 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

View File

@@ -1,5 +0,0 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mogo.base.services.apk">
/
</manifest>

Some files were not shown because too many files have changed in this diff Show More