This commit is contained in:
unknown
2020-06-19 15:14:34 +08:00
36 changed files with 49 additions and 56 deletions

View File

@@ -71,13 +71,13 @@ MOGO_MODULE_GUIDESHOW_PROVIDER_VERSION=1.0.2-SNAPSHOT
# 在线车辆F
MOGO_MODULE_ONLINECAR_VERSION=1.0.3.2
# v2x
MOGO_MODULE_V2X_VERSION=1.1.24
MOGO_MODULE_V2X_VERSION=1.1.27
# 推送
MOGO_MODULE_PUSH_VERSION=1.0.1
# 广告资源位
MOGO_MODULE_AD_CARD_VERSION=1.0.1
# 探路上报和分享模块
TANLULIB_VERSION=1.2.1.1
TANLULIB_VERSION=1.2.1.2
## 产品库必备配置
applicationId=com.mogo.launcer

Binary file not shown.

After

Width:  |  Height:  |  Size: 657 B

View File

@@ -1,6 +1,5 @@
package com.mogo.module.main;
import android.content.Intent;
import android.location.Location;
import android.view.MotionEvent;
@@ -21,11 +20,6 @@ import com.mogo.map.navi.MogoNaviInfo;
import com.mogo.map.navi.MogoTraffic;
import com.mogo.map.uicontroller.EnumMapUI;
import com.mogo.module.main.registercenter.MogoRegisterCenterHandler;
import com.mogo.module.service.receiver.AccStatusReceiver;
import com.mogo.module.service.receiver.MogoReceiver;
import com.mogo.service.intent.IMogoIntentListener;
import com.mogo.service.intent.IMogoIntentManager;
import com.mogo.service.module.IMogoModuleLifecycle;
import com.mogo.utils.logger.Logger;
import java.util.Iterator;
@@ -43,8 +37,7 @@ public class EventDispatchCenter implements
IMogoCarLocationChangedListener2,
IMogoMapListener,
IMogoNaviListener2,
IMogoLocationListener,
IMogoIntentListener {
IMogoLocationListener {
private static volatile EventDispatchCenter sInstance;
@@ -66,12 +59,6 @@ public class EventDispatchCenter implements
private static final String TAG = "DispatchCenter";
public void registerReceiver( IMogoIntentManager intentManager ) {
intentManager.registerIntentListener( Intent.ACTION_POWER_CONNECTED, this );
intentManager.registerIntentListener( Intent.ACTION_POWER_DISCONNECTED, this );
intentManager.registerIntentListener( AccStatusReceiver.ACTION_NWD_ACC, this );
}
@Override
public boolean onMarkerClicked( IMogoMarker marker ) {
IMogoMarkerClickListener listener = MogoRegisterCenterHandler.getInstance().getMarkerListener( marker.getOwner() );
@@ -437,32 +424,6 @@ public class EventDispatchCenter implements
Logger.i( TAG, "onLocationChanged event cost " + ( System.currentTimeMillis() - start ) + "ms" );
}
@Override
public void onIntentReceived( String intentStr, Intent intent ) {
Iterator< IMogoModuleLifecycle > iterator = MogoRegisterCenterHandler.getInstance().getLifecycleListeners();
if ( Intent.ACTION_POWER_CONNECTED.equals( intentStr ) ) {
while ( iterator.hasNext() ) {
IMogoModuleLifecycle lifecycle = iterator.next();
if ( lifecycle != null ) {
lifecycle.accOn();
}
}
} else if ( Intent.ACTION_POWER_DISCONNECTED.equals( intentStr ) ) {
} else if ( AccStatusReceiver.ACTION_NWD_ACC.equals( intentStr ) ) {
int state = intent.getByteExtra( AccStatusReceiver.PARAM_ACC_STATUS, ( byte ) 0 );
if ( state == 1 ) {
while ( iterator.hasNext() ) {
IMogoModuleLifecycle lifecycle = iterator.next();
if ( lifecycle != null ) {
lifecycle.accOn();
}
}
}
}
}
@Override
public void onArriveDestination() {
Iterator< IMogoNaviListener > iterator = MogoRegisterCenterHandler.getInstance().getNaviListeners();

View File

@@ -60,7 +60,6 @@ public class MogoModulesManager implements MogoModulesHandler {
throw new NullPointerException( "activity can't be null." );
}
this.mActivity = activity;
EventDispatchCenter.getInstance().registerReceiver( apis.getIntentManagerApi() );
}
private Context getContext() {

View File

@@ -1,19 +1,12 @@
package com.mogo.module.share.dialog;
import android.content.Context;
import android.graphics.PixelFormat;
import android.os.Build;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.WindowManager;
import android.widget.TextView;
import androidx.annotation.NonNull;
import com.alibaba.android.arouter.launcher.ARouter;
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.constant.ShareConstants;
import com.mogo.module.share.manager.ISeekHelpListener;
@@ -23,7 +16,6 @@ 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.utils.WindowUtils;
import com.mogo.utils.logger.Logger;
import java.util.HashMap;

View File

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 765 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 767 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@@ -2,8 +2,7 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#88000000">
android:layout_height="match_parent">
<View
android:id="@+id/vBg"

View File

@@ -27,6 +27,11 @@ android {
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {

View File

@@ -6,6 +6,7 @@ package com.mogo.service.module;
* <p>
* 卡片生命周期
*/
@Deprecated
public interface IMogoModuleLifecycle {
/**

View File

@@ -13,4 +13,14 @@ public interface IMogoStatusChangedListener {
* @param isTrue true - accOn、adas ui show、voice ui show、push ui show、v2x ui show
*/
void onStatusChanged( StatusDescriptor descriptor, boolean isTrue );
/**
* 是否需要黏性状态: 先改变状态,后注册监听
*
* @param descriptor 状态
* @return 默认不需要
*/
default boolean requestStickyStatus( StatusDescriptor descriptor ) {
return false;
}
}

View File

@@ -0,0 +1,18 @@
package com.mogo.service.statusmanager;
/**
* @author congtaowang
* @since 2020-01-04
* <p>
* 状态控制器监听
*/
public interface IMogoStickyStatusChangedListener extends IMogoStatusChangedListener {
/**
* 是否需要黏性状态: 先改变状态,后注册监听
*
* @param descriptor 状态
* @return 默认不需要
*/
boolean requestStickyStatus( StatusDescriptor descriptor );
}

View File

@@ -8,6 +8,7 @@ import com.alibaba.android.arouter.facade.annotation.Route;
import com.mogo.service.MogoServicePaths;
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
import com.mogo.service.statusmanager.IMogoStatusManager;
import com.mogo.service.statusmanager.IMogoStickyStatusChangedListener;
import com.mogo.service.statusmanager.StatusDescriptor;
import com.mogo.utils.logger.Logger;
@@ -227,14 +228,21 @@ public class MogoStatusManager implements IMogoStatusManager {
}
@Override
public void registerStatusChangedListener( String tag, StatusDescriptor descriptor, IMogoStatusChangedListener listeners ) {
if ( listeners == null || descriptor == null ) {
public void registerStatusChangedListener( String tag, StatusDescriptor descriptor, IMogoStatusChangedListener listener ) {
if ( listener == null || descriptor == null ) {
return;
}
if ( !mListeners.containsKey( descriptor ) ) {
mListeners.put( descriptor, new ArrayList<>() );
}
mListeners.get( descriptor ).add( listeners );
mListeners.get( descriptor ).add( listener );
if ( listener instanceof IMogoStickyStatusChangedListener && listener.requestStickyStatus( descriptor ) ) {
Boolean val = mStatus.get( descriptor );
if ( val != null ) {
listener.onStatusChanged( descriptor, get_bool_val( descriptor ) );
}
}
}
@Override