Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -396,7 +396,10 @@ dependencies {
|
||||
apply from: "./functions/widgets.gradle"
|
||||
apply from: "./functions/tts.gradle"
|
||||
|
||||
// implementation group: "com.tencent.matrix", name: "matrix-android-lib", version: '0.6.6', changing: true
|
||||
// implementation group: "com.tencent.matrix", name: "matrix-android-commons", version: '0.6.6', changing: true
|
||||
// implementation group: "com.tencent.matrix", name: "matrix-trace-canary", version:'0.6.6', changing: true
|
||||
// implementation group: "com.tencent.matrix", name: "matrix-io-canary", version: '0.6.6', changing: true
|
||||
|
||||
}
|
||||
|
||||
@@ -404,7 +407,7 @@ dependencies {
|
||||
//matrix {
|
||||
// trace {
|
||||
// enable = true //if you don't want to use trace canary, set false
|
||||
// baseMethodMapFile = "${project.buildDir}/matrix_output/Debug.methodmap"
|
||||
// baseMethodMapFile = "${project.projectDir}/matrixOutput/Debug.methodmap"
|
||||
// blackListFile = "${project.projectDir}/matrixTrace/blackMethodList.txt"
|
||||
// }
|
||||
//}
|
||||
@@ -425,3 +428,4 @@ android.applicationVariants.all { variant ->
|
||||
}
|
||||
|
||||
apply from: "./regroup.gradle"
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.mogo.launcher;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Process;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
@@ -27,6 +28,7 @@ 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.ProcessUtils;
|
||||
import com.mogo.utils.UiThreadHandler;
|
||||
import com.mogo.utils.logger.LogLevel;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
@@ -90,7 +92,7 @@ public class MogoApplication extends AbsMogoApplication {
|
||||
MogoModulePaths.addBaseModule( new MogoModule( MogoServicePaths.PATH_MOGO_MONITOR, "MogoMonitor" ) );
|
||||
MogoModulePaths.addModule( new MogoModule( PushUIConstants.PATH, PushUIConstants.NAME ) );
|
||||
|
||||
MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_GLOBAL_UNWAKE,"GlobalUnwake"));
|
||||
MogoModulePaths.addBaseModule( new MogoModule( MogoServicePaths.PATH_GLOBAL_UNWAKE, "GlobalUnwake" ) );
|
||||
|
||||
if ( !DebugConfig.isLauncher() ) {
|
||||
PersistentManager.getInstance().initManager( this );
|
||||
@@ -109,13 +111,11 @@ public class MogoApplication extends AbsMogoApplication {
|
||||
|
||||
@Override
|
||||
protected boolean shouldInit() {
|
||||
return !LeakCanary.isInAnalyzerProcess( this );
|
||||
Logger.w( TAG, "evaluate shouldInit() with: %s", ProcessUtils.getProcessName( Process.myPid() ) );
|
||||
return ProcessUtils.isMainProcess( this );
|
||||
}
|
||||
|
||||
private void initDebugConfig() {
|
||||
if ( !shouldInit() ) {
|
||||
return;
|
||||
}
|
||||
DebugConfig.setNetMode( BuildConfig.NET_ENV );
|
||||
DebugConfig.setDebug( BuildConfig.DEBUG );
|
||||
DebugConfig.setLaunchLocationService( BuildConfig.LAUNCH_LOCATION_SERVICE );
|
||||
@@ -186,10 +186,12 @@ public class MogoApplication extends AbsMogoApplication {
|
||||
|
||||
private void prepareSocketAndLocationServices( IMogoServiceApis apis ) {
|
||||
apis.getSocketManagerApi( getApplicationContext() ).init( getApplicationContext(), DebugConfig.getSocketAppId() );
|
||||
apis.getLocationInfoApi().start();
|
||||
apis.getMapServiceApi().getSingletonLocationClient( getApplicationContext() ).addLocationListener( location -> {
|
||||
apis.getLocationInfoApi().provideLocation( location );
|
||||
} );
|
||||
if ( DebugConfig.getCarMachineType() != DebugConfig.CAR_MACHINE_TYPE_SELF_INNOVATE ) {
|
||||
apis.getLocationInfoApi().start();
|
||||
apis.getMapServiceApi().getSingletonLocationClient( getApplicationContext() ).addLocationListener( location -> {
|
||||
apis.getLocationInfoApi().provideLocation( location );
|
||||
} );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -144,7 +144,6 @@ public class SocketManager implements IMogoSocketManager, OnSocketReceiveCallbac
|
||||
if ( listener != null ) {
|
||||
listener.onAck( msgId );
|
||||
}
|
||||
Logger.d( TAG, "send message success: msgType = %d, appId = %s, productLine = %d", msgType, appId, productLine );
|
||||
} catch ( InvalidProtocolBufferException e ) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ public class ProcessUtils {
|
||||
* @param pid 进程号
|
||||
* @return 进程名
|
||||
*/
|
||||
private static String getProcessName( int pid ) {
|
||||
public static String getProcessName( int pid ) {
|
||||
BufferedReader reader = null;
|
||||
try {
|
||||
reader = new BufferedReader( new FileReader( "/proc/" + pid + "/cmdline" ) );
|
||||
|
||||
@@ -874,7 +874,7 @@ public class AMapNaviViewWrapper implements IMogoMapView,
|
||||
} else {
|
||||
if ( ( int ) location.getBearing() == 0
|
||||
&& mLastDriveLocationShadow != null ) {
|
||||
if ( mMyLocationMarker == null ) {
|
||||
if ( mMyLocationMarker == null || mMyLocationMarker.isRemoved() ) {
|
||||
initMyLocationMarker();
|
||||
}
|
||||
if ( mMyLocationMarker != null ) {
|
||||
|
||||
@@ -58,7 +58,6 @@ public class AutoNaviReceiver extends BroadcastReceiver {
|
||||
}
|
||||
|
||||
int keyType = intent.getIntExtra( "KEY_TYPE", 0 );
|
||||
Logger.d( TAG, "receive: keyType = %d", keyType );
|
||||
switch ( keyType ) {
|
||||
case 10001:
|
||||
handleAutoNaviInfo( context, intent );
|
||||
|
||||
@@ -213,8 +213,11 @@ class MainServiceController {
|
||||
}
|
||||
onSuccess {
|
||||
if (it.result != null) {
|
||||
Log.i(TAG, "upload message success id" + it.result.id)
|
||||
sendUgcStatusReceiver(it.result.id, mPoiType, mFromType)
|
||||
Log.i(TAG, "upload success id = " + it.result.id)
|
||||
Log.i(TAG, "upload success mFromType = $mFromType")
|
||||
if (mFromType == "6") {
|
||||
sendUgcStatusReceiver(it.result.id, mPoiType, mFromType)
|
||||
}
|
||||
}
|
||||
|
||||
trackUploadServer(1)
|
||||
@@ -224,7 +227,10 @@ class MainServiceController {
|
||||
onError {
|
||||
Log.i(TAG, "$it upload message ${it.message}")
|
||||
trackUploadServer(2)
|
||||
sendUgcStatusReceiver(0, mPoiType, mFromType)
|
||||
Log.i(TAG, "upload onError mFromType = $mFromType")
|
||||
if (mFromType == "6") {
|
||||
sendUgcStatusReceiver(0, mPoiType, mFromType)
|
||||
}
|
||||
// CosStatusController().videoAndThumbMap.clear()
|
||||
customSend?.invoke(false)
|
||||
}
|
||||
@@ -232,7 +238,7 @@ class MainServiceController {
|
||||
}
|
||||
|
||||
private fun sendUgcStatusReceiver(id: Long, type: String?, fromType: String?) {
|
||||
Log.e(TAG, "sendUgcStatusReceiver ----> id = $id ---type = $type --fromType = $fromType ")
|
||||
Log.d(TAG, "sendUgcStatusReceiver ----> id = $id ---type = $type --fromType = $fromType ")
|
||||
var intent = Intent()
|
||||
intent.action = "com.v2x.ugc.upload.status"
|
||||
intent.putExtra("id", id)
|
||||
|
||||
@@ -14,8 +14,16 @@ import java.lang.reflect.Method;
|
||||
*/
|
||||
public class CarSeries {
|
||||
|
||||
public static boolean isF8xxSeries(){
|
||||
return DebugConfig.getProductFlavor().startsWith( "f8" );
|
||||
private static boolean invokeFlag = false;
|
||||
private static boolean isF8xxSeries = false;
|
||||
|
||||
public static boolean isF8xxSeries() {
|
||||
if ( invokeFlag ) {
|
||||
return isF8xxSeries;
|
||||
}
|
||||
isF8xxSeries = DebugConfig.getProductFlavor().startsWith( "f8" );
|
||||
invokeFlag = true;
|
||||
return isF8xxSeries;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@@ -46,6 +54,12 @@ public class CarSeries {
|
||||
@Deprecated
|
||||
public static int CAR_SERIES = 0;
|
||||
|
||||
/**
|
||||
* Deprecated.
|
||||
* Use {@link DebugConfig#getProductFlavor()} instead.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Deprecated
|
||||
public static int getSeries() {
|
||||
if ( CAR_SERIES != 0 ) {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.mogo.module.extensions.entrance;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.graphics.Rect;
|
||||
import android.os.Bundle;
|
||||
import android.os.Debug;
|
||||
@@ -262,7 +261,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
});
|
||||
|
||||
mUploadRoadCondition.setOnLongClickListener(view -> {
|
||||
mApis.getMogoMonitorApi().showLogDebugDialog();
|
||||
mApis.getMogoMonitorApi().getMogoMonitorLog().showLogDebugDialog();
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -34,27 +34,27 @@ public abstract class BaseNaviInfoView {
|
||||
protected void fillNextCrossDistance( TextView target, TextView unit, int distance ) {
|
||||
if ( distance >= 1000 ) {
|
||||
target.setText( String.format( "%.1f", distance / 1000f ) );
|
||||
unit.setText( "km" );
|
||||
unit.setText( "公里" );
|
||||
} else {
|
||||
target.setText( distance + "" );
|
||||
unit.setText( "m" );
|
||||
unit.setText( "米" );
|
||||
}
|
||||
}
|
||||
|
||||
protected void fillFormatSurplusDistance( int m, StringBuilder builder ) {
|
||||
if ( m >= 1000 ) {
|
||||
builder.append( String.format( "%.1fkm", m / 1000f ) );
|
||||
builder.append( String.format( "%.1f公里", m / 1000f ) );
|
||||
} else {
|
||||
builder.append( m ).append( "m" );
|
||||
builder.append( m ).append( "米" );
|
||||
}
|
||||
}
|
||||
|
||||
protected String getFormatSurplusDistance( int m ) {
|
||||
if ( m >= 1000 ) {
|
||||
mFormatSurplusDistanceUnit = "km";
|
||||
mFormatSurplusDistanceUnit = "公里";
|
||||
return String.format( "%.1f", m / 1000f );
|
||||
} else {
|
||||
mFormatSurplusDistanceUnit = "m";
|
||||
mFormatSurplusDistanceUnit = "米";
|
||||
return String.format( "%d", m );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/module_ext_shadow_bkg" android:state_pressed="true" />
|
||||
<item android:drawable="@drawable/module_ext_shadow_bkg" android:state_pressed="false" />
|
||||
<item android:drawable="@drawable/module_ext_shadow_bkg" />
|
||||
</selector>
|
||||
@@ -20,7 +20,7 @@
|
||||
android:id="@+id/module_entrance_id_move2_current_location"
|
||||
android:layout_width="@dimen/module_ext_operation_panel_width"
|
||||
android:layout_height="@dimen/module_ext_operation_panel_move2_height"
|
||||
android:background="@drawable/module_ext_shadow_bkg"
|
||||
android:background="@drawable/module_ext_drawable_shadow_bg"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/module_map_ic_move2_current_location"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
|
||||
@@ -138,7 +138,6 @@
|
||||
<dimen name="module_ext_north_goneMarginTop">142px</dimen>
|
||||
<dimen name="module_ext_button_width">66px</dimen>
|
||||
<dimen name="module_ext_button_height">66px</dimen>
|
||||
<dimen name="module_ext_button_height_small">44px</dimen>
|
||||
<dimen name="module_ext_camera_button_marginTop">10px</dimen>
|
||||
<dimen name="module_ext_display_overview_textSize">12px</dimen>
|
||||
<dimen name="module_ext_display_overview_textSize_large">14px</dimen>
|
||||
|
||||
@@ -432,7 +432,6 @@ public class EventDispatchCenter implements
|
||||
@Override
|
||||
public void onLocationChanged( MogoLocation location ) {
|
||||
|
||||
final long start = System.currentTimeMillis();
|
||||
Iterator< IMogoLocationListener > iterator = MogoRegisterCenterHandler.getInstance().getLocationListeners();
|
||||
if ( iterator == null ) {
|
||||
return;
|
||||
@@ -447,7 +446,6 @@ public class EventDispatchCenter implements
|
||||
}
|
||||
}
|
||||
}
|
||||
Logger.i( TAG, "onLocationChanged event cost " + ( System.currentTimeMillis() - start ) + "ms" );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -187,7 +187,6 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
}
|
||||
} );
|
||||
|
||||
mServiceApis.getMogoMonitorApi().resetActivityContext( this );
|
||||
}
|
||||
|
||||
private void resetMapCenterPoint() {
|
||||
|
||||
@@ -52,8 +52,6 @@ class AutoNaviBroadcastIntentHandler implements IMogoIntentListener {
|
||||
int type = intent.getIntExtra( "EXTRA_TYPE", -1 );
|
||||
int operaType = intent.getIntExtra( "EXTRA_OPERA", -1 );
|
||||
|
||||
Logger.d( TAG, "action = %s, keyType=%s, type=%s, operType=%s", action, keyType, type, operaType );
|
||||
|
||||
if ( !TextUtils.equals( action, AUTONAVI_STANDARD_BROADCAST_RECV )
|
||||
&& !TextUtils.equals( action, AUTONAVI_STANDARD_BROADCAST_SEND ) ) {
|
||||
return;
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
package com.zhidao.mogo.module.monitor;
|
||||
|
||||
class MogoMonitorConst {
|
||||
public class MogoMonitorConst {
|
||||
|
||||
private MogoMonitorConst(){}
|
||||
|
||||
public static final String MODULE_NAME = "MogoMonitor";
|
||||
public static final String MODULE_PATH = "/monitor/api";
|
||||
|
||||
|
||||
@@ -1,28 +1,11 @@
|
||||
package com.zhidao.mogo.module.monitor;
|
||||
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.service.IMogoServiceApis;
|
||||
import com.mogo.service.connection.IMogoOnMessageListener;
|
||||
import com.mogo.service.monitor.IMogoMonitorLog;
|
||||
import com.mogo.service.monitor.IMogoMonitorProvider;
|
||||
import com.mogo.utils.logger.LogLevel;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.mogo.utils.network.NetConfig;
|
||||
import com.mogo.utils.network.utils.GsonUtil;
|
||||
import com.zhidao.mogo.module.monitor.bean.RemoteLogPushContent;
|
||||
import com.zhidao.mogo.module.monitor.dialog.ILogDialogListener;
|
||||
import com.zhidao.mogo.module.monitor.dialog.LogDebugDialog;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import com.zhidao.mogo.module.monitor.log.MogoLogMonitor;
|
||||
|
||||
/**
|
||||
* 应用监控模块provider
|
||||
@@ -30,153 +13,16 @@ import java.util.List;
|
||||
* @author tongchenfei
|
||||
*/
|
||||
@Route(path = MogoMonitorConst.MODULE_PATH)
|
||||
public class MogoMonitorProvider implements IMogoMonitorProvider,
|
||||
IMogoOnMessageListener<RemoteLogPushContent>, ILogDialogListener, Handler.Callback {
|
||||
private static final String TAG = MogoMonitorConst.MODULE_NAME;
|
||||
private static final int MSG_TRY_CLOSE_LOG = 1001;
|
||||
private static final String MANUAL_CATCH_PKG_NAME = "manual-catch-log";
|
||||
private Context context;
|
||||
private LogDebugDialog logDebugDialog;
|
||||
private RemoteLogPushContent manualContent = new RemoteLogPushContent(60,
|
||||
MANUAL_CATCH_PKG_NAME);
|
||||
private Handler handler = new Handler(this);
|
||||
@Override
|
||||
public void showLogDebugDialog() {
|
||||
logDebugDialog.show();
|
||||
}
|
||||
public class MogoMonitorProvider implements IMogoMonitorProvider {
|
||||
|
||||
@Override
|
||||
public void init(Context context) {
|
||||
this.context = context;
|
||||
IMogoServiceApis apis = MogoApisHandler.getInstance().getApis();
|
||||
apis.getSocketManagerApi(context).registerOnMessageListener(MogoMonitorConst.LOG_PUSH_TYPE, this);
|
||||
startRemoteCtrl();
|
||||
}
|
||||
|
||||
private void startRemoteCtrl(){
|
||||
Intent intent = new Intent("com.mogo.remotecontrol.action");
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
ComponentName comp = new ComponentName("com.mogo.remotecontrol",
|
||||
"com.mogo.remotecontrol.RemoteCtrlService");
|
||||
intent.setComponent(comp);
|
||||
context.startService(intent);
|
||||
Logger.d(TAG, "startRemoteCtrl");
|
||||
MogoLogMonitor.getInstance().init(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resetActivityContext(Context context) {
|
||||
this.context = context;
|
||||
logDebugDialog = new LogDebugDialog(context);
|
||||
logDebugDialog.setDialogListener(this);
|
||||
public IMogoMonitorLog getMogoMonitorLog() {
|
||||
return MogoLogMonitor.getInstance();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<RemoteLogPushContent> target() {
|
||||
return RemoteLogPushContent.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMsgReceived(RemoteLogPushContent obj) {
|
||||
Logger.d(TAG, "收到push消息: " + obj);
|
||||
switch (obj.getType()) {
|
||||
case MogoMonitorConst.START_CATCH_LOG:
|
||||
if(!catchingList.contains(obj.getPkgName())){
|
||||
startCatchLog(obj);
|
||||
}
|
||||
break;
|
||||
case MogoMonitorConst.STOP_CATCH_LOG:
|
||||
stopCatchLog(obj);
|
||||
break;
|
||||
case MogoMonitorConst.LOCAL_CONFIG_OPEN_LOG:
|
||||
openLoggerLevel();
|
||||
break;
|
||||
case MogoMonitorConst.LOCAL_CONFIG_CLOSE_LOG:
|
||||
closeLoggerLevel();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private List<String> catchingList = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
public void onLogStart() {
|
||||
// 这个是通过对话框点击开始的回调
|
||||
if(catchingList.contains(MANUAL_CATCH_PKG_NAME)){
|
||||
Toast.makeText(context, "已经在抓日志了", Toast.LENGTH_LONG).show();
|
||||
}else {
|
||||
Logger.d(TAG, "开始抓取日志====");
|
||||
manualContent.setType(MogoMonitorConst.START_CATCH_LOG);
|
||||
startCatchLog(manualContent);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void onLogStop() {
|
||||
// 这个是通过对话框点击结束的回调
|
||||
Logger.d(TAG,"结束抓取日志====");
|
||||
manualContent.setType(MogoMonitorConst.STOP_CATCH_LOG);
|
||||
stopCatchLog(manualContent);
|
||||
}
|
||||
|
||||
public void sendCtrlBroadcast(RemoteLogPushContent content) {
|
||||
startRemoteCtrl();
|
||||
|
||||
Intent intent = new Intent(MogoMonitorConst.BROADCAST_LOG_CTRL);
|
||||
intent.putExtra("content", GsonUtil.jsonFromObject(content));
|
||||
intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
|
||||
intent.addFlags(Intent.FLAG_EXCLUDE_STOPPED_PACKAGES);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
Logger.d(TAG, "sendCtrlBroadcast: " + content);
|
||||
context.sendBroadcast(intent);
|
||||
}
|
||||
|
||||
/**
|
||||
* 放开Logger的限制
|
||||
*/
|
||||
private void openLoggerLevel() {
|
||||
Logger.init(LogLevel.DEBUG);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据状态收紧Logger的限制
|
||||
*/
|
||||
private void closeLoggerLevel() {
|
||||
if(!catchingList.isEmpty()) {
|
||||
Logger.init(DebugConfig.isDebug() ? LogLevel.DEBUG : LogLevel.OFF);
|
||||
NetConfig.instance().setLoggable(DebugConfig.isDebug());
|
||||
}
|
||||
}
|
||||
|
||||
private void startCatchLog(RemoteLogPushContent content){
|
||||
catchingList.add(content.getPkgName());
|
||||
|
||||
long delay = content.getDuration() * 60 * 1000;
|
||||
handler.removeMessages(MSG_TRY_CLOSE_LOG);
|
||||
if (delay <= 0) {
|
||||
// 如果push 下来的delay小于等于0,那就给个默认最大值一小时
|
||||
delay = 60 * 60 * 1000;
|
||||
}
|
||||
handler.sendEmptyMessageDelayed(MSG_TRY_CLOSE_LOG, delay);
|
||||
openLoggerLevel();
|
||||
sendCtrlBroadcast(content);
|
||||
}
|
||||
|
||||
private void stopCatchLog(RemoteLogPushContent content) {
|
||||
catchingList.remove(content.getPkgName());
|
||||
if (catchingList.isEmpty()) {
|
||||
handler.removeMessages(MSG_TRY_CLOSE_LOG);
|
||||
}
|
||||
sendCtrlBroadcast(content);
|
||||
closeLoggerLevel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleMessage(Message msg) {
|
||||
if (msg.what == MSG_TRY_CLOSE_LOG) {
|
||||
closeLoggerLevel();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,200 @@
|
||||
package com.zhidao.mogo.module.monitor.log;
|
||||
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.context.ContextHolderUtil;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.service.connection.IMogoOnMessageListener;
|
||||
import com.mogo.service.monitor.IMogoMonitorLog;
|
||||
import com.mogo.utils.logger.LogLevel;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.mogo.utils.network.NetConfig;
|
||||
import com.mogo.utils.network.utils.GsonUtil;
|
||||
import com.zhidao.mogo.module.monitor.MogoMonitorConst;
|
||||
import com.zhidao.mogo.module.monitor.MogoMonitorProvider;
|
||||
import com.zhidao.mogo.module.monitor.bean.RemoteLogPushContent;
|
||||
import com.zhidao.mogo.module.monitor.dialog.ILogDialogListener;
|
||||
import com.zhidao.mogo.module.monitor.dialog.LogDebugDialog;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static com.zhidao.mogo.module.monitor.MogoMonitorConst.LOG_PUSH_TYPE;
|
||||
import static com.zhidao.mogo.module.monitor.MogoMonitorConst.MODULE_NAME;
|
||||
|
||||
public class MogoLogMonitor implements IMogoOnMessageListener<RemoteLogPushContent>, IMogoMonitorLog,
|
||||
ILogDialogListener, Handler.Callback {
|
||||
|
||||
private static final String TAG = MODULE_NAME + "-Log";
|
||||
|
||||
private static volatile MogoLogMonitor mogoLogMonitor;
|
||||
|
||||
private MogoLogMonitor() {
|
||||
|
||||
}
|
||||
|
||||
public static MogoLogMonitor getInstance() {
|
||||
if (mogoLogMonitor == null) {
|
||||
synchronized (MogoLogMonitor.class) {
|
||||
if (mogoLogMonitor == null) {
|
||||
mogoLogMonitor = new MogoLogMonitor();
|
||||
}
|
||||
}
|
||||
}
|
||||
return mogoLogMonitor;
|
||||
}
|
||||
|
||||
private static final int MSG_TRY_CLOSE_LOG = 1001;
|
||||
private static final String MANUAL_CATCH_PKG_NAME = "manual-catch-log";
|
||||
private LogDebugDialog logDebugDialog;
|
||||
private RemoteLogPushContent manualContent = new RemoteLogPushContent(60,
|
||||
MANUAL_CATCH_PKG_NAME);
|
||||
|
||||
private Handler handler = new Handler(this);
|
||||
|
||||
private List<String> catchingList = new ArrayList<>();
|
||||
|
||||
public void init(Context context) {
|
||||
MogoApisHandler.getInstance().getApis()
|
||||
.getSocketManagerApi(AbsMogoApplication.getApp().getApplicationContext())
|
||||
.registerOnMessageListener(LOG_PUSH_TYPE, this);
|
||||
startRemoteCtrl(context);
|
||||
}
|
||||
|
||||
private void startRemoteCtrl(Context context) {
|
||||
Intent intent = new Intent("com.mogo.remotecontrol.action");
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
ComponentName comp = new ComponentName("com.mogo.remotecontrol",
|
||||
"com.mogo.remotecontrol.RemoteCtrlService");
|
||||
intent.setComponent(comp);
|
||||
context.startService(intent);
|
||||
Logger.d(TAG, "startRemoteCtrl");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleMessage(Message msg) {
|
||||
if (msg.what == MSG_TRY_CLOSE_LOG) {
|
||||
closeLoggerLevel();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<RemoteLogPushContent> target() {
|
||||
return RemoteLogPushContent.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMsgReceived(RemoteLogPushContent obj) {
|
||||
Logger.d(TAG, "收到push消息: " + obj);
|
||||
switch (obj.getType()) {
|
||||
case MogoMonitorConst.START_CATCH_LOG:
|
||||
if (!catchingList.contains(obj.getPkgName())) {
|
||||
startCatchLog(obj);
|
||||
}
|
||||
break;
|
||||
case MogoMonitorConst.STOP_CATCH_LOG:
|
||||
stopCatchLog(obj);
|
||||
break;
|
||||
case MogoMonitorConst.LOCAL_CONFIG_OPEN_LOG:
|
||||
openLoggerLevel();
|
||||
break;
|
||||
case MogoMonitorConst.LOCAL_CONFIG_CLOSE_LOG:
|
||||
closeLoggerLevel();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLogStart() {
|
||||
// 这个是通过对话框点击开始的回调
|
||||
if (catchingList.contains(MANUAL_CATCH_PKG_NAME)) {
|
||||
Toast.makeText(ContextHolderUtil.getContext(), "已经在抓日志了", Toast.LENGTH_LONG).show();
|
||||
} else {
|
||||
Logger.d(TAG, "开始抓取日志====");
|
||||
manualContent.setType(MogoMonitorConst.START_CATCH_LOG);
|
||||
startCatchLog(manualContent);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLogStop() {
|
||||
// 这个是通过对话框点击结束的回调
|
||||
Logger.d(TAG, "结束抓取日志====");
|
||||
manualContent.setType(MogoMonitorConst.STOP_CATCH_LOG);
|
||||
stopCatchLog(manualContent);
|
||||
}
|
||||
|
||||
public void sendCtrlBroadcast(RemoteLogPushContent content) {
|
||||
startRemoteCtrl(ContextHolderUtil.getContext());
|
||||
Intent intent = new Intent(MogoMonitorConst.BROADCAST_LOG_CTRL);
|
||||
intent.putExtra("content", GsonUtil.jsonFromObject(content));
|
||||
intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
|
||||
intent.addFlags(Intent.FLAG_EXCLUDE_STOPPED_PACKAGES);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
Logger.d(TAG, "sendCtrlBroadcast: " + content);
|
||||
ContextHolderUtil.getContext().sendBroadcast(intent);
|
||||
}
|
||||
|
||||
/**
|
||||
* 放开Logger的限制
|
||||
*/
|
||||
private void openLoggerLevel() {
|
||||
Logger.init(LogLevel.DEBUG);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据状态收紧Logger的限制
|
||||
*/
|
||||
private void closeLoggerLevel() {
|
||||
if (!catchingList.isEmpty()) {
|
||||
Logger.init(DebugConfig.isDebug() ? LogLevel.DEBUG : LogLevel.OFF);
|
||||
NetConfig.instance().setLoggable(DebugConfig.isDebug());
|
||||
}
|
||||
}
|
||||
|
||||
private void startCatchLog(RemoteLogPushContent content) {
|
||||
catchingList.add(content.getPkgName());
|
||||
|
||||
long delay = content.getDuration() * 60 * 1000;
|
||||
handler.removeMessages(MSG_TRY_CLOSE_LOG);
|
||||
if (delay <= 0) {
|
||||
// 如果push 下来的delay小于等于0,那就给个默认最大值一小时
|
||||
delay = 60 * 60 * 1000L;
|
||||
}
|
||||
handler.sendEmptyMessageDelayed(MSG_TRY_CLOSE_LOG, delay);
|
||||
openLoggerLevel();
|
||||
sendCtrlBroadcast(content);
|
||||
}
|
||||
|
||||
private void stopCatchLog(RemoteLogPushContent content) {
|
||||
catchingList.remove(content.getPkgName());
|
||||
if (catchingList.isEmpty()) {
|
||||
handler.removeMessages(MSG_TRY_CLOSE_LOG);
|
||||
}
|
||||
sendCtrlBroadcast(content);
|
||||
closeLoggerLevel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showLogDebugDialog() {
|
||||
if (logDebugDialog == null) {
|
||||
logDebugDialog = new LogDebugDialog(ContextHolderUtil.getContext());
|
||||
logDebugDialog.setDialogListener(this);
|
||||
}
|
||||
if (logDebugDialog.isShowing()) {
|
||||
return;
|
||||
}
|
||||
logDebugDialog.show();
|
||||
}
|
||||
}
|
||||
@@ -34,6 +34,7 @@ import com.mogo.map.navi.IMogoNaviListener;
|
||||
import com.mogo.map.navi.MogoCongestionInfo;
|
||||
import com.mogo.map.navi.MogoTraffic;
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.MogoModule;
|
||||
import com.mogo.module.common.MogoModulePaths;
|
||||
import com.mogo.module.common.entity.MarkerResponse;
|
||||
@@ -53,6 +54,7 @@ import com.mogo.module.service.refresh.AutoRefreshStrategy;
|
||||
import com.mogo.module.service.refresh.CustomRefreshStrategy;
|
||||
import com.mogo.module.service.refresh.RefreshObject;
|
||||
import com.mogo.module.service.strategy.CarIconDisplayStrategy;
|
||||
import com.mogo.service.IMogoServiceApis;
|
||||
import com.mogo.service.adas.IMogoADASController;
|
||||
import com.mogo.service.cardmanager.IMogoCardManager;
|
||||
import com.mogo.service.connection.IMogoOnMessageListener;
|
||||
@@ -74,6 +76,7 @@ import com.mogo.utils.WorkThreadHandler;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.mogo.utils.network.RequestOptions;
|
||||
import com.mogo.utils.network.utils.GsonUtil;
|
||||
import com.zhidao.smartv2x.common.utils.LoggerUtils;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
@@ -268,7 +271,6 @@ public class MogoServices implements IMogoMapListener,
|
||||
public void onSuccess( MarkerResponse o ) {
|
||||
MapMarkerManager.getInstance().onSyncMarkerResponse( o );
|
||||
mLoopRequest = false;
|
||||
Logger.d( TAG, "request Success." );
|
||||
invokeAutoRefreshStrategy();
|
||||
}
|
||||
|
||||
@@ -331,6 +333,7 @@ public class MogoServices implements IMogoMapListener,
|
||||
} else {
|
||||
unregisterInternalUnWakeupWords();
|
||||
stopAutoRefreshStrategy();
|
||||
closeAllPanel();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -373,6 +376,16 @@ public class MogoServices implements IMogoMapListener,
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 关闭所有模块的控制面板
|
||||
*/
|
||||
private void closeAllPanel() {
|
||||
LoggerUtils.log("zy=======stop");
|
||||
MogoApisHandler.getInstance().getApis().getShareManager().dismissShareDialog();
|
||||
MogoApisHandler.getInstance().getApis().getOnlineCarPanelApi().hidePanel();
|
||||
MogoApisHandler.getInstance().getApis().getAdasControllerApi().closeADAS();
|
||||
}
|
||||
|
||||
public void init( Context context ) {
|
||||
mContext = context;
|
||||
|
||||
@@ -458,7 +471,6 @@ public class MogoServices implements IMogoMapListener,
|
||||
@Override
|
||||
public void handleMessage( Message msg ) {
|
||||
super.handleMessage( msg );
|
||||
Logger.d( TAG, "current thread: %s, msg = %s", Thread.currentThread(), msg.what );
|
||||
if ( msg.what == ServiceConst.MSG_MAP_CHANGED ) {
|
||||
if ( msg.obj instanceof RefreshObject ) {
|
||||
RefreshObject ro = ( ( RefreshObject ) msg.obj );
|
||||
@@ -594,10 +606,8 @@ public class MogoServices implements IMogoMapListener,
|
||||
}
|
||||
|
||||
private void stopAutoRefreshStrategy( boolean stopOnlineCarRefresh ) {
|
||||
Logger.d( TAG, "stop auto refresh strategy" );
|
||||
mHandler.removeMessages( ServiceConst.MSG_TYPE_REFRESH_DECREASE );
|
||||
if ( stopOnlineCarRefresh ) {
|
||||
Logger.d( TAG, "stop online car auto refresh" );
|
||||
MapMarkerManager.getInstance().stopAutoRefresh();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,5 @@ public class EmptyIntentHandler implements IntentHandler {
|
||||
|
||||
@Override
|
||||
public void handle( Context context, Intent intent ) {
|
||||
Logger.w( TAG, "空实现. %s", intent.getAction() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -288,7 +288,6 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
}
|
||||
|
||||
// 解析不同的Marker类型,然后对应的进行绘制
|
||||
Logger.d( TAG, "draw marker" );
|
||||
|
||||
mLastDataResult = response.getResult();
|
||||
UiThreadHandler.post( () -> {
|
||||
@@ -419,7 +418,6 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
String sn = getPrimaryKeyFromEntity( markerExploreWay );
|
||||
IMogoMarker mogoMarker = existCarMap.get( sn );
|
||||
if ( mogoMarker == null || mogoMarker.isDestroyed() ) {
|
||||
Logger.d( TAG, "draw road condition, sn = %s", sn );
|
||||
try {
|
||||
if ( DebugConfig.isRoadEventAnimated() ) {
|
||||
post2AddAndStartAnimation( markerShowEntity, i * 100L );
|
||||
@@ -472,7 +470,6 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
*/
|
||||
private Map< String, IMogoMarker > purgeMarkerData( List newList, String markerType ) {
|
||||
|
||||
final long start = System.currentTimeMillis();
|
||||
Map< String, IMogoMarker > existMap = new HashMap<>();
|
||||
List< IMogoMarker > allCarsList = MarkerServiceHandler.getMarkerManager().getMarkers( markerType );
|
||||
if ( allCarsList == null || allCarsList.isEmpty() ) {
|
||||
@@ -501,7 +498,6 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
}
|
||||
}
|
||||
allMap.clear();
|
||||
Logger.i( "timer", "purge data cost " + ( System.currentTimeMillis() - start ) + "ms" );
|
||||
return existMap;
|
||||
}
|
||||
|
||||
@@ -742,7 +738,6 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
if ( ignoreDrawRequest() ) {
|
||||
return;
|
||||
}
|
||||
Logger.d( TAG, "接收到了地图大而全数据" );
|
||||
runOnTargetThread( () -> {
|
||||
drawMapMarker( response );
|
||||
} );
|
||||
@@ -776,7 +771,6 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
private Runnable runnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Logger.d( TAG, "内部 - 自动刷新在线车辆" );
|
||||
getOnlineCarDataImpl( mCarLatLng, false, false, ServiceConst.ONLINE_SEARCH_LIMIT, ServiceConst.ONLINE_SEARCH_RADIUS, false );
|
||||
}
|
||||
};
|
||||
@@ -813,20 +807,15 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
mCarLatLng = latLng;
|
||||
}
|
||||
|
||||
Logger.d( TAG, "内部 - 请求执行" );
|
||||
|
||||
if ( latLng == null ) {
|
||||
Logger.d( TAG, "内部 - 定位为空" );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ignoreOnlineCarRequest() ) {
|
||||
Logger.d( TAG, "内部 - 忽略请求" );
|
||||
removeCarMarkers();
|
||||
return;
|
||||
}
|
||||
|
||||
Logger.d( TAG, "内部 - 请求开始" );
|
||||
mRefreshModel.queryOnLineCarWithRoute( latLng, onlyFocus, onlySameCity, radius, limit, false, new RefreshCallback() {
|
||||
@Override
|
||||
public void onSuccess( Object o ) {
|
||||
@@ -851,9 +840,7 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
);
|
||||
}
|
||||
|
||||
Logger.d( TAG, "内部 - 请求完毕" );
|
||||
runOnTargetThread( () -> {
|
||||
Logger.d( TAG, "内部 - 请求完毕开始处理" );
|
||||
trackData( size );
|
||||
drawOnlineCarMarkers( onlineCarList, Integer.MAX_VALUE, fitBounds, fitBounds, mMarkerDisplayBounds, latLng );
|
||||
UiThreadHandler.postDelayed( runnable, SMOOTH_DURATION * 1000 );
|
||||
|
||||
@@ -107,9 +107,9 @@ class OnlineCarPanelAdapter extends RecyclerView.Adapter< OnlineCarPanelAdapter.
|
||||
}
|
||||
float distance = Utils.calculateLineDistance( location.getLon(), location.getLat(), lon, lat );
|
||||
if ( distance >= 1000 ) {
|
||||
return String.format( "%.1fKM", distance / 1000 );
|
||||
return String.format( "%.1f千米", distance / 1000 );
|
||||
} else {
|
||||
return String.format( "%.1fM", distance );
|
||||
return String.format( "%.1f米", distance );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
android:textColor="@color/module_services_empty_tip_textColor"
|
||||
android:textSize="@dimen/module_services_empty_tip_textSize"
|
||||
android:textStyle="bold"
|
||||
tools:text="很抱歉,目的地10km内未找到车友" />
|
||||
tools:text="很抱歉,目的地10公里内未找到车友" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
<string name="module_service_launcher_card_tips">你的周围有%d个%s,请点击查看,你也可以对我说打开蘑菇出行</string>
|
||||
<string name="module_service_launcher_card_info">周围有%d个%s</string>
|
||||
<string name="module_service_open_app_tip">亲,建议您使用蘑菇出行</string>
|
||||
<string name="module_services_str_20Km_radius">扩大到20KM半径</string>
|
||||
<string name="module_services_str_40Km_radius">扩大到40KM半径</string>
|
||||
<string name="module_services_str_20Km_radius">扩大到20公里半径</string>
|
||||
<string name="module_services_str_40Km_radius">扩大到40公里半径</string>
|
||||
<string name="module_services_panel_item_distance_tag_text">距离导航目的地</string>
|
||||
<string name="module_services_panel_item_detail_text">查看车友信息</string>
|
||||
<string name="module_services_online_car_panel_empty_tmpl">很抱歉,目的地%dKM内未找到车友</string>
|
||||
<string name="module_services_online_car_panel_empty_tmpl">很抱歉,目的地%d公里内未找到车友</string>
|
||||
<string name="module_services_online_car_panel_title">目的地车友</string>
|
||||
<string name="module_services_error_text">加载失败,请点击重试</string>
|
||||
</resources>
|
||||
|
||||
@@ -62,6 +62,8 @@ public class V2XConst {
|
||||
public static final String V2X_ROAD_EVET = "v2x_road_event";
|
||||
public static final String V2X_ROAD_EVET_HISTORY_BUTTON = "V2X_button_click";
|
||||
public static final String V2X_ROAD_PRODUCE = "v2x_road_produce";
|
||||
public static final String V2X_ASK_ALERT = "v2x_ask_alert";//UGC 提问
|
||||
public static final String V2X_ASK_RESULT = "v2x_ask_result";//UGC 提问回答或消失
|
||||
public static final String LAUNCHER_ICON_CLICK = "Launcher_Icon_Click";
|
||||
/**
|
||||
* V2X 道路事件操作类型
|
||||
|
||||
@@ -99,4 +99,14 @@ public class V2XEventPanelModuleProvider implements
|
||||
public void showPanelWithSelectedItem(int item) {
|
||||
V2XEventPanelFragment.Companion.getInstance().showPanelWithSelectedItem(item);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showPanel() {
|
||||
V2XEventPanelFragment.Companion.getInstance().showPanel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hidePanel() {
|
||||
V2XEventPanelFragment.Companion.getInstance().hidePanel();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,20 +9,26 @@ import android.widget.TextView;
|
||||
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.commons.voice.IMogoVoiceCmdCallBack;
|
||||
import com.mogo.map.MogoLatLng;
|
||||
import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
import com.mogo.module.common.entity.V2XEventShowEntity;
|
||||
import com.mogo.module.common.entity.V2XRoadEventEntity;
|
||||
import com.mogo.module.v2x.R;
|
||||
import com.mogo.module.v2x.V2XConst;
|
||||
import com.mogo.module.v2x.V2XServiceManager;
|
||||
import com.mogo.module.v2x.alarm.V2XEarlyWarningServer;
|
||||
import com.mogo.module.v2x.scenario.scene.ugc.V2XEventUgcScenario;
|
||||
import com.mogo.module.v2x.utils.EventTypeUtils;
|
||||
import com.mogo.module.v2x.utils.V2XUtils;
|
||||
import com.mogo.module.v2x.voice.V2XVoiceCallbackListener;
|
||||
import com.mogo.module.v2x.voice.V2XVoiceConstants;
|
||||
import com.mogo.module.v2x.voice.V2XVoiceManager;
|
||||
import com.mogo.service.share.IMogoTanluProvider;
|
||||
import com.mogo.service.share.TanluUploadParams;
|
||||
import com.mogo.utils.network.utils.GsonUtil;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import static com.mogo.module.v2x.V2XConst.MODULE_NAME;
|
||||
|
||||
/**
|
||||
@@ -53,7 +59,6 @@ public class V2XEventUgcVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
private V2XRoadEventEntity mV2XRoadEventEntity;
|
||||
private V2XEventShowEntity mV2XEventShowEntity;
|
||||
|
||||
|
||||
public V2XEventUgcVH(ViewGroup viewGroup) {
|
||||
super(LayoutInflater.from(viewGroup.getContext())
|
||||
.inflate(R.layout.item_v2x_event_ugc, viewGroup, false));
|
||||
@@ -72,28 +77,31 @@ public class V2XEventUgcVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
@Override
|
||||
public void onViewDetachedFromWindow(View v) {
|
||||
//Logger.w(MODULE_NAME, "列表View V2XPushEventDetailVH 触发 onViewDetachedFromWindow");
|
||||
// 反注册语音交互
|
||||
V2XVoiceManager.INSTANCE
|
||||
.unRegisterUnWakeVoice(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_FEEDBACK_YONG_DU_YES_UN_WAKEUP)
|
||||
.unRegisterUnWakeVoice(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_FEEDBACK_YONG_DU_NO_UN_WAKEUP)
|
||||
|
||||
.unRegisterUnWakeVoice(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_FEEDBACK_FENG_LU_YES_UN_WAKEUP)
|
||||
.unRegisterUnWakeVoice(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_FEEDBACK_FENG_LU_NO_UN_WAKEUP)
|
||||
|
||||
.unRegisterUnWakeVoice(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GU_YES_UN_WAKEUP)
|
||||
.unRegisterUnWakeVoice(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GU_NO_UN_WAKEUP)
|
||||
|
||||
.unRegisterUnWakeVoice(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GONG_YES_UN_WAKEUP)
|
||||
.unRegisterUnWakeVoice(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GONG_NO_UN_WAKEUP);
|
||||
unRegisterVoice();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void unRegisterVoice() {
|
||||
// 反注册语音交互
|
||||
V2XVoiceManager.INSTANCE
|
||||
.unRegisterUnWakeVoice(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_FEEDBACK_YONG_DU_YES_UN_WAKEUP)
|
||||
.unRegisterUnWakeVoice(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_FEEDBACK_YONG_DU_NO_UN_WAKEUP)
|
||||
|
||||
.unRegisterUnWakeVoice(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_FEEDBACK_FENG_LU_YES_UN_WAKEUP)
|
||||
.unRegisterUnWakeVoice(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_FEEDBACK_FENG_LU_NO_UN_WAKEUP)
|
||||
|
||||
.unRegisterUnWakeVoice(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GU_YES_UN_WAKEUP)
|
||||
.unRegisterUnWakeVoice(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GU_NO_UN_WAKEUP)
|
||||
|
||||
.unRegisterUnWakeVoice(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GONG_YES_UN_WAKEUP)
|
||||
.unRegisterUnWakeVoice(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GONG_NO_UN_WAKEUP);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initView(V2XEventShowEntity v2XEventShowEntity) {
|
||||
try {
|
||||
Log.w(MODULE_NAME + "_" + TAG, "v2XEventShowEntity=" + GsonUtil.jsonFromObject(v2XEventShowEntity));
|
||||
|
||||
if (v2XEventShowEntity == null) {
|
||||
return;
|
||||
}
|
||||
@@ -121,12 +129,18 @@ public class V2XEventUgcVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
}
|
||||
});
|
||||
ivEventTypeIcon.setImageResource((Integer) ugcTitleStr[2]);
|
||||
|
||||
// UGC 问答数据统计
|
||||
Map<String, Object> properties = new HashMap<>();
|
||||
properties.put("content", (String) ugcTitleStr[1]);
|
||||
V2XServiceManager.getMogoAnalytics().track(V2XConst.V2X_ASK_ALERT, properties);
|
||||
}
|
||||
|
||||
|
||||
ivEventReportTrue.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
manualMarkingTrafficJam(1);
|
||||
}
|
||||
});
|
||||
@@ -143,10 +157,36 @@ public class V2XEventUgcVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
}
|
||||
}
|
||||
|
||||
// UGC 提问回答或消失
|
||||
private void dataStatistics(int result) {
|
||||
Map<String, Object> properties = new HashMap<>();
|
||||
properties.put("result", result);
|
||||
V2XServiceManager.getMogoAnalytics().track(V2XConst.V2X_ASK_RESULT, properties);
|
||||
}
|
||||
|
||||
/**
|
||||
* 对道路事件进行反馈
|
||||
*/
|
||||
void manualMarkingTrafficJam(int status) {
|
||||
unRegisterVoice();
|
||||
|
||||
if (status == 1) {
|
||||
// 上报事故
|
||||
TanluUploadParams params =
|
||||
new TanluUploadParams(
|
||||
mNoveltyInfo.getPoiType(),
|
||||
IMogoTanluProvider.UPLOAD_FROM_STRATEGY_UGC,
|
||||
mNoveltyInfo.getInfoIdInt(),
|
||||
new MogoLatLng(mNoveltyInfo.getLocation().getLat(),
|
||||
mNoveltyInfo.getLocation().getLon())
|
||||
);
|
||||
V2XServiceManager.getTanluManager().uploadRoadCondition(params);
|
||||
|
||||
dataStatistics(1);
|
||||
} else if (status == 0) {
|
||||
dataStatistics(2);
|
||||
}
|
||||
|
||||
AIAssist.getInstance(V2XUtils.getApp()).speakTTSVoice("谢谢,您的反馈将帮助更多车友。", null);
|
||||
V2XServiceManager
|
||||
.getV2XRefreshModel()
|
||||
|
||||
@@ -99,7 +99,7 @@ public class V2XFatigueDrivingVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
SpanUtils.with(mTvAddressDistance)
|
||||
.append("" + (int) mV2XPushMessageEntity.getDistance())
|
||||
.setFontSize((int) itemView.getResources().getDimension(R.dimen.module_v2x_event_distance_text))
|
||||
.append("m")
|
||||
.append("米")
|
||||
.setFontSize((int) itemView.getResources().getDimension(R.dimen.module_v2x_event_distance_title))
|
||||
.create();
|
||||
}
|
||||
|
||||
@@ -181,14 +181,14 @@ public class V2XOtherSeekHelpVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
SpanUtils.with(tvDistance)
|
||||
.append("" + (int) mV2XPushMessageEntity.getDistance() / 1000)
|
||||
.setFontSize((int) itemView.getResources().getDimension(R.dimen.module_v2x_event_distance_text))
|
||||
.append("km")
|
||||
.append("公里")
|
||||
.setFontSize((int) itemView.getResources().getDimension(R.dimen.module_v2x_event_distance_title))
|
||||
.create();
|
||||
} else {
|
||||
SpanUtils.with(tvDistance)
|
||||
.append("" + (int) mV2XPushMessageEntity.getDistance())
|
||||
.setFontSize((int) itemView.getResources().getDimension(R.dimen.module_v2x_event_distance_text))
|
||||
.append("m")
|
||||
.append("米")
|
||||
.setFontSize((int) itemView.getResources().getDimension(R.dimen.module_v2x_event_distance_title))
|
||||
.create();
|
||||
}
|
||||
|
||||
@@ -230,7 +230,7 @@ public class V2XRoadEventVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
tvEventTypeTitle.setBackgroundResource(EventTypeUtils.getPoiTypeBg(mNoveltyInfo.getPoiType()));
|
||||
}
|
||||
tvEventAddress.setText(mNoveltyInfo.getAddr());
|
||||
tvEventDistance.setText("距离 " + (int) mNoveltyInfo.getDistance() + "M");
|
||||
tvEventDistance.setText("距离 " + (int) mNoveltyInfo.getDistance() + "米");
|
||||
|
||||
Calendar c = Calendar.getInstance();
|
||||
c.setTimeInMillis(mNoveltyInfo.getGenerateTime());
|
||||
|
||||
@@ -90,14 +90,14 @@ public class V2XScenarioHistoryOtherSeekHelpVH extends V2XBaseViewHolder<V2XHist
|
||||
SpanUtils.with(mTvFaultHelpDistance)
|
||||
.append("" + (int) xPushMessageEntity.getDistance() / 1000)
|
||||
.setFontSize((int) itemView.getResources().getDimension(R.dimen.module_v2x_event_distance_text))
|
||||
.append("km")
|
||||
.append("公里")
|
||||
.setFontSize((int) itemView.getResources().getDimension(R.dimen.module_v2x_event_distance_title))
|
||||
.create();
|
||||
} else {
|
||||
SpanUtils.with(mTvFaultHelpDistance)
|
||||
.append("" + (int) xPushMessageEntity.getDistance())
|
||||
.setFontSize((int) itemView.getResources().getDimension(R.dimen.module_v2x_event_distance_text))
|
||||
.append("m")
|
||||
.append("米")
|
||||
.setFontSize((int) itemView.getResources().getDimension(R.dimen.module_v2x_event_distance_title))
|
||||
.create();
|
||||
}
|
||||
|
||||
@@ -82,18 +82,6 @@ public class V2XEarlyWarningServer {
|
||||
intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, v2xMessageEntity);
|
||||
LocalBroadcastManager.getInstance(V2XUtils.getApp()).sendBroadcast(intent);
|
||||
|
||||
|
||||
// 上报事故
|
||||
TanluUploadParams params =
|
||||
new TanluUploadParams(
|
||||
v2XRoadEventEntity.getPoiType(),
|
||||
IMogoTanluProvider.UPLOAD_FROM_STRATEGY_UGC,
|
||||
v2XRoadEventEntity.getNoveltyInfo().getInfoIdInt(),
|
||||
new MogoLatLng(v2XRoadEventEntity.getLocation().getLat(),
|
||||
v2XRoadEventEntity.getLocation().getLon())
|
||||
);
|
||||
V2XServiceManager.getTanluManager().uploadRoadCondition(params);
|
||||
|
||||
}
|
||||
// 移出已经预警的事件列表
|
||||
//V2XAlarmServer.mAlertRoadEventList.remove(v2XRoadEventEntity);
|
||||
|
||||
@@ -24,8 +24,8 @@ import com.mogo.module.v2x.view.V2XEventPanelHistoryCountView
|
||||
import com.mogo.module.v2x.voice.V2XVoiceCallbackListener
|
||||
import com.mogo.module.v2x.voice.V2XVoiceConstants
|
||||
import com.mogo.module.v2x.voice.V2XVoiceManager
|
||||
import com.mogo.service.eventpanel.IEventPanelProvider
|
||||
import com.mogo.utils.logger.Logger
|
||||
import com.mogo.utils.storage.SharedPrefsMgr
|
||||
|
||||
|
||||
/**
|
||||
@@ -52,6 +52,7 @@ class V2XEventPanelFragment : MvpFragment<V2XEventPanelFragment, EventPanelPrese
|
||||
private var mRbScenarioHistory: RadioButton? = null
|
||||
private var mRbSurroundingEvent: RadioButton? = null
|
||||
private var mRbShareEvents: RadioButton? = null
|
||||
private var todayFirstForShared: String? = ""
|
||||
|
||||
private val mV2XScenarioHistoryFragment = V2XScenarioHistoryFragment()
|
||||
private val mV2XShareEventsFragment = V2XShareEventsFragment()
|
||||
|
||||
@@ -11,6 +11,7 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.mogo.commons.mvp.MvpFragment;
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.module.common.entity.V2XHistoryScenarioData;
|
||||
import com.mogo.module.v2x.R;
|
||||
import com.mogo.module.v2x.SpacesItemDecoration;
|
||||
@@ -21,6 +22,7 @@ import com.mogo.module.v2x.manager.V2XStatusDescriptor;
|
||||
import com.mogo.module.v2x.presenter.ScenarioHistoryPresenter;
|
||||
import com.mogo.module.v2x.utils.ThreadUtils;
|
||||
import com.mogo.module.v2x.utils.V2XSQLiteUtils;
|
||||
import com.mogo.module.v2x.utils.V2XUtils;
|
||||
import com.mogo.module.v2x.view.V2XListEmptyView;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.mogo.utils.network.utils.GsonUtil;
|
||||
@@ -126,10 +128,28 @@ public class V2XScenarioHistoryFragment
|
||||
mClHistoryList.setVisibility(View.GONE);
|
||||
}
|
||||
mV2XScenarioHistoryAdapter.notifyDataSetChanged();
|
||||
ttsForHistoryFirstToday();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
* 出行动态 TTS播报
|
||||
* */
|
||||
private void ttsForHistoryFirstToday() {
|
||||
boolean hasBroadTts = V2XUtils.isFirstTodayWithKey("TTS_FOR_HISTORY_SELECTED");
|
||||
if (hasBroadTts == false) {
|
||||
if (mV2XHistoryScenarioData.size() > 0) {
|
||||
AIAssist.getInstance(V2XUtils.getApp()).
|
||||
speakTTSVoice("小智为您记录了今天的出行事件", null);
|
||||
} else {
|
||||
AIAssist.getInstance(V2XUtils.getApp()).
|
||||
speakTTSVoice("小智在这里为您记录今天的出行事件", null);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
|
||||
@@ -87,7 +87,7 @@ public class V2XShareEventsFragment extends MvpFragment<V2XShareEventsFragment,
|
||||
ThreadUtils.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
animatioonAction(View.VISIBLE);
|
||||
animationAction(View.VISIBLE);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -144,7 +144,7 @@ public class V2XShareEventsFragment extends MvpFragment<V2XShareEventsFragment,
|
||||
int shareNum = resultData.getResult().getEnthusiasmIndex().getShareNum();
|
||||
int approveNum = resultData.getResult().getEnthusiasmIndex().getLikeNum();
|
||||
double enthusiasm = resultData.getResult().getEnthusiasmIndex().getEnthusiasmIndex();
|
||||
Log.d(TAG, String.valueOf(enthusiasm)+"TTS播报热心指数个数");
|
||||
Log.d(TAG, String.valueOf(enthusiasm) + "TTS播报热心指数个数");
|
||||
String ttsString = "";
|
||||
if (enthusiasm <= 2) {
|
||||
ttsString = "您目前已完成" + shareNum + "次分享,获得" + approveNum + "次车友认同,热心指数" + enthusiasm
|
||||
@@ -164,7 +164,8 @@ public class V2XShareEventsFragment extends MvpFragment<V2XShareEventsFragment,
|
||||
* 我的分享列表数据处理
|
||||
* */
|
||||
private void loadSuccessWithShareEventList(Object result) {
|
||||
animatioonAction(View.GONE);
|
||||
|
||||
animationAction(View.GONE);
|
||||
V2XShareEventItem resultData = (V2XShareEventItem) result;
|
||||
V2XShareEventLoadMoreItem item = new V2XShareEventLoadMoreItem();
|
||||
if (resultData != null && resultData.getResult() != null) {
|
||||
@@ -211,7 +212,7 @@ public class V2XShareEventsFragment extends MvpFragment<V2XShareEventsFragment,
|
||||
|
||||
}
|
||||
|
||||
private void animatioonAction(int visible) {
|
||||
private void animationAction(int visible) {
|
||||
if (visible == View.VISIBLE) {
|
||||
if (loadingView != null) {
|
||||
loadingView.start();
|
||||
@@ -227,13 +228,22 @@ public class V2XShareEventsFragment extends MvpFragment<V2XShareEventsFragment,
|
||||
@Override
|
||||
protected ShareEventsPresenter createPresenter() {
|
||||
Log.d(TAG, "createPresenter");
|
||||
ttsForSharedFirstToday();
|
||||
return new ShareEventsPresenter(this);
|
||||
}
|
||||
|
||||
private void ttsForSharedFirstToday() {
|
||||
boolean hasBroadTts = V2XUtils.isFirstTodayWithKey("TTS_FOR_SHARED_SELECTED");
|
||||
Log.d(TAG,"shouldBroadTts"+hasBroadTts);
|
||||
if (hasBroadTts == false) {
|
||||
AIAssist.getInstance(V2XUtils.getApp()).speakTTSVoice("您可以在这里查看历史的分享记录", null);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadMoreShareEventList() {
|
||||
Log.d(TAG, "page--" + pageNum);
|
||||
animatioonAction(View.VISIBLE);
|
||||
animationAction(View.VISIBLE);
|
||||
pageNum += 1;
|
||||
v2XShareNetworkModel.getShareEventList(pageNum, 10, new V2XRefreshCallback() {
|
||||
@Override
|
||||
|
||||
@@ -25,6 +25,7 @@ import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.commons.mvp.MvpFragment;
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.map.MogoLatLng;
|
||||
import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.map.marker.anim.OnMarkerAnimationListener;
|
||||
@@ -38,6 +39,7 @@ import com.mogo.module.v2x.adapter.V2XSurroundingAdapter;
|
||||
import com.mogo.module.v2x.entity.panel.SurroundingConstruction;
|
||||
import com.mogo.module.v2x.listener.SurroundingItemClickListener;
|
||||
import com.mogo.module.v2x.presenter.SurroundingEventPresenter;
|
||||
import com.mogo.module.v2x.utils.V2XUtils;
|
||||
import com.mogo.module.v2x.view.SurroundingEventView;
|
||||
import com.mogo.module.common.view.NetworkLoadingView;
|
||||
import com.mogo.module.v2x.view.SurroundingMarginDecoration;
|
||||
@@ -189,8 +191,22 @@ public class V2XSurroundingFragment extends MvpFragment<SurroundingEventView, Su
|
||||
mRecyclerView.setVisibility(View.GONE);
|
||||
mEmptyLayout.setVisibility(View.VISIBLE);
|
||||
}
|
||||
ttsForSurroundingFirstToday();
|
||||
}
|
||||
|
||||
/*
|
||||
* 出行动态 TTS播报
|
||||
* */
|
||||
private void ttsForSurroundingFirstToday() {
|
||||
boolean hasBroadTts = V2XUtils.isFirstTodayWithKey("TTS_FOR_SURROUNDING_SELECTED");
|
||||
if (hasBroadTts == false) {
|
||||
if (poiInfosList.size() > 0) {
|
||||
AIAssist.getInstance(V2XUtils.getApp()).
|
||||
speakTTSVoice("发现周边" + poiInfosList.size() + "条交通信息", null);
|
||||
} else {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private Map<String, SurroundingConstruction> getPoiTypeMap(List<MarkerExploreWay> list) {
|
||||
Map<String, SurroundingConstruction> mPoiTypeMarkers = new HashMap<>();
|
||||
|
||||
@@ -70,7 +70,7 @@ public class V2XEventUgcWindow extends RelativeLayout
|
||||
}
|
||||
|
||||
public void initView(Context context) {
|
||||
Logger.w(MODULE_NAME, "V2X-初始化疲劳驾驶");
|
||||
Logger.w(MODULE_NAME, "V2X-初始化UGC的Window");
|
||||
LayoutInflater.from(context).inflate(R.layout.window_fault_help, this);
|
||||
// 详情列表
|
||||
mRecyclerView = findViewById(R.id.rvRoadEventList);
|
||||
|
||||
@@ -24,6 +24,7 @@ import androidx.core.content.FileProvider;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
|
||||
import com.mogo.utils.ThreadPoolService;
|
||||
import com.mogo.utils.storage.SharedPrefsMgr;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
@@ -31,11 +32,15 @@ import java.io.FileReader;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.sql.Time;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
@@ -315,6 +320,21 @@ public class V2XUtils {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 当天第一次
|
||||
* */
|
||||
public static boolean isFirstTodayWithKey(String key) {
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd", Locale.US);
|
||||
String formatString = format.format(new Date());
|
||||
String value = SharedPrefsMgr.getInstance(V2XUtils.getApp()).getString(key);
|
||||
if (value.equals(formatString)) {
|
||||
return true;
|
||||
} else {
|
||||
SharedPrefsMgr.getInstance(V2XUtils.getApp()).putString(key, formatString);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// TransActivity
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
"lat":39.966668,
|
||||
"lon":116.411211
|
||||
},
|
||||
"poiType":"10006",
|
||||
"poiType":"10003",
|
||||
"type":"CARD_TYPE_ROAD_CONDITION",
|
||||
"uploadType":"2",
|
||||
"userInfo":{
|
||||
@@ -41,5 +41,5 @@
|
||||
"userName":"零下的雨"
|
||||
}
|
||||
},
|
||||
"poiType":"10006"
|
||||
"poiType":"10003"
|
||||
}
|
||||
@@ -83,7 +83,6 @@ class AutoNaviIntentHandler implements IMogoVoiceCmdCallBack {
|
||||
|
||||
public void handle( Context context, Intent intent ) {
|
||||
int keyType = intent.getIntExtra( "KEY_TYPE", 0 );
|
||||
Logger.d( TAG, "KEY_TYPE = " + keyType );
|
||||
switch ( keyType ) {
|
||||
case 10021:
|
||||
closeEntrance();
|
||||
|
||||
@@ -14,4 +14,14 @@ public interface IEventPanelProvider extends IMogoModuleProvider {
|
||||
*/
|
||||
void showPanelWithSelectedItem(int item);
|
||||
|
||||
/**
|
||||
* 显示面板,默认选中第一个
|
||||
*/
|
||||
void showPanel();
|
||||
|
||||
/**
|
||||
* 隐藏面板
|
||||
*/
|
||||
void hidePanel();
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.mogo.service.monitor;
|
||||
|
||||
public interface IMogoMonitorLog {
|
||||
|
||||
/**
|
||||
* 显示日志抓取窗口
|
||||
*/
|
||||
void showLogDebugDialog();
|
||||
}
|
||||
@@ -9,14 +9,11 @@ import com.alibaba.android.arouter.facade.template.IProvider;
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public interface IMogoMonitorProvider extends IProvider {
|
||||
/**
|
||||
* 显示日志抓取窗口
|
||||
*/
|
||||
void showLogDebugDialog();
|
||||
|
||||
/**
|
||||
* 重置context,设置成activity的context
|
||||
* @param context activity的context
|
||||
* 获取日志监控接口
|
||||
* @return
|
||||
*/
|
||||
void resetActivityContext(Context context);
|
||||
IMogoMonitorLog getMogoMonitorLog();
|
||||
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 677 B |
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/module_ext_shadow_bkg_light" android:state_pressed="true" />
|
||||
<item android:drawable="@drawable/module_ext_shadow_bkg_light" android:state_pressed="false" />
|
||||
<item android:drawable="@drawable/module_ext_shadow_bkg_light" />
|
||||
</selector>
|
||||
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Reference in New Issue
Block a user