Merge branch 'dev' of http://gitlab.zhidaoauto.com/ecos/yycp-service/Launcher into dev
This commit is contained in:
4
.idea/gradle.xml
generated
4
.idea/gradle.xml
generated
@@ -67,6 +67,10 @@
|
||||
<option value="$PROJECT_DIR$/skin/skin-support-cardview" />
|
||||
<option value="$PROJECT_DIR$/skin/skin-support-constraint-layout" />
|
||||
<option value="$PROJECT_DIR$/skin/skin-support-design" />
|
||||
<option value="$PROJECT_DIR$/test" />
|
||||
<option value="$PROJECT_DIR$/test/crashreport" />
|
||||
<option value="$PROJECT_DIR$/test/crashreport-bugly" />
|
||||
<option value="$PROJECT_DIR$/test/crashreport-noop" />
|
||||
</set>
|
||||
</option>
|
||||
<option name="resolveModulePerSourceSet" value="false" />
|
||||
|
||||
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@@ -4,7 +4,7 @@
|
||||
<asm skipDebug="false" skipFrames="false" skipCode="false" expandFrames="false" />
|
||||
<groovy codeStyle="LEGACY" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="JDK" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -348,6 +348,7 @@ dependencies {
|
||||
apply from: "./functions/gpssimulator.gradle"
|
||||
apply from: "./functions/leftpanel.gradle"
|
||||
apply from: "./functions/skin.gradle"
|
||||
apply from: "./functions/crashreport.gradle"
|
||||
}
|
||||
|
||||
android.applicationVariants.all { variant ->
|
||||
|
||||
13
app/functions/crashreport.gradle
Normal file
13
app/functions/crashreport.gradle
Normal file
@@ -0,0 +1,13 @@
|
||||
// bugly 上报,目前仅在debug编译下加载bugly
|
||||
|
||||
project.dependencies {
|
||||
if (Boolean.valueOf(RELEASE)) {
|
||||
implementation rootProject.ext.dependencies.crashreport
|
||||
debugImplementation rootProject.ext.dependencies.crashreportbugly
|
||||
releaseImplementation rootProject.ext.dependencies.crashreportnoop
|
||||
} else {
|
||||
implementation project(':test:crashreport')
|
||||
debugImplementation project(':test:crashreport-bugly')
|
||||
releaseImplementation project(':test:crashreport-noop')
|
||||
}
|
||||
}
|
||||
@@ -2,47 +2,47 @@ project.dependencies {
|
||||
|
||||
if (Boolean.valueOf(RELEASE)) {
|
||||
bydautoImplementation rootProject.ext.dependencies.skinsupportnoop
|
||||
d8xxImplementation rootProject.ext.dependencies.skinsupportnoop
|
||||
d82xImplementation rootProject.ext.dependencies.skinsupportnoop
|
||||
em1Implementation rootProject.ext.dependencies.skinsupportnoop
|
||||
d80xImplementation rootProject.ext.dependencies.skinsupportnoop
|
||||
em3Implementation rootProject.ext.dependencies.skinsupportnoop
|
||||
|
||||
f8xxImplementation rootProject.ext.dependencies.skinsupportimpl
|
||||
f80xImplementation rootProject.ext.dependencies.skinsupportimpl
|
||||
em4Implementation rootProject.ext.dependencies.skinsupportimpl
|
||||
e8xxImplementation rootProject.ext.dependencies.skinsupportimpl
|
||||
d8xxImplementation rootProject.ext.dependencies.skinsupportimpl
|
||||
d82xImplementation rootProject.ext.dependencies.skinsupportimpl
|
||||
em1Implementation rootProject.ext.dependencies.skinsupportimpl
|
||||
d80xImplementation rootProject.ext.dependencies.skinsupportimpl
|
||||
em3Implementation rootProject.ext.dependencies.skinsupportimpl
|
||||
|
||||
f8xxImplementation rootProject.ext.dependencies.skinsupportlight
|
||||
f80xImplementation rootProject.ext.dependencies.skinsupportlight
|
||||
em4Implementation rootProject.ext.dependencies.skinsupportlight
|
||||
e8xxImplementation rootProject.ext.dependencies.skinsupportlight
|
||||
d8xxImplementation rootProject.ext.dependencies.skinsupportlight
|
||||
d82xImplementation rootProject.ext.dependencies.skinsupportlight
|
||||
em1Implementation rootProject.ext.dependencies.skinsupportlight
|
||||
d80xImplementation rootProject.ext.dependencies.skinsupportlight
|
||||
em3Implementation rootProject.ext.dependencies.skinsupportlight
|
||||
// d8xxImplementation rootProject.ext.dependencies.skinsupportlight
|
||||
// d82xImplementation rootProject.ext.dependencies.skinsupportlight
|
||||
// em1Implementation rootProject.ext.dependencies.skinsupportlight
|
||||
// d80xImplementation rootProject.ext.dependencies.skinsupportlight
|
||||
// em3Implementation rootProject.ext.dependencies.skinsupportlight
|
||||
} else {
|
||||
bydautoImplementation project(':skin:mogo-skin-support-noop')
|
||||
d8xxImplementation project(':skin:mogo-skin-support-noop')
|
||||
d82xImplementation project(':skin:mogo-skin-support-noop')
|
||||
em1Implementation project(':skin:mogo-skin-support-noop')
|
||||
d80xImplementation project(':skin:mogo-skin-support-noop')
|
||||
em3Implementation project(':skin:mogo-skin-support-noop')
|
||||
|
||||
f8xxImplementation project(':skin:mogo-skin-support-impl')
|
||||
f80xImplementation project(':skin:mogo-skin-support-impl')
|
||||
em4Implementation project(':skin:mogo-skin-support-impl')
|
||||
e8xxImplementation project(':skin:mogo-skin-support-impl')
|
||||
d8xxImplementation project(':skin:mogo-skin-support-impl')
|
||||
d82xImplementation project(':skin:mogo-skin-support-impl')
|
||||
em1Implementation project(':skin:mogo-skin-support-impl')
|
||||
d80xImplementation project(':skin:mogo-skin-support-impl')
|
||||
em3Implementation project(':skin:mogo-skin-support-impl')
|
||||
|
||||
f8xxImplementation project(':skin:mogo-skin-light')
|
||||
f80xImplementation project(':skin:mogo-skin-light')
|
||||
em4Implementation project(':skin:mogo-skin-light')
|
||||
e8xxImplementation project(':skin:mogo-skin-light')
|
||||
d8xxImplementation project(':skin:mogo-skin-light')
|
||||
d82xImplementation project(':skin:mogo-skin-light')
|
||||
em1Implementation project(':skin:mogo-skin-light')
|
||||
d80xImplementation project(':skin:mogo-skin-light')
|
||||
em3Implementation project(':skin:mogo-skin-light')
|
||||
// d8xxImplementation project(':skin:mogo-skin-light')
|
||||
// d82xImplementation project(':skin:mogo-skin-light')
|
||||
// em1Implementation project(':skin:mogo-skin-light')
|
||||
// d80xImplementation project(':skin:mogo-skin-light')
|
||||
// em3Implementation project(':skin:mogo-skin-light')
|
||||
}
|
||||
}
|
||||
@@ -29,6 +29,7 @@ import com.mogo.module.widgets.MogoWidgetsProvider;
|
||||
import com.mogo.service.IMogoServiceApis;
|
||||
import com.mogo.service.MogoServicePaths;
|
||||
import com.mogo.service.passport.IMogoTicketCallback;
|
||||
import com.mogo.test.crashreport.ITestCrashReportProvider;
|
||||
import com.mogo.utils.UiThreadHandler;
|
||||
import com.mogo.utils.logger.LogLevel;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
@@ -100,6 +101,11 @@ public class MogoApplication extends AbsMogoApplication {
|
||||
}
|
||||
|
||||
LeakCanary.install( this );
|
||||
|
||||
// debug 下初始化 bugly 上报
|
||||
if ( DebugConfig.isDebug() ) {
|
||||
ARouter.getInstance().navigation( ITestCrashReportProvider.class );
|
||||
}
|
||||
Log.i( "timer", "cost " + ( System.currentTimeMillis() - start ) + "ms" );
|
||||
}
|
||||
|
||||
|
||||
@@ -161,7 +161,7 @@ targetSdkVersion : 22,
|
||||
gpssimulatornoop : "com.mogo.module:module-gps-simulator-noop:${MOGO_MODULE_GPS_SIMULATOR_NOOP_VERSION}",
|
||||
|
||||
adasapi : "com.zhidao.autopilot.support:adas:1.0.1",
|
||||
adasconfigapi : "com.zhidao.adasconfig:adasconfig:1.0.9",
|
||||
adasconfigapi : "com.zhidao.adasconfig:adasconfig:1.1.5",
|
||||
|
||||
// 个人中心的SDK
|
||||
personalsdk : "com.zhidaoauto.person.info:data:1.0.1",
|
||||
@@ -205,6 +205,10 @@ targetSdkVersion : 22,
|
||||
skinsupportimpl : "com.mogo.skin:skin-support-impl:${MOGO_SKIN_SUPPORT_IMPL_VERSION}",
|
||||
skinsupportnoop : "com.mogo.skin:skin-support-noop:${MOGO_SKIN_SUPPORT_NOOP_VERSION}",
|
||||
skinsupportlight : "com.mogo.skin:skin-light:${MOGO_SKIN_LIGHT_VERSION}",
|
||||
|
||||
crashreport : "com.mogo.test:crashrepot:${CRASHREPORT_VERSION}",
|
||||
crashreportbugly : "com.mogo.test:crashreport-bugly:${CRASHREPORT_BUGLY_VERSION}",
|
||||
crashreportnoop : "com.mogo.test:crashreport-noop:${CRASHREPORT_NOOP_VERSION}",
|
||||
]
|
||||
|
||||
}
|
||||
@@ -114,6 +114,10 @@ LOGLIB_VERSION = 1.0.4
|
||||
# monitor
|
||||
MOGO_MODULE_MONITOR_VERSION = 1.0.0-SNAPSHOT
|
||||
|
||||
CRASHREPORT_VERSION = 1.0.0
|
||||
CRASHREPORT_BUGLY_VERSION = 1.0.0
|
||||
CRASHREPORT_NOOP_VERSION = 1.0.0
|
||||
|
||||
## 产品库必备配置,产品库自动对versionCode和versionName版本进行升级
|
||||
applicationId=com.mogo.launcer
|
||||
applicationName=IntelligentPilot
|
||||
|
||||
@@ -185,6 +185,7 @@ public class AMapNaviViewWrapper implements IMogoMapView,
|
||||
aMap.setOnCameraChangeListener( this );
|
||||
aMap.setOnMyLocationChangeListener( this );
|
||||
}
|
||||
AMapMessageManager.getInstance().clear();
|
||||
AMapMessageManager.getInstance().registerAMapMessageListener( this );
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@ import com.amap.api.maps.model.Poi;
|
||||
import com.amap.api.maps.model.Polyline;
|
||||
import com.amap.api.maps.model.animation.Animation;
|
||||
import com.amap.api.maps.model.animation.TranslateAnimation;
|
||||
import com.amap.api.navi.AMapNaviViewOptions;
|
||||
import com.amap.api.navi.model.NaviInfo;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.map.IMogoMap;
|
||||
@@ -181,6 +180,7 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
aMap.setOnCameraChangeListener( this );
|
||||
aMap.setOnMyLocationChangeListener( this );
|
||||
}
|
||||
AMapMessageManager.getInstance().clear();
|
||||
AMapMessageManager.getInstance().registerAMapMessageListener( this );
|
||||
}
|
||||
|
||||
@@ -213,6 +213,7 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
public void onResume() {
|
||||
if ( mMapView != null ) {
|
||||
mMapView.onResume();
|
||||
Logger.d( TAG, Log.getStackTraceString( new Throwable() ) );
|
||||
Logger.d( TAG, "map onResume" );
|
||||
}
|
||||
}
|
||||
@@ -362,6 +363,8 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
mMapView.getMap().moveCamera( CameraUpdateFactory.changeTilt( 60 ) );
|
||||
break;
|
||||
case NorthUP_2D:
|
||||
mMapView.getMap().moveCamera( CameraUpdateFactory.changeTilt( 0 ) );
|
||||
break;
|
||||
case CarUp_2D:
|
||||
mMapView.getMap().moveCamera( CameraUpdateFactory.changeTilt( 0 ) );
|
||||
break;
|
||||
@@ -378,7 +381,7 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
}
|
||||
|
||||
private boolean checkMapView() {
|
||||
if ( mMapView == null ) {
|
||||
if ( mMapView == null || mMapView.getMap() == null ) {
|
||||
Logger.e( TAG, "高德mapView实例为空,请检查" );
|
||||
return false;
|
||||
}
|
||||
@@ -413,7 +416,7 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
Logger.d( TAG, Log.getStackTraceString( new Throwable() ) );
|
||||
}
|
||||
if ( checkMapView() ) {
|
||||
MyLocationStyle style = mMapView.getMap().getMyLocationStyle();
|
||||
MyLocationStyle style = getMyLocationStyle();
|
||||
if ( style == null ) {
|
||||
style = new MyLocationStyle();
|
||||
}
|
||||
@@ -435,7 +438,7 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
Logger.d( TAG, Log.getStackTraceString( new Throwable() ) );
|
||||
}
|
||||
if ( checkMapView() ) {
|
||||
MyLocationStyle style = mMapView.getMap().getMyLocationStyle();
|
||||
MyLocationStyle style = getMyLocationStyle();
|
||||
if ( style == null ) {
|
||||
style = new MyLocationStyle();
|
||||
}
|
||||
@@ -448,7 +451,7 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
public void initMyLocation() {
|
||||
if ( checkMapView() ) {
|
||||
mMapView.getMap().setMyLocationEnabled( true );
|
||||
MyLocationStyle style = mMapView.getMap().getMyLocationStyle();
|
||||
MyLocationStyle style = getMyLocationStyle();
|
||||
style.myLocationType( MyLocationStyle.LOCATION_TYPE_LOCATION_ROTATE_NO_CENTER );
|
||||
style.interval( 1000 );
|
||||
style.anchor( 0.5F, 0.5F );
|
||||
@@ -459,6 +462,14 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
}
|
||||
}
|
||||
|
||||
private MyLocationStyle getMyLocationStyle() {
|
||||
try {
|
||||
return mMapView.getMap().getMyLocationStyle();
|
||||
} catch ( Exception e ) {
|
||||
return new MyLocationStyle();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void recoverLockMode() {
|
||||
if ( checkMapView() ) {
|
||||
@@ -466,7 +477,10 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
Logger.d( TAG, Log.getStackTraceString( new Throwable() ) );
|
||||
}
|
||||
Logger.d( TAG, "锁车" );
|
||||
MyLocationStyle style = mMapView.getMap().getMyLocationStyle();
|
||||
MyLocationStyle style = getMyLocationStyle();
|
||||
if ( style == null ) {
|
||||
style = new MyLocationStyle();
|
||||
}
|
||||
style.myLocationType( MyLocationStyle.LOCATION_TYPE_FOLLOW );
|
||||
mMapView.getMap().setMyLocationStyle( style );
|
||||
mIsCarLocked = true;
|
||||
@@ -479,7 +493,7 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
Logger.d( TAG, Log.getStackTraceString( new Throwable() ) );
|
||||
}
|
||||
Logger.d( TAG, "解锁锁车" );
|
||||
MyLocationStyle style = mMapView.getMap().getMyLocationStyle();
|
||||
MyLocationStyle style = getMyLocationStyle();
|
||||
style.myLocationType( MyLocationStyle.LOCATION_TYPE_FOLLOW_NO_CENTER );
|
||||
mMapView.getMap().setMyLocationStyle( style );
|
||||
mIsCarLocked = false;
|
||||
|
||||
@@ -47,6 +47,12 @@ public class AMapMessageManager {
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void clear(){
|
||||
if ( mListeners != null ) {
|
||||
mListeners.clear();
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void unregisterAMapMessageListener( AMapMessageListener listener ) {
|
||||
mListeners.remove( listener );
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ public class MainIndependentActivity extends MainActivity {
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
mServiceApis.getAdasControllerApi().setUseAlgorithm( false );
|
||||
mServiceApis.getAdasControllerApi().setUseAlgorithm( true );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -14,21 +14,24 @@ public class AppsListChangedLiveData extends MutableLiveData {
|
||||
|
||||
private Observer mObserver;
|
||||
|
||||
private AppsListChangedLiveData(){
|
||||
// private constructor
|
||||
}
|
||||
private static volatile AppsListChangedLiveData sInstance;
|
||||
|
||||
private static final class InstanceHolder{
|
||||
private static final AppsListChangedLiveData INSTANCE = new AppsListChangedLiveData();
|
||||
}
|
||||
private AppsListChangedLiveData(){}
|
||||
|
||||
public static AppsListChangedLiveData getInstance(){
|
||||
return InstanceHolder.INSTANCE;
|
||||
if( sInstance == null ){
|
||||
synchronized( AppsListChangedLiveData.class ) {
|
||||
if( sInstance == null ){
|
||||
sInstance = new AppsListChangedLiveData();
|
||||
}
|
||||
}
|
||||
}
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
private Object readResolve(){
|
||||
// 阻止反序列化,必须实现 Serializable 接口
|
||||
return InstanceHolder.INSTANCE;
|
||||
private Object readResolve() {
|
||||
// 阻止反序列化,必须实现 Serializable 接口
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -37,7 +40,9 @@ public class AppsListChangedLiveData extends MutableLiveData {
|
||||
mObserver = observer;
|
||||
}
|
||||
|
||||
public void release(){
|
||||
public synchronized void release(){
|
||||
removeObserver( mObserver );
|
||||
mObserver = null;
|
||||
sInstance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -216,6 +216,12 @@ public class AppsPresenter extends Presenter< AppsView > {
|
||||
AppsListChangedLiveData.getInstance().release();
|
||||
mView = null;
|
||||
mLauncher.destroy();
|
||||
mAnalytics = null;
|
||||
mCardManager = null;
|
||||
if ( mLauncher != null ) {
|
||||
mLauncher.destroy();
|
||||
}
|
||||
mLauncher = null;
|
||||
}
|
||||
|
||||
public void exit() {
|
||||
|
||||
@@ -103,6 +103,7 @@ public class InternalFunctionLauncher extends BaseAppLauncher {
|
||||
public void destroy() {
|
||||
if ( getNext() != null ) {
|
||||
getNext().destroy();
|
||||
setNext( null );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ public class AppsModel {
|
||||
private Map< Integer, List< AppInfo > > mPagedApps = new HashMap<>();
|
||||
|
||||
private AppsModel( Context context ) {
|
||||
mContext = context;
|
||||
mContext = context.getApplicationContext();
|
||||
}
|
||||
|
||||
public static AppsModel getInstance( Context context ) {
|
||||
|
||||
@@ -185,7 +185,7 @@ public class MogoModulesManager implements MogoModulesHandler {
|
||||
return;
|
||||
}
|
||||
mActivity.getSupportFragmentManager().beginTransaction()
|
||||
.add( containerId, fragment, provider.getModuleName() )
|
||||
.replace( containerId, fragment, provider.getModuleName() )
|
||||
.commitAllowingStateLoss();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -703,7 +703,7 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
} );
|
||||
}
|
||||
|
||||
public void onSyncMarkerResponse(MarkerResponse response){
|
||||
public void onSyncMarkerResponse( MarkerResponse response ) {
|
||||
if ( ignoreDrawRequest() ) {
|
||||
return;
|
||||
}
|
||||
@@ -862,6 +862,9 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
// 平滑移动
|
||||
private void startSmooth( IMogoMarker iMogoMarker, MarkerOnlineCar markerOnlineCar,
|
||||
MarkerLocation markerLocation ) {
|
||||
if ( iMogoMarker == null ) {
|
||||
return;
|
||||
}
|
||||
List< MarkerCarPois > poiList = markerOnlineCar.getPois();
|
||||
if ( filterErrorPoint( poiList ) ) {
|
||||
return;
|
||||
|
||||
@@ -3,56 +3,60 @@ package com.mogo.module.share;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.util.ArrayMap;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.commons.network.SubscribeImpl;
|
||||
import com.mogo.commons.network.Utils;
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.commons.voice.IMogoVoiceCmdCallBack;
|
||||
import com.mogo.map.listener.IMogoMapListener;
|
||||
import com.mogo.map.location.IMogoLocationListener;
|
||||
import com.mogo.map.marker.IMogoMarkerClickListener;
|
||||
import com.mogo.map.navi.IMogoNaviListener;
|
||||
import com.mogo.map.location.MogoLocation;
|
||||
import com.mogo.module.authorize.authprovider.invoke.AuthorizeConstant;
|
||||
import com.mogo.module.authorize.authprovider.invoke.AuthorizeInvokerConstant;
|
||||
import com.mogo.module.authorize.authprovider.module.IMogoAcquireAuthorizeListener;
|
||||
import com.mogo.module.authorize.authprovider.module.IMogoAuthorizeModuleManager;
|
||||
import com.mogo.module.common.dialog.BaseFloatDialog;
|
||||
import com.mogo.module.share.bean.FixableButton;
|
||||
import com.mogo.module.share.bean.ShareButtonConfigResponse;
|
||||
import com.mogo.module.share.bean.ShareConfigRequest;
|
||||
import com.mogo.module.share.bean.StepAfterAuth;
|
||||
import com.mogo.module.share.constant.HttpConstant;
|
||||
import com.mogo.module.share.constant.ShareConstants;
|
||||
import com.mogo.module.share.dialog.FixableShareDialog;
|
||||
import com.mogo.module.share.dialog.GridFixableShareDialog;
|
||||
import com.mogo.module.share.dialog.LaucherShareDialog;
|
||||
import com.mogo.module.share.manager.ServiceApisManager;
|
||||
import com.mogo.module.share.manager.UploadHelper;
|
||||
import com.mogo.module.share.net.ShareApiService;
|
||||
import com.mogo.service.MogoServicePaths;
|
||||
import com.mogo.service.intent.IMogoIntentListener;
|
||||
import com.mogo.service.intent.IMogoIntentManager;
|
||||
import com.mogo.service.module.IMogoModuleLifecycle;
|
||||
import com.mogo.service.share.IMogoShareManager;
|
||||
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
|
||||
import com.mogo.service.statusmanager.StatusDescriptor;
|
||||
import com.mogo.service.tanlu.IMogoTanluProvider;
|
||||
import com.mogo.service.tanlu.TanluUploadParams;
|
||||
import com.mogo.utils.NetworkUtils;
|
||||
import com.mogo.utils.TipToast;
|
||||
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 org.jetbrains.annotations.NotNull;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
|
||||
import static com.mogo.module.share.bean.StepAfterAuthKt.STEP_AFTER_AUTH_TYPE_SEEK_HELP;
|
||||
import static com.mogo.module.share.bean.StepAfterAuthKt.STEP_AFTER_AUTH_TYPE_SHOW_DIALOG;
|
||||
import static com.mogo.module.share.bean.StepAfterAuthKt.STEP_AFTER_AUTH_TYPE_UPLOAD;
|
||||
import static com.mogo.module.share.constant.ShareConstants.CMD_CANCEL_SHARE;
|
||||
import static com.mogo.module.share.constant.ShareConstants.CMD_ROAD_CLOSURE;
|
||||
import static com.mogo.module.share.constant.ShareConstants.CMD_TRAFFIC_CHECK;
|
||||
import static com.mogo.module.share.constant.ShareConstants.CMD_UPLOAD_ACCIDENT;
|
||||
import static com.mogo.module.share.constant.ShareConstants.CMD_UPLOAD_BLOCK;
|
||||
import static com.mogo.module.share.constant.ShareConstants.KEY_SHARE_CONFIG;
|
||||
import static com.mogo.module.share.constant.ShareConstants.UNWAKE_CANCEL_SHARE;
|
||||
import static com.mogo.module.share.constant.ShareConstants.UNWAKE_UPLOAD_ACCIDENT;
|
||||
import static com.mogo.module.share.constant.ShareConstants.UNWAKE_UPLOAD_DENSE_FOG;
|
||||
@@ -65,12 +69,7 @@ import static com.mogo.module.share.constant.ShareConstants.UNWAKE_UPLOAD_ROAD_I
|
||||
import static com.mogo.module.share.constant.ShareConstants.UNWAKE_UPLOAD_SEEK_HELP;
|
||||
import static com.mogo.module.share.constant.ShareConstants.UNWAKE_UPLOAD_STAGNANT_WATER;
|
||||
import static com.mogo.module.share.constant.ShareConstants.UNWAKE_UPLOAD_TRAFFIC_CHECK;
|
||||
import static com.mogo.module.share.constant.ShareConstants.UPLOAD_DENSE_FOG;
|
||||
import static com.mogo.module.share.constant.ShareConstants.UPLOAD_REAL_TIME_TRAFFIC;
|
||||
import static com.mogo.module.share.constant.ShareConstants.UPLOAD_ROAD_CONSTRUCTION;
|
||||
import static com.mogo.module.share.constant.ShareConstants.UPLOAD_ROAD_ICY;
|
||||
import static com.mogo.module.share.constant.ShareConstants.UPLOAD_SEEK_HELP;
|
||||
import static com.mogo.module.share.constant.ShareConstants.UPLOAD_STAGNANT_WATER;
|
||||
import static com.mogo.module.share.constant.ShareConstants.VOICE_CMD_GO_TO_SHARE;
|
||||
import static com.mogo.module.share.constant.ShareConstants.VOICE_CMD_NO_REPLY_SHARE_DIALOG_CLOSE;
|
||||
import static com.mogo.module.share.constant.ShareConstants.VOICE_CMD_PUB_ROAD_CONDITION;
|
||||
@@ -94,7 +93,7 @@ import static com.mogo.service.tanlu.IMogoTanluProvider.TYPE_TRAFFIC_CHECK;
|
||||
* @since 2020-01-10
|
||||
*/
|
||||
@Route(path = MogoServicePaths.PATH_SHARE)
|
||||
public class ShareControl implements IMogoShareManager, IMogoIntentListener, IMogoVoiceCmdCallBack {
|
||||
public class ShareControl implements IMogoShareManager, IMogoIntentListener, IMogoVoiceCmdCallBack, Handler.Callback {
|
||||
private static final String TAG = "ShareControl";
|
||||
|
||||
private Context mContext;
|
||||
@@ -204,6 +203,20 @@ public class ShareControl implements IMogoShareManager, IMogoIntentListener, IMo
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// ServiceApisManager.serviceApis.getStatusManagerApi().registerStatusChangedListener(TAG, StatusDescriptor.ACC_STATUS, new IMogoStatusChangedListener() {
|
||||
// @Override
|
||||
// public void onStatusChanged(StatusDescriptor descriptor, boolean isTrue) {
|
||||
// if (isTrue) {
|
||||
// queryShareConfigRetryTime = 0;
|
||||
// queryShareButtonConfig();
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// // 获取分享框配置信息
|
||||
// queryShareConfigRetryTime = 0;
|
||||
// queryShareButtonConfig();
|
||||
Logger.d(TAG,"init over====");
|
||||
}
|
||||
|
||||
@@ -438,59 +451,73 @@ public class ShareControl implements IMogoShareManager, IMogoIntentListener, IMo
|
||||
authorizeModuleManager.invokeAuthorization(AuthorizeInvokerConstant.AUTHORIZE_TYPE_LAUNCHER_SHARE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Fragment createFragment(Context context, Bundle data) {
|
||||
return null;
|
||||
private void queryShareButtonConfig(){
|
||||
if (NetworkUtils.isConnected(mContext)) {
|
||||
// 有网,直接请求
|
||||
MogoLocation location = ServiceApisManager.serviceApis.getMapServiceApi().getSingletonLocationClient(mContext).getLastKnowLocation();
|
||||
Map<String, String> params = new ArrayMap<>();
|
||||
ShareConfigRequest request = new ShareConfigRequest(Utils.getSn(), location.getAdCode());
|
||||
params.put("data", request.toJson());
|
||||
ServiceApisManager.serviceApis.getNetworkApi().create(ShareApiService.class,
|
||||
HttpConstant.Companion.getNetHost()).queryShareButtonConfig(params).subscribeOn(Schedulers.io()).observeOn(Schedulers.io()).subscribe(new SubscribeImpl<ShareButtonConfigResponse>(RequestOptions.create(mContext)) {
|
||||
@Override
|
||||
public void onSuccess(ShareButtonConfigResponse o) {
|
||||
super.onSuccess(o);
|
||||
String config = "";
|
||||
if (o.getDetailMsg() != null) {
|
||||
List<FixableButton> btnList = o.getDetailMsg().getData();
|
||||
if(btnList != null&&!btnList.isEmpty()) {
|
||||
config = GsonUtil.jsonFromObject(o.getDetailMsg().getData());
|
||||
Logger.d(TAG, "获取分享框成功:" + config);
|
||||
}else {
|
||||
Logger.d(TAG, "获取分享框成功,但是data没有内容");
|
||||
}
|
||||
}else{
|
||||
Logger.d(TAG,"获取分享框成功,但是detailMsg没有内容");
|
||||
}
|
||||
Logger.d(TAG, "获取分享框配置成功: " + config);
|
||||
SharedPrefsMgr.getInstance(mContext).putString(KEY_SHARE_CONFIG, config);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
super.onError(e);
|
||||
Logger.d(TAG, "获取分享框配置失败: " + e.getMessage());
|
||||
retryQueryShareConfig();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String message, int code) {
|
||||
super.onError(message, code);
|
||||
Logger.d(TAG, "获取分享框配置失败: " + code + ", " + message);
|
||||
retryQueryShareConfig();
|
||||
}
|
||||
});
|
||||
}else{
|
||||
// 重试
|
||||
retryQueryShareConfig();
|
||||
}
|
||||
queryShareConfigRetryTime++;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View createView(Context context) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public String getModuleName() {
|
||||
return "ShareControl";
|
||||
private static final int MSG_QUERY_SHARE_CONFIG_RETRY = 1001;
|
||||
private int queryShareConfigRetryTime = 0;
|
||||
private static final int QUERY_SHARE_CONFIG_RETRY_TIME_THRESHOLD = 10;
|
||||
private void retryQueryShareConfig(){
|
||||
if(queryShareConfigRetryTime > QUERY_SHARE_CONFIG_RETRY_TIME_THRESHOLD){
|
||||
// 重试次数超过QUERY_SHARE_CONFIG_RETRY_TIME_THRESHOLD,不再重试
|
||||
return;
|
||||
}
|
||||
handler.sendEmptyMessageDelayed(MSG_QUERY_SHARE_CONFIG_RETRY, 3000);
|
||||
}
|
||||
private Handler handler = new Handler(this);
|
||||
|
||||
@Override
|
||||
public IMogoModuleLifecycle getCardLifecycle() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoMapListener getMapListener() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getType() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoNaviListener getNaviListener() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoLocationListener getLocationListener() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoMarkerClickListener getMarkerClickListener() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAppPackage() {
|
||||
return "";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAppName() {
|
||||
return "";
|
||||
public boolean handleMessage(Message msg) {
|
||||
if (msg.what == MSG_QUERY_SHARE_CONFIG_RETRY) {
|
||||
queryShareButtonConfig();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ class ShareBtnAdapter(val context:Context): RecyclerView.Adapter<ShareBtnAdapter
|
||||
private val tvContent:TextView = itemView.findViewById(R.id.tvShareContent)
|
||||
fun bindData(btn: FixableButton) {
|
||||
GlideApp.with(context).load(btn.iconRes).into(ivIcon)
|
||||
tvContent.text = btn.content
|
||||
tvContent.text = btn.title
|
||||
ivIcon.setOnClickListener {
|
||||
btnClickListener?.invoke(btn)
|
||||
}
|
||||
|
||||
@@ -1,9 +1,16 @@
|
||||
package com.mogo.module.share.bean
|
||||
|
||||
import com.mogo.commons.data.BaseData
|
||||
import com.mogo.module.share.R
|
||||
|
||||
/**
|
||||
* 可配置按钮封装
|
||||
* @author tongchenfei
|
||||
*/
|
||||
data class FixableButton(val id:Int = 0,val poiType:String = "10007",val iconUrl:String = "", val iconRes:Int = R.drawable.share_block_up, val content:String="拥堵")
|
||||
data class FixableButton(val id:Int = 0,val poiType:String = "10007",val iconUrl:String = "", val iconRes:Int = R.drawable.share_block_up, val title:String="拥堵")
|
||||
|
||||
class ShareButtonConfigResponse:BaseData(){
|
||||
var detailMsg: ShareButtonConfigDetailMsg? = null
|
||||
}
|
||||
|
||||
data class ShareButtonConfigDetailMsg(var data:List<FixableButton>)
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.mogo.module.share.bean
|
||||
|
||||
import com.mogo.utils.network.utils.GsonUtil
|
||||
|
||||
class ShareConfigRequest(val sn:String,val adCode:String) {
|
||||
fun toJson():String{
|
||||
return GsonUtil.jsonFromObject(this)
|
||||
}
|
||||
}
|
||||
@@ -81,4 +81,9 @@ public class ShareConstants {
|
||||
* 这个是实时路况,不是拥堵,拥堵放在了extention模块里面处理
|
||||
*/
|
||||
public static final String VOICE_CMD_PUB_ROAD_CONDITION = "com.zhidao.pathfinder.report.roadCondition";
|
||||
|
||||
/**
|
||||
* 分享框配置本地缓存的key
|
||||
*/
|
||||
public static final String KEY_SHARE_CONFIG = "SHARE_BUTTON_CONFIG";
|
||||
}
|
||||
|
||||
@@ -1,140 +0,0 @@
|
||||
package com.mogo.module.share.dialog
|
||||
|
||||
import android.content.Context
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.module.common.dialog.BaseFloatDialog
|
||||
import com.mogo.module.common.utils.CarSeries
|
||||
import com.mogo.module.share.R
|
||||
import com.mogo.module.share.adapter.ShareBtnAdapter
|
||||
import com.mogo.module.share.bean.FixableButton
|
||||
import com.mogo.module.share.manager.ISeekHelpListener
|
||||
import com.mogo.module.share.manager.SeekHelpManager.removeSeekHelpListener
|
||||
import com.mogo.module.share.manager.UploadHelper.upload
|
||||
import com.mogo.service.IMogoServiceApis
|
||||
import com.mogo.service.MogoServicePaths
|
||||
import com.mogo.service.analytics.IMogoAnalytics
|
||||
import com.mogo.service.statusmanager.IMogoStatusManager
|
||||
import com.mogo.service.tanlu.IMogoTanluProvider
|
||||
import com.mogo.service.tanlu.TanluUploadParams
|
||||
import com.mogo.utils.logger.Logger
|
||||
import kotlin.random.Random
|
||||
|
||||
|
||||
/**
|
||||
* 可动态设置内容的Dialog
|
||||
* 由于和左侧Adas冲突,改成了windowManager方式实现,这种实现方式的问题是,无法监测back键的事件
|
||||
* @since 2020-01-10
|
||||
* @author tongchenfei
|
||||
*/
|
||||
class FixableShareDialog(private val mContext: Context) : BaseFloatDialog(mContext) {
|
||||
private val isShown = false
|
||||
private val mAnalytics: IMogoAnalytics
|
||||
private val mStatusManager: IMogoStatusManager
|
||||
private val mApis: IMogoServiceApis
|
||||
private lateinit var btnRecycler: RecyclerView
|
||||
private lateinit var btnAdapter:ShareBtnAdapter
|
||||
|
||||
private fun setWrapContent() {
|
||||
val window = window
|
||||
if (DebugConfig.getCarMachineType() != DebugConfig.CAR_MACHINE_TYPE_BYD) {
|
||||
if (window != null) {
|
||||
val lp = window.attributes
|
||||
lp.width = 1024
|
||||
lp.height = 600
|
||||
window.attributes = lp
|
||||
}
|
||||
} else if (CarSeries.getSeries() == CarSeries.CAR_SERIES_F80X) {
|
||||
if (window != null) {
|
||||
val lp = window.attributes
|
||||
lp.width = 1920
|
||||
lp.height = 1080
|
||||
window.attributes = lp
|
||||
}
|
||||
} else {
|
||||
if (window != null) {
|
||||
val lp = window.attributes
|
||||
lp.width = 1024
|
||||
lp.height = 600
|
||||
window.attributes = lp
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun initView() {
|
||||
Logger.d(TAG, "test-------3")
|
||||
setContentView(R.layout.launcher_dialog_share_with_gride)
|
||||
setWrapContent()
|
||||
|
||||
btnRecycler = findViewById(R.id.moduleShareBtnRecyclerView)
|
||||
val manager = GridLayoutManager(mContext, 5, GridLayoutManager.VERTICAL, false)
|
||||
manager.isAutoMeasureEnabled = true
|
||||
btnAdapter = ShareBtnAdapter(mContext)
|
||||
btnRecycler.adapter = btnAdapter
|
||||
btnAdapter.btnClickListener = {
|
||||
Logger.d(TAG, "btn click: $it")
|
||||
randomGenerateBtn()
|
||||
}
|
||||
randomGenerateBtn()
|
||||
}
|
||||
|
||||
private fun randomGenerateBtn(){
|
||||
val random = Random.nextInt(1, 10)
|
||||
val list = ArrayList<FixableButton>()
|
||||
for (i in 0 until random) {
|
||||
list.add(FixableButton())
|
||||
}
|
||||
btnAdapter.setFixableButtonList(list)
|
||||
}
|
||||
|
||||
private val seekListener: ISeekHelpListener = object : ISeekHelpListener {
|
||||
override fun onSeekHelpSuccess() {
|
||||
Logger.d(TAG, "上报求助完成,成功")
|
||||
removeSeekHelpListener(this)
|
||||
dismiss()
|
||||
}
|
||||
|
||||
override fun onSeekHelpFail() {
|
||||
Logger.d(TAG, "上报求助完成,失败")
|
||||
removeSeekHelpListener(this)
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送广播 1拥堵,2交通检查,3封路
|
||||
*/
|
||||
private fun sendShareReceiver(type: String) {
|
||||
val params = TanluUploadParams(type, IMogoTanluProvider.UPLOAD_FROM_USER)
|
||||
upload(mContext, params, true)
|
||||
}
|
||||
|
||||
override fun show() {
|
||||
Logger.d(TAG, "onShow====")
|
||||
if (!DebugConfig.isLauncher()) {
|
||||
mApis.adasControllerApi.closeADAS()
|
||||
}
|
||||
super.show()
|
||||
}
|
||||
|
||||
override fun dismiss() {
|
||||
Logger.d(TAG, "onDismiss=====")
|
||||
if (!DebugConfig.isLauncher() && mApis.statusManagerApi.isMainPageOnResume) {
|
||||
mApis.adasControllerApi.showADAS()
|
||||
}
|
||||
super.dismiss()
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val TAG = "FixableShareDialog"
|
||||
}
|
||||
|
||||
init {
|
||||
mApis = ARouter.getInstance().build(MogoServicePaths.PATH_SERVICE_APIS).navigation(mContext) as IMogoServiceApis
|
||||
mAnalytics = mApis.analyticsApi
|
||||
mStatusManager = mApis.statusManagerApi
|
||||
initView()
|
||||
}
|
||||
}
|
||||
@@ -22,7 +22,12 @@ import com.mogo.service.tanlu.TanluUploadParams
|
||||
import com.mogo.utils.logger.Logger
|
||||
import kotlin.random.Random
|
||||
|
||||
class GridFixableShareDialog(context:Context):BaseFloatDialog(context) {
|
||||
/**
|
||||
* 可动态配置的分享对话框
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
class GridFixableShareDialog(context: Context) : BaseFloatDialog(context) {
|
||||
private val isShown = false
|
||||
private val mAnalytics: IMogoAnalytics
|
||||
private val mStatusManager: IMogoStatusManager
|
||||
@@ -30,14 +35,15 @@ class GridFixableShareDialog(context:Context):BaseFloatDialog(context) {
|
||||
|
||||
private fun setWrapContent() {
|
||||
val window = window
|
||||
if (DebugConfig.getCarMachineType() != DebugConfig.CAR_MACHINE_TYPE_BYD) {
|
||||
if (window != null) {
|
||||
val lp = window.attributes
|
||||
lp.width = 1024
|
||||
lp.height = 600
|
||||
window.attributes = lp
|
||||
}
|
||||
} else if (CarSeries.getSeries() == CarSeries.CAR_SERIES_F80X) {
|
||||
// if (DebugConfig.getCarMachineType() != DebugConfig.CAR_MACHINE_TYPE_BYD) {
|
||||
// if (window != null) {
|
||||
// val lp = window.attributes
|
||||
// lp.width = 1024
|
||||
// lp.height = 600
|
||||
// window.attributes = lp
|
||||
// }
|
||||
// } else
|
||||
if (CarSeries.getSeries() == CarSeries.CAR_SERIES_F80X) {
|
||||
if (window != null) {
|
||||
val lp = window.attributes
|
||||
lp.width = 1920
|
||||
@@ -53,31 +59,30 @@ class GridFixableShareDialog(context:Context):BaseFloatDialog(context) {
|
||||
}
|
||||
}
|
||||
}
|
||||
private lateinit var gridBtnManager:GridBtnManager
|
||||
|
||||
private lateinit var gridBtnManager: GridBtnManager
|
||||
private fun initView() {
|
||||
Logger.d(TAG, "test-------3")
|
||||
setContentView(R.layout.dialog_share_with_gridlayout)
|
||||
setWrapContent()
|
||||
gridBtnManager = GridBtnManager(context,findViewById(R.id.moduleShareBtnGridLayout))
|
||||
gridBtnManager = GridBtnManager(context, findViewById(R.id.moduleShareBtnGridLayout))
|
||||
gridBtnManager.setShareClickListener {
|
||||
Logger.d(TAG, "share btn click: $it")
|
||||
if (it.poiType == IMogoTanluProvider.TYPE_SEEK_HELP) {
|
||||
// 发起故障求助
|
||||
Logger.d(TAG,"发起故障求助====")
|
||||
Logger.d(TAG, "发起故障求助====")
|
||||
seekHelp(context, seekListener, true)
|
||||
}else{
|
||||
} else {
|
||||
// 上报道路事件
|
||||
Logger.d(TAG,"上报道路事件=====")
|
||||
Logger.d(TAG, "上报道路事件=====")
|
||||
sendShareReceiver(it.poiType)
|
||||
}
|
||||
dismiss()
|
||||
}
|
||||
findViewById<FrameLayout>(R.id.flShareDialogContainer).setOnClickListener { dismiss() }
|
||||
|
||||
gridBtnManager.showDefaultBtns()
|
||||
}
|
||||
|
||||
private fun randomGenerateBtn(){
|
||||
private fun randomGenerateBtn() {
|
||||
val random = Random.nextInt(1, 10)
|
||||
gridBtnManager.resetContainer()
|
||||
for (i in 0 until random) {
|
||||
@@ -112,6 +117,7 @@ class GridFixableShareDialog(context:Context):BaseFloatDialog(context) {
|
||||
if (!DebugConfig.isLauncher()) {
|
||||
mApis.adasControllerApi.closeADAS()
|
||||
}
|
||||
gridBtnManager.showShareButton()
|
||||
super.show()
|
||||
}
|
||||
|
||||
|
||||
@@ -3,19 +3,25 @@ package com.mogo.module.share.manager
|
||||
import android.content.Context
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.GridLayout
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import com.mogo.module.share.R
|
||||
import com.mogo.module.share.bean.FixableButton
|
||||
import com.mogo.module.share.constant.ShareConstants
|
||||
import com.mogo.service.tanlu.IMogoTanluProvider
|
||||
import com.mogo.utils.glide.GlideApp
|
||||
import com.mogo.utils.logger.Logger
|
||||
import com.mogo.utils.network.utils.GsonUtil
|
||||
import com.mogo.utils.storage.SharedPrefsMgr
|
||||
|
||||
/**
|
||||
* 用来管理生成对应的分享按钮
|
||||
*/
|
||||
class GridBtnManager(val context: Context, val container: GridLayout) {
|
||||
class GridBtnManager(val context: Context,private val container: GridLayout) {
|
||||
companion object{
|
||||
const val TAG = "GridBtnManager"
|
||||
}
|
||||
private val inflater = LayoutInflater.from(context)
|
||||
|
||||
fun resetContainer() {
|
||||
@@ -32,7 +38,7 @@ class GridBtnManager(val context: Context, val container: GridLayout) {
|
||||
} else {
|
||||
GlideApp.with(context).load(button.iconRes).centerInside().into(img)
|
||||
}
|
||||
content.text = button.content
|
||||
content.text = button.title
|
||||
view.setOnClickListener {
|
||||
btnClickListener?.invoke(button)
|
||||
}
|
||||
@@ -40,18 +46,28 @@ class GridBtnManager(val context: Context, val container: GridLayout) {
|
||||
return view
|
||||
}
|
||||
|
||||
fun showDefaultBtns() {
|
||||
fun showShareButton() {
|
||||
resetContainer()
|
||||
generateShareButton(FixableButton(poiType = IMogoTanluProvider.TYPE_BLOCK, iconRes = R.drawable.share_block_up, content = "拥堵"))
|
||||
generateShareButton(FixableButton(poiType = IMogoTanluProvider.TYPE_TRAFFIC_CHECK, iconRes = R.drawable.share_traffic_check, content = "交通检查"))
|
||||
generateShareButton(FixableButton(poiType = IMogoTanluProvider.TYPE_CLOSURE, iconRes = R.drawable.share_road_closure, content = "封路"))
|
||||
generateShareButton(FixableButton(poiType = IMogoTanluProvider.TYPE_ACCIDENT, iconRes = R.drawable.share_accident, content = "事故"))
|
||||
generateShareButton(FixableButton(poiType = IMogoTanluProvider.TYPE_ROAD_CONSTRUCTION, iconRes = R.drawable.share_road_construction, content = "道路施工"))
|
||||
generateShareButton(FixableButton(poiType = IMogoTanluProvider.TYPE_REAL_TIME_TRAFFIC, iconRes = R.drawable.share_real_time_traffic, content = "实时路况"))
|
||||
generateShareButton(FixableButton(poiType = IMogoTanluProvider.TYPE_SEEK_HELP, iconRes = R.drawable.share_seek_help, content = "故障求助"))
|
||||
generateShareButton(FixableButton(poiType = IMogoTanluProvider.TYPE_STAGNANT_WATER, iconRes = R.drawable.share_stagnant_water, content = "道路积水"))
|
||||
generateShareButton(FixableButton(poiType = IMogoTanluProvider.TYPE_ROAD_ICY, iconRes = R.drawable.share_road_icy, content = "道路结冰"))
|
||||
generateShareButton(FixableButton(poiType = IMogoTanluProvider.TYPE_DENSE_FOG, iconRes = R.drawable.share_dense_fog, content = "浓雾"))
|
||||
val config = SharedPrefsMgr.getInstance(context).getString(ShareConstants.KEY_SHARE_CONFIG)
|
||||
Logger.d(TAG, "showDefaultBtns: $config")
|
||||
if(config.isEmpty()) {
|
||||
// 默认的全部十个按钮
|
||||
generateShareButton(FixableButton(poiType = IMogoTanluProvider.TYPE_BLOCK, iconRes = R.drawable.share_block_up, title = "拥堵"))
|
||||
generateShareButton(FixableButton(poiType = IMogoTanluProvider.TYPE_TRAFFIC_CHECK, iconRes = R.drawable.share_traffic_check, title = "交通检查"))
|
||||
generateShareButton(FixableButton(poiType = IMogoTanluProvider.TYPE_CLOSURE, iconRes = R.drawable.share_road_closure, title = "封路"))
|
||||
generateShareButton(FixableButton(poiType = IMogoTanluProvider.TYPE_ACCIDENT, iconRes = R.drawable.share_accident, title = "事故"))
|
||||
generateShareButton(FixableButton(poiType = IMogoTanluProvider.TYPE_ROAD_CONSTRUCTION, iconRes = R.drawable.share_road_construction, title = "道路施工"))
|
||||
generateShareButton(FixableButton(poiType = IMogoTanluProvider.TYPE_REAL_TIME_TRAFFIC, iconRes = R.drawable.share_real_time_traffic, title = "实时路况"))
|
||||
generateShareButton(FixableButton(poiType = IMogoTanluProvider.TYPE_SEEK_HELP, iconRes = R.drawable.share_seek_help, title = "故障求助"))
|
||||
generateShareButton(FixableButton(poiType = IMogoTanluProvider.TYPE_STAGNANT_WATER, iconRes = R.drawable.share_stagnant_water, title = "道路积水"))
|
||||
generateShareButton(FixableButton(poiType = IMogoTanluProvider.TYPE_ROAD_ICY, iconRes = R.drawable.share_road_icy, title = "道路结冰"))
|
||||
generateShareButton(FixableButton(poiType = IMogoTanluProvider.TYPE_DENSE_FOG, iconRes = R.drawable.share_dense_fog, title = "浓雾"))
|
||||
}else{
|
||||
val btnList = GsonUtil.arrayFromJson(config, FixableButton::class.java)
|
||||
btnList.forEach {btn->
|
||||
generateShareButton(btn)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private var btnClickListener: ((fixableButton: FixableButton) -> Unit)? = null
|
||||
|
||||
@@ -2,7 +2,9 @@ package com.mogo.module.share.net
|
||||
|
||||
import com.mogo.commons.data.BaseData
|
||||
import com.mogo.module.share.bean.AverateSpeedResponse
|
||||
import com.mogo.module.share.bean.ShareButtonConfigResponse
|
||||
import io.reactivex.Observable
|
||||
import io.reactivex.Single
|
||||
import okhttp3.RequestBody
|
||||
import retrofit2.http.*
|
||||
|
||||
@@ -23,4 +25,11 @@ interface ShareApiService {
|
||||
@Headers("Content-type:application/json;charset=UTF-8")
|
||||
@POST("/deva/car/path/no/poiStrategyCheck/v1")
|
||||
fun sendAverageSpeedForBlockStrategy(@Body request:RequestBody,@Query("sn") sn:String):Observable<AverateSpeedResponse>
|
||||
|
||||
/**
|
||||
* 获取分享框服务端配置
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("/yycp-geoIndex-preSearch-service/car/search/no/searchNearbyInformation/v1")
|
||||
fun queryShareButtonConfig(@FieldMap param: Map<String, String>):Observable<ShareButtonConfigResponse>
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/share_module_height"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/module_share_dialog_bg"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="65px"
|
||||
android:paddingRight="65px"
|
||||
android:paddingBottom="58px">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btn_share_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/share_module_title_margin_top"
|
||||
android:drawableLeft="@drawable/module_share_title_icon_left"
|
||||
android:drawableRight="@drawable/module_share_title_icon_right"
|
||||
android:drawablePadding="@dimen/dp_40"
|
||||
android:text="我要分享"
|
||||
android:textColor="@color/module_share_dialog_title_text_color"
|
||||
android:textSize="@dimen/share_module_title_content"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/moduleShareBtnRecyclerView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="44px" />
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
@@ -485,7 +485,7 @@ public class TanluSlideAdapterNew extends RecyclerView.Adapter<TanluSlideViewHol
|
||||
typeName = "实时路况";
|
||||
break;
|
||||
default:
|
||||
typeName = "道路拥堵";
|
||||
typeName = "实时路况";
|
||||
break;
|
||||
}
|
||||
return typeName;
|
||||
|
||||
@@ -80,7 +80,8 @@
|
||||
<dimen name="tanlu_module_card_height">300px</dimen>
|
||||
<dimen name="tanlu_module_card_video_width">480px</dimen>
|
||||
<dimen name="tanlu_module_card_video_height">270px</dimen>
|
||||
|
||||
<dimen name="tanlu_module_close_height">80px</dimen>
|
||||
|
||||
<dimen name="tanlu_module_card_margin_top">20px</dimen>
|
||||
<dimen name="tanlu_module_card_margin_left">15px</dimen>
|
||||
<dimen name="tanlu_module_margin_right">25px</dimen>
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
<dimen name="tanlu_module_card_height">350px</dimen>
|
||||
<dimen name="tanlu_module_card_video_width">480px</dimen>
|
||||
<dimen name="tanlu_module_card_video_height">320px</dimen>
|
||||
<dimen name="tanlu_module_close_height">45px</dimen>
|
||||
<dimen name="tanlu_module_close_height">80px</dimen>
|
||||
|
||||
<dimen name="tanlu_module_card_margin_top">23px</dimen>
|
||||
<dimen name="tanlu_module_card_margin_left">15px</dimen>
|
||||
|
||||
@@ -10,7 +10,6 @@ import com.mogo.module.common.entity.V2XMessageEntity;
|
||||
import com.mogo.module.v2x.V2XConst;
|
||||
import com.mogo.module.v2x.V2XServiceManager;
|
||||
import com.mogo.module.v2x.scenario.impl.AbsV2XScenario;
|
||||
import com.mogo.module.v2x.scenario.scene.seek.V2XSeekHelpButton;
|
||||
import com.mogo.module.v2x.utils.V2XUtils;
|
||||
import com.mogo.module.v2x.voice.V2XVoiceCallbackListener;
|
||||
import com.mogo.module.v2x.voice.V2XVoiceConstants;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.module.v2x.scenario.scene.seek;
|
||||
package com.mogo.module.v2x.scenario.scene.help;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.view.View;
|
||||
@@ -70,12 +70,12 @@ public class V2XSeekHelpButton implements IV2XButton {
|
||||
if (tv != null) {
|
||||
AIAssist.getInstance(V2XUtils.getApp()).speakTTSVoice("将为您取消", null);
|
||||
tv.setVisibility(View.GONE);
|
||||
V2XServiceManager
|
||||
.getV2XRefreshModel().cancelHelpSignal(new V2XRefreshCallback<BaseData>() {
|
||||
V2XServiceManager.getV2XRefreshModel().cancelHelpSignal(new V2XRefreshCallback<BaseData>() {
|
||||
@Override
|
||||
public void onSuccess(BaseData result) {
|
||||
tv.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFail(String msg) {
|
||||
tv.setVisibility(View.VISIBLE);
|
||||
@@ -85,6 +85,7 @@ public class V2XSeekHelpButton implements IV2XButton {
|
||||
}
|
||||
unRegisterVoice();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerVoice() {
|
||||
V2XVoiceManager.INSTANCE.registerWakeCmd(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_CANCEL_HELP, cancelCb);
|
||||
@@ -2,13 +2,14 @@ package com.mogo.service.share;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.alibaba.android.arouter.facade.template.IProvider;
|
||||
import com.mogo.service.module.IMogoModuleProvider;
|
||||
|
||||
/**
|
||||
* 分享框管理接口
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public interface IMogoShareManager extends IMogoModuleProvider {
|
||||
public interface IMogoShareManager extends IProvider {
|
||||
/**
|
||||
* 显示分享框
|
||||
*/
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
include ':test:crashreport'
|
||||
include ':test:crashreport-bugly'
|
||||
include ':test:crashreport-noop'
|
||||
include ':skin:skin-support'
|
||||
include ':skin:skin-support-appcompat'
|
||||
include ':skin:skin-support-cardview'
|
||||
@@ -54,3 +57,4 @@ include ':modules:mogo-module-guide'
|
||||
include ':modules:mogo-module-tanlu'
|
||||
include ':libraries:tanlulib'
|
||||
include ':skin'
|
||||
include ':test'
|
||||
|
||||
@@ -1,98 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!--bottom top -->
|
||||
<dimen name="tanlu_module_start_width">98px</dimen>
|
||||
<dimen name="tanlu_module_start_height">98px</dimen>
|
||||
<dimen name="tanlu_module_loading_width">48px</dimen>
|
||||
<dimen name="tanlu_module_loading_height">48px</dimen>
|
||||
<dimen name="tanlu_module_bottom_height">72px</dimen>
|
||||
<dimen name="tanlu_module_bottom_margin">5px</dimen>
|
||||
|
||||
<dimen name="tanlu_module_full_start_width">106px</dimen>
|
||||
<dimen name="tanlu_module_full_start_height">106px</dimen>
|
||||
<dimen name="tanlu_module_full_loading_width">96px</dimen>
|
||||
<dimen name="tanlu_module_full_loading_height">96px</dimen>
|
||||
<dimen name="tanlu_module_full_bottom_height">100px</dimen>
|
||||
<dimen name="tanlu_module_full_bottom_width">700px</dimen>
|
||||
<dimen name="tanlu_module_full_bottom_margin">12px</dimen>
|
||||
|
||||
<dimen name="tanlu_module_full_top_height">135px</dimen>
|
||||
<dimen name="tanlu_module_full_back_width">50px</dimen>
|
||||
<dimen name="tanlu_module_full_back_height">50px</dimen>
|
||||
<dimen name="tanlu_module_full_margin_left">30px</dimen>
|
||||
<dimen name="tanlu_module_full_margin_right">92px</dimen>
|
||||
<dimen name="tanlu_module_full_margin_top">40px</dimen>
|
||||
<dimen name="tanlu_module_full_margin_width">800px</dimen>
|
||||
|
||||
<dimen name="tanlu_module_card_address_margin_top">30px</dimen>
|
||||
<dimen name="tanlu_module_card_distance_margin_bottom">28px</dimen>
|
||||
<dimen name="tanlu_module_card_distance_margin_top">4px</dimen>
|
||||
<dimen name="tanlu_module_card_video_marginbottom">32px</dimen>
|
||||
<dimen name="tanlu_module_card_previous_width">255px</dimen>
|
||||
<dimen name="tanlu_module_card_previous_height">82px</dimen>
|
||||
<dimen name="tanlu_module_card_empty_magintop">2px</dimen>
|
||||
<dimen name="tanlu_module_card_empty_maginleft">205px</dimen>
|
||||
<dimen name="tanlu_module_card_empty_tv_magintop">20px</dimen>
|
||||
<dimen name="tanlu_module_card_empty_tv_magintop_2">40px</dimen>
|
||||
<dimen name="tanlu_module_card_previous_margin_left">60px</dimen>
|
||||
<dimen name="tanlu_module_card_next_margin_left">50px</dimen>
|
||||
<dimen name="tanlu_module_logo_margin_left">32px</dimen>
|
||||
<dimen name="tanlu_module_radius">40px</dimen>
|
||||
<dimen name="tanlu_module_upload_radius">50px</dimen>
|
||||
|
||||
<!--播放器高度-->
|
||||
<dimen name="tanlu_module_small_player_height">10px</dimen>
|
||||
|
||||
<dimen name="tanlu_module_map_left">750px</dimen>
|
||||
<dimen name="tanlu_module_map_top">270px</dimen>
|
||||
<dimen name="tanlu_module_map_right">120px</dimen>
|
||||
<dimen name="tanlu_module_map_bottom">60px</dimen>
|
||||
|
||||
<dimen name="tanlu_module_upload_width">488px</dimen>
|
||||
<dimen name="tanlu_module_map_bottom_height">82px</dimen>
|
||||
|
||||
<!--字体-->
|
||||
<dimen name="tanlu_module_full_title_content">34px</dimen>
|
||||
<dimen name="tanlu_module_full_title_time">24px</dimen>
|
||||
<dimen name="tanlu_module_card_address_size">28px</dimen>
|
||||
<dimen name="tanlu_module_card_distance_size">26px</dimen>
|
||||
<dimen name="tanlu_module_card_next_size">30px</dimen>
|
||||
|
||||
<!--dialog-->
|
||||
<dimen name="tanlu_dialog_width">790px</dimen>
|
||||
<dimen name="tanlu_dialog_height">524px</dimen>
|
||||
<dimen name="tanlu_dialog_button_height">130px</dimen>
|
||||
<dimen name="tanlu_dialog_content_size">40px</dimen>
|
||||
<dimen name="tanlu_dialog_margin_top">66px</dimen>
|
||||
<dimen name="tanlu_dialog_first_margin_top">36px</dimen>
|
||||
<dimen name="tanlu_dialog_margin_button_top">59px</dimen>
|
||||
|
||||
<dimen name="tanlu_dialog_neterror_button_top">44px</dimen>
|
||||
<dimen name="tanlu_dialog_neterror_button_height">105px</dimen>
|
||||
<dimen name="tanlu_dialog_neterror_margin_left">44px</dimen>
|
||||
|
||||
<dimen name="tanlu_dialog_radius">20px</dimen>
|
||||
<dimen name="tanlu_dialog_neterror_radius">16px</dimen>
|
||||
|
||||
<!--new-->
|
||||
<dimen name="tanlu_module_card_width">1060px</dimen>
|
||||
<dimen name="tanlu_module_card_height">350px</dimen>
|
||||
<dimen name="tanlu_module_card_video_width">480px</dimen>
|
||||
<dimen name="tanlu_module_card_video_height">320px</dimen>
|
||||
<dimen name="tanlu_module_close_height">45px</dimen>
|
||||
|
||||
<dimen name="tanlu_module_card_margin_top">23px</dimen>
|
||||
<dimen name="tanlu_module_card_margin_left">15px</dimen>
|
||||
<dimen name="tanlu_module_margin_right">25px</dimen>
|
||||
<dimen name="tanlu_module_margin_left">15px</dimen>
|
||||
<dimen name="tanlu_module_margin_top">10px</dimen>
|
||||
<dimen name="tanlu_module_mavi_height">27px</dimen>
|
||||
<dimen name="tanlu_module_button_height">46px</dimen>
|
||||
|
||||
<dimen name="tanlu_head_image_size">50px</dimen>
|
||||
<dimen name="tanlu_image_size">98px</dimen>
|
||||
<dimen name="tanlu_button_radius_size">6px</dimen>
|
||||
<dimen name="tanlu_normal_image_radius_size">30px</dimen>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -1,98 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!--bottom top -->
|
||||
<dimen name="tanlu_module_start_width">98px</dimen>
|
||||
<dimen name="tanlu_module_start_height">98px</dimen>
|
||||
<dimen name="tanlu_module_loading_width">48px</dimen>
|
||||
<dimen name="tanlu_module_loading_height">48px</dimen>
|
||||
<dimen name="tanlu_module_bottom_height">72px</dimen>
|
||||
<dimen name="tanlu_module_bottom_margin">5px</dimen>
|
||||
|
||||
<dimen name="tanlu_module_full_start_width">106px</dimen>
|
||||
<dimen name="tanlu_module_full_start_height">106px</dimen>
|
||||
<dimen name="tanlu_module_full_loading_width">96px</dimen>
|
||||
<dimen name="tanlu_module_full_loading_height">96px</dimen>
|
||||
<dimen name="tanlu_module_full_bottom_height">100px</dimen>
|
||||
<dimen name="tanlu_module_full_bottom_width">700px</dimen>
|
||||
<dimen name="tanlu_module_full_bottom_margin">12px</dimen>
|
||||
|
||||
<dimen name="tanlu_module_full_top_height">135px</dimen>
|
||||
<dimen name="tanlu_module_full_back_width">50px</dimen>
|
||||
<dimen name="tanlu_module_full_back_height">50px</dimen>
|
||||
<dimen name="tanlu_module_full_margin_left">30px</dimen>
|
||||
<dimen name="tanlu_module_full_margin_right">92px</dimen>
|
||||
<dimen name="tanlu_module_full_margin_top">40px</dimen>
|
||||
<dimen name="tanlu_module_full_margin_width">800px</dimen>
|
||||
|
||||
<dimen name="tanlu_module_card_address_margin_top">30px</dimen>
|
||||
<dimen name="tanlu_module_card_distance_margin_bottom">28px</dimen>
|
||||
<dimen name="tanlu_module_card_distance_margin_top">4px</dimen>
|
||||
<dimen name="tanlu_module_card_video_marginbottom">32px</dimen>
|
||||
<dimen name="tanlu_module_card_previous_width">255px</dimen>
|
||||
<dimen name="tanlu_module_card_previous_height">82px</dimen>
|
||||
<dimen name="tanlu_module_card_empty_magintop">2px</dimen>
|
||||
<dimen name="tanlu_module_card_empty_maginleft">205px</dimen>
|
||||
<dimen name="tanlu_module_card_empty_tv_magintop">20px</dimen>
|
||||
<dimen name="tanlu_module_card_empty_tv_magintop_2">40px</dimen>
|
||||
<dimen name="tanlu_module_card_previous_margin_left">60px</dimen>
|
||||
<dimen name="tanlu_module_card_next_margin_left">50px</dimen>
|
||||
<dimen name="tanlu_module_logo_margin_left">32px</dimen>
|
||||
<dimen name="tanlu_module_radius">40px</dimen>
|
||||
<dimen name="tanlu_module_upload_radius">50px</dimen>
|
||||
|
||||
<!--播放器高度-->
|
||||
<dimen name="tanlu_module_small_player_height">10px</dimen>
|
||||
|
||||
<dimen name="tanlu_module_map_left">750px</dimen>
|
||||
<dimen name="tanlu_module_map_top">270px</dimen>
|
||||
<dimen name="tanlu_module_map_right">120px</dimen>
|
||||
<dimen name="tanlu_module_map_bottom">60px</dimen>
|
||||
|
||||
<dimen name="tanlu_module_upload_width">488px</dimen>
|
||||
<dimen name="tanlu_module_map_bottom_height">82px</dimen>
|
||||
|
||||
<!--字体-->
|
||||
<dimen name="tanlu_module_full_title_content">34px</dimen>
|
||||
<dimen name="tanlu_module_full_title_time">24px</dimen>
|
||||
<dimen name="tanlu_module_card_address_size">28px</dimen>
|
||||
<dimen name="tanlu_module_card_distance_size">26px</dimen>
|
||||
<dimen name="tanlu_module_card_next_size">30px</dimen>
|
||||
|
||||
<!--dialog-->
|
||||
<dimen name="tanlu_dialog_width">790px</dimen>
|
||||
<dimen name="tanlu_dialog_height">524px</dimen>
|
||||
<dimen name="tanlu_dialog_button_height">130px</dimen>
|
||||
<dimen name="tanlu_dialog_content_size">40px</dimen>
|
||||
<dimen name="tanlu_dialog_margin_top">66px</dimen>
|
||||
<dimen name="tanlu_dialog_first_margin_top">36px</dimen>
|
||||
<dimen name="tanlu_dialog_margin_button_top">59px</dimen>
|
||||
|
||||
<dimen name="tanlu_dialog_neterror_button_top">44px</dimen>
|
||||
<dimen name="tanlu_dialog_neterror_button_height">105px</dimen>
|
||||
<dimen name="tanlu_dialog_neterror_margin_left">44px</dimen>
|
||||
|
||||
<dimen name="tanlu_dialog_radius">20px</dimen>
|
||||
<dimen name="tanlu_dialog_neterror_radius">16px</dimen>
|
||||
|
||||
<!--new-->
|
||||
<dimen name="tanlu_module_card_width">1060px</dimen>
|
||||
<dimen name="tanlu_module_card_height">350px</dimen>
|
||||
<dimen name="tanlu_module_card_video_width">480px</dimen>
|
||||
<dimen name="tanlu_module_card_video_height">320px</dimen>
|
||||
<dimen name="tanlu_module_close_height">45px</dimen>
|
||||
|
||||
<dimen name="tanlu_module_card_margin_top">23px</dimen>
|
||||
<dimen name="tanlu_module_card_margin_left">15px</dimen>
|
||||
<dimen name="tanlu_module_margin_right">25px</dimen>
|
||||
<dimen name="tanlu_module_margin_left">15px</dimen>
|
||||
<dimen name="tanlu_module_margin_top">10px</dimen>
|
||||
<dimen name="tanlu_module_mavi_height">27px</dimen>
|
||||
<dimen name="tanlu_module_button_height">46px</dimen>
|
||||
|
||||
<dimen name="tanlu_head_image_size">50px</dimen>
|
||||
<dimen name="tanlu_image_size">98px</dimen>
|
||||
<dimen name="tanlu_button_radius_size">6px</dimen>
|
||||
<dimen name="tanlu_normal_image_radius_size">30px</dimen>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -1,98 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!--bottom top -->
|
||||
<dimen name="tanlu_module_start_width">52px</dimen>
|
||||
<dimen name="tanlu_module_start_height">52px</dimen>
|
||||
<dimen name="tanlu_module_loading_width">48px</dimen>
|
||||
<dimen name="tanlu_module_loading_height">48px</dimen>
|
||||
<dimen name="tanlu_module_bottom_height">72px</dimen>
|
||||
<dimen name="tanlu_module_bottom_margin">5px</dimen>
|
||||
|
||||
<dimen name="tanlu_module_full_start_width">56px</dimen>
|
||||
<dimen name="tanlu_module_full_start_height">56px</dimen>
|
||||
<dimen name="tanlu_module_full_loading_width">96px</dimen>
|
||||
<dimen name="tanlu_module_full_loading_height">96px</dimen>
|
||||
<dimen name="tanlu_module_full_bottom_height">90px</dimen>
|
||||
<dimen name="tanlu_module_full_bottom_width">700px</dimen>
|
||||
<dimen name="tanlu_module_full_bottom_margin">10px</dimen>
|
||||
|
||||
<dimen name="tanlu_module_full_top_height">72px</dimen>
|
||||
<dimen name="tanlu_module_full_back_width">25px</dimen>
|
||||
<dimen name="tanlu_module_full_back_height">25px</dimen>
|
||||
<dimen name="tanlu_module_full_margin_left">16px</dimen>
|
||||
<dimen name="tanlu_module_full_margin_right">48px</dimen>
|
||||
<dimen name="tanlu_module_full_margin_top">22px</dimen>
|
||||
<dimen name="tanlu_module_full_margin_width">700px</dimen>
|
||||
|
||||
|
||||
<dimen name="tanlu_module_card_address_margin_top">10px</dimen>
|
||||
<dimen name="tanlu_module_card_distance_margin_bottom">15px</dimen>
|
||||
<dimen name="tanlu_module_card_distance_margin_top">2px</dimen>
|
||||
<dimen name="tanlu_module_card_video_marginbottom">19px</dimen>
|
||||
<dimen name="tanlu_module_card_previous_width">136px</dimen>
|
||||
<dimen name="tanlu_module_card_previous_height">44px</dimen>
|
||||
<dimen name="tanlu_module_card_empty_magintop">2px</dimen>
|
||||
<dimen name="tanlu_module_card_empty_maginleft">109px</dimen>
|
||||
<dimen name="tanlu_module_card_empty_tv_magintop">10px</dimen>
|
||||
<dimen name="tanlu_module_card_empty_tv_magintop_2">23px</dimen>
|
||||
<dimen name="tanlu_module_card_previous_margin_left">30px</dimen>
|
||||
<dimen name="tanlu_module_card_next_margin_left">28px</dimen>
|
||||
<dimen name="tanlu_module_logo_margin_left">16px</dimen>
|
||||
<dimen name="tanlu_module_radius">22px</dimen>
|
||||
<dimen name="tanlu_module_upload_radius">26px</dimen>
|
||||
|
||||
<!--播放器高度-->
|
||||
<dimen name="tanlu_module_small_player_height">6px</dimen>
|
||||
|
||||
<dimen name="tanlu_module_map_left">400px</dimen>
|
||||
<dimen name="tanlu_module_map_top">150px</dimen>
|
||||
<dimen name="tanlu_module_map_right">80px</dimen>
|
||||
<dimen name="tanlu_module_map_bottom">32px</dimen>
|
||||
|
||||
<dimen name="tanlu_module_upload_width">260px</dimen>
|
||||
<dimen name="tanlu_module_map_bottom_height">44px</dimen>
|
||||
|
||||
<!--字体-->
|
||||
<dimen name="tanlu_module_full_title_content">18px</dimen>
|
||||
<dimen name="tanlu_module_full_title_time">14px</dimen>
|
||||
<dimen name="tanlu_module_card_address_size">15px</dimen>
|
||||
<dimen name="tanlu_module_card_distance_size">13px</dimen>
|
||||
<dimen name="tanlu_module_card_next_size">16px</dimen>
|
||||
|
||||
<!--dialog-->
|
||||
<dimen name="tanlu_dialog_width">418px</dimen>
|
||||
<dimen name="tanlu_dialog_height">278px</dimen>
|
||||
<dimen name="tanlu_dialog_button_height">69px</dimen>
|
||||
<dimen name="tanlu_dialog_content_size">22px</dimen>
|
||||
<dimen name="tanlu_dialog_margin_top">36px</dimen>
|
||||
<dimen name="tanlu_dialog_first_margin_top">18px</dimen>
|
||||
<dimen name="tanlu_dialog_margin_button_top">32px</dimen>
|
||||
|
||||
<dimen name="tanlu_dialog_neterror_button_top">20px</dimen>
|
||||
<dimen name="tanlu_dialog_neterror_button_height">56px</dimen>
|
||||
<dimen name="tanlu_dialog_neterror_margin_left">23px</dimen>
|
||||
|
||||
<dimen name="tanlu_dialog_radius">10px</dimen>
|
||||
<dimen name="tanlu_dialog_neterror_radius">8px</dimen>
|
||||
|
||||
<!--new-->
|
||||
<dimen name="tanlu_module_card_width">642px</dimen>
|
||||
<dimen name="tanlu_module_card_height">194px</dimen>
|
||||
<dimen name="tanlu_module_card_video_width">266px</dimen>
|
||||
<dimen name="tanlu_module_card_video_height">194px</dimen>
|
||||
<dimen name="tanlu_module_close_height">45px</dimen>
|
||||
|
||||
<dimen name="tanlu_module_card_margin_top">16px</dimen>
|
||||
<dimen name="tanlu_module_card_margin_left">8px</dimen>
|
||||
<dimen name="tanlu_module_margin_right">13px</dimen>
|
||||
<dimen name="tanlu_module_margin_left">15px</dimen>
|
||||
<dimen name="tanlu_module_margin_top">10px</dimen>
|
||||
<dimen name="tanlu_module_mavi_height">18px</dimen>
|
||||
<dimen name="tanlu_module_button_height">26px</dimen>
|
||||
|
||||
<dimen name="tanlu_head_image_size">28px</dimen>
|
||||
<dimen name="tanlu_image_size">56px</dimen>
|
||||
<dimen name="tanlu_button_radius_size">3px</dimen>
|
||||
<dimen name="tanlu_normal_image_radius_size">16px</dimen>
|
||||
|
||||
</resources>
|
||||
1
test/crashreport-bugly/.gitignore
vendored
Normal file
1
test/crashreport-bugly/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/build
|
||||
58
test/crashreport-bugly/build.gradle
Normal file
58
test/crashreport-bugly/build.gradle
Normal file
@@ -0,0 +1,58 @@
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'com.alibaba.arouter'
|
||||
|
||||
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"
|
||||
|
||||
ndk {
|
||||
// 设置支持的SO库架构
|
||||
abiFilters 'armeabi' //, 'x86', 'armeabi-v7a', 'x86_64', 'arm64-v8a'
|
||||
}
|
||||
|
||||
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.androidxappcompat
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
annotationProcessor rootProject.ext.dependencies.aroutercompiler
|
||||
|
||||
if (Boolean.valueOf(RELEASE)) {
|
||||
implementation rootProject.ext.dependencies.crashreport
|
||||
implementation rootProject.ext.dependencies.mogoutils
|
||||
implementation rootProject.ext.dependencies.mogocommons
|
||||
} else {
|
||||
implementation project(":test:crashreport")
|
||||
implementation project(":foudations:mogo-utils")
|
||||
implementation project(":foudations:mogo-commons")
|
||||
}
|
||||
|
||||
implementation 'com.tencent.bugly:crashreport:latest.release'
|
||||
//其中latest.release指代最新Bugly SDK版本号,也可以指定明确的版本号,例如2.1.9
|
||||
implementation 'com.tencent.bugly:nativecrashreport:latest.release'
|
||||
//其中latest.release指代最新Bugly NDK版本号,也可以指定明确的版本号,例如3.0
|
||||
}
|
||||
|
||||
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()
|
||||
0
test/crashreport-bugly/consumer-rules.pro
Normal file
0
test/crashreport-bugly/consumer-rules.pro
Normal file
3
test/crashreport-bugly/gradle.properties
Normal file
3
test/crashreport-bugly/gradle.properties
Normal file
@@ -0,0 +1,3 @@
|
||||
GROUP=com.mogo.test
|
||||
POM_ARTIFACT_ID=crashreport-bugly
|
||||
VERSION_CODE=1
|
||||
21
test/crashreport-bugly/proguard-rules.pro
vendored
Normal file
21
test/crashreport-bugly/proguard-rules.pro
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
# 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
|
||||
5
test/crashreport-bugly/src/main/AndroidManifest.xml
Normal file
5
test/crashreport-bugly/src/main/AndroidManifest.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.mogo.test.crashreport.bugly">
|
||||
|
||||
/
|
||||
</manifest>
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.mogo.test.crashreport.bugly;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.test.crashreport.CrashReportConstants;
|
||||
import com.mogo.test.crashreport.ITestCrashReportProvider;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.tencent.bugly.crashreport.CrashReport;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
|
||||
public
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020/9/9
|
||||
*
|
||||
* 描述
|
||||
*/
|
||||
@Route( path = CrashReportConstants.PATH )
|
||||
class BuglyCrashReportProvider implements ITestCrashReportProvider {
|
||||
|
||||
private static final String TAG = "BuglyCrashReportProvider";
|
||||
|
||||
@Override
|
||||
public void init( Context context ) {
|
||||
Logger.d(TAG, "init");
|
||||
String packageName = context.getPackageName();
|
||||
String processName = getProcessName( android.os.Process.myPid() );
|
||||
CrashReport.UserStrategy strategy = new CrashReport.UserStrategy( context );
|
||||
strategy.setUploadProcess( processName == null || processName.equals( packageName ) );
|
||||
CrashReport.initCrashReport( context, "f3f8b0b2f1", true, strategy );
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取进程号对应的进程名
|
||||
*
|
||||
* @param pid 进程号
|
||||
* @return 进程名
|
||||
*/
|
||||
private static String getProcessName( int pid ) {
|
||||
BufferedReader reader = null;
|
||||
try {
|
||||
reader = new BufferedReader( new FileReader( "/proc/" + pid + "/cmdline" ) );
|
||||
String processName = reader.readLine();
|
||||
if ( !TextUtils.isEmpty( processName ) ) {
|
||||
processName = processName.trim();
|
||||
}
|
||||
return processName;
|
||||
} catch ( Throwable throwable ) {
|
||||
throwable.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
if ( reader != null ) {
|
||||
reader.close();
|
||||
}
|
||||
} catch ( IOException exception ) {
|
||||
exception.printStackTrace();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
1
test/crashreport-noop/.gitignore
vendored
Normal file
1
test/crashreport-noop/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/build
|
||||
58
test/crashreport-noop/build.gradle
Normal file
58
test/crashreport-noop/build.gradle
Normal file
@@ -0,0 +1,58 @@
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'com.alibaba.arouter'
|
||||
|
||||
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"
|
||||
|
||||
ndk {
|
||||
// 设置支持的SO库架构
|
||||
abiFilters 'armeabi' //, 'x86', 'armeabi-v7a', 'x86_64', 'arm64-v8a'
|
||||
}
|
||||
|
||||
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.androidxappcompat
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
annotationProcessor rootProject.ext.dependencies.aroutercompiler
|
||||
|
||||
if (Boolean.valueOf(RELEASE)) {
|
||||
implementation rootProject.ext.dependencies.crashreport
|
||||
implementation rootProject.ext.dependencies.mogoutils
|
||||
implementation rootProject.ext.dependencies.mogocommons
|
||||
} else {
|
||||
implementation project(":test:crashreport")
|
||||
implementation project(":foudations:mogo-utils")
|
||||
implementation project(":foudations:mogo-commons")
|
||||
}
|
||||
|
||||
implementation 'com.tencent.bugly:crashreport:latest.release'
|
||||
//其中latest.release指代最新Bugly SDK版本号,也可以指定明确的版本号,例如2.1.9
|
||||
implementation 'com.tencent.bugly:nativecrashreport:latest.release'
|
||||
//其中latest.release指代最新Bugly NDK版本号,也可以指定明确的版本号,例如3.0
|
||||
}
|
||||
|
||||
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()
|
||||
0
test/crashreport-noop/consumer-rules.pro
Normal file
0
test/crashreport-noop/consumer-rules.pro
Normal file
3
test/crashreport-noop/gradle.properties
Normal file
3
test/crashreport-noop/gradle.properties
Normal file
@@ -0,0 +1,3 @@
|
||||
GROUP=com.mogo.test
|
||||
POM_ARTIFACT_ID=crashreport-noop
|
||||
VERSION_CODE=1
|
||||
21
test/crashreport-noop/proguard-rules.pro
vendored
Normal file
21
test/crashreport-noop/proguard-rules.pro
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
# 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
|
||||
5
test/crashreport-noop/src/main/AndroidManifest.xml
Normal file
5
test/crashreport-noop/src/main/AndroidManifest.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.mogo.test.crashreport.noop">
|
||||
|
||||
/
|
||||
</manifest>
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.mogo.test.crashreport.noop;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.test.crashreport.CrashReportConstants;
|
||||
import com.mogo.test.crashreport.ITestCrashReportProvider;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
public
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020/9/9
|
||||
*
|
||||
* 描述
|
||||
*/
|
||||
@Route( path = CrashReportConstants.PATH )
|
||||
class NoopCrashReportProvider implements ITestCrashReportProvider {
|
||||
|
||||
private static final String TAG = "NoopCrashReportProvider";
|
||||
|
||||
@Override
|
||||
public void init( Context context ) {
|
||||
Logger.d(TAG, "init");
|
||||
}
|
||||
}
|
||||
1
test/crashreport/.gitignore
vendored
Normal file
1
test/crashreport/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/build
|
||||
46
test/crashreport/build.gradle
Normal file
46
test/crashreport/build.gradle
Normal file
@@ -0,0 +1,46 @@
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'com.alibaba.arouter'
|
||||
|
||||
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.androidxappcompat
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
annotationProcessor rootProject.ext.dependencies.aroutercompiler
|
||||
|
||||
if (Boolean.valueOf(RELEASE)) {
|
||||
implementation rootProject.ext.dependencies.mogoutils
|
||||
implementation rootProject.ext.dependencies.mogocommons
|
||||
} else {
|
||||
implementation project(":foudations:mogo-utils")
|
||||
implementation project(":foudations:mogo-commons")
|
||||
}
|
||||
}
|
||||
|
||||
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()
|
||||
0
test/crashreport/consumer-rules.pro
Normal file
0
test/crashreport/consumer-rules.pro
Normal file
3
test/crashreport/gradle.properties
Normal file
3
test/crashreport/gradle.properties
Normal file
@@ -0,0 +1,3 @@
|
||||
GROUP=com.mogo.test
|
||||
POM_ARTIFACT_ID=crashreport
|
||||
VERSION_CODE=1
|
||||
21
test/crashreport/proguard-rules.pro
vendored
Normal file
21
test/crashreport/proguard-rules.pro
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
# 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
|
||||
5
test/crashreport/src/main/AndroidManifest.xml
Normal file
5
test/crashreport/src/main/AndroidManifest.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.mogo.test.crashreport">
|
||||
|
||||
/
|
||||
</manifest>
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.mogo.test.crashreport;
|
||||
|
||||
public
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020/9/9
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
class CrashReportConstants {
|
||||
|
||||
public static final String PATH = "/crashreport/api";
|
||||
|
||||
public static final String NAME = "CrashReportApi";
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.mogo.test.crashreport;
|
||||
|
||||
import com.alibaba.android.arouter.facade.template.IProvider;
|
||||
|
||||
public
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020/9/9
|
||||
*
|
||||
* 描述
|
||||
*/
|
||||
interface ITestCrashReportProvider extends IProvider {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user