opt
This commit is contained in:
@@ -398,7 +398,7 @@ public class AMapMarkerWrapper implements IMogoMarker, Observer {
|
||||
|
||||
AnimationSet animationSet = new AnimationSet( true );
|
||||
animationSet.setDuration( duration );
|
||||
animationSet.setInterpolator( interpolator);
|
||||
animationSet.setInterpolator( interpolator );
|
||||
animationSet.setAnimationListener( new Animation.AnimationListener() {
|
||||
@Override
|
||||
public void onAnimationStart() {
|
||||
@@ -510,4 +510,11 @@ public class AMapMarkerWrapper implements IMogoMarker, Observer {
|
||||
mMovingPointOverlay.startSmoothMove();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInfoWindowShowing() {
|
||||
if ( mMarker == null ) {
|
||||
return false;
|
||||
}
|
||||
return mMarker.isInfoWindowShown();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -318,4 +318,10 @@ public interface IMogoMarker {
|
||||
* @param duration 时长
|
||||
*/
|
||||
void startSmooth( List< MogoLatLng > points, int duration );
|
||||
|
||||
/**
|
||||
* info window 是否正在显示
|
||||
* @return
|
||||
*/
|
||||
boolean isInfoWindowShowing();
|
||||
}
|
||||
|
||||
@@ -43,11 +43,11 @@ android {
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
// 小智语音,免唤醒词等服务
|
||||
compileOnly rootProject.ext.dependencies.androidxconstraintlayout
|
||||
compileOnly rootProject.ext.dependencies.arouter
|
||||
compileOnly rootProject.ext.dependencies.aiassist
|
||||
implementation rootProject.ext.dependencies.androidxconstraintlayout
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
implementation rootProject.ext.dependencies.aiassist
|
||||
kapt rootProject.ext.dependencies.aroutercompiler
|
||||
compileOnly rootProject.ext.dependencies.androidxrecyclerview
|
||||
implementation rootProject.ext.dependencies.androidxrecyclerview
|
||||
implementation rootProject.ext.dependencies.androidxappcompat
|
||||
implementation rootProject.ext.dependencies.kotlinstdlibjdk7
|
||||
implementation rootProject.ext.dependencies.androidxccorektx
|
||||
@@ -58,18 +58,18 @@ dependencies {
|
||||
|
||||
if( Boolean.valueOf(RELEASE) ){
|
||||
implementation rootProject.ext.dependencies.modulepushbase
|
||||
compileOnly rootProject.ext.dependencies.mogomap
|
||||
compileOnly rootProject.ext.dependencies.mogoutils
|
||||
compileOnly rootProject.ext.dependencies.mogocommons
|
||||
compileOnly rootProject.ext.dependencies.mogoserviceapi
|
||||
compileOnly rootProject.ext.dependencies.modulecommon
|
||||
implementation rootProject.ext.dependencies.mogomap
|
||||
implementation rootProject.ext.dependencies.mogoutils
|
||||
implementation rootProject.ext.dependencies.mogocommons
|
||||
implementation rootProject.ext.dependencies.modulecommon
|
||||
implementation rootProject.ext.dependencies.mogoserviceapi
|
||||
} else {
|
||||
implementation project(":modules:mogo-module-push-base")
|
||||
compileOnly project(':libraries:mogo-map')
|
||||
compileOnly project(':foudations:mogo-utils')
|
||||
compileOnly project(':foudations:mogo-commons')
|
||||
compileOnly project(':services:mogo-service-api')
|
||||
compileOnly project(':modules:mogo-module-common')
|
||||
implementation project(':libraries:mogo-map')
|
||||
implementation project(':foudations:mogo-utils')
|
||||
implementation project(':foudations:mogo-commons')
|
||||
implementation project(':modules:mogo-module-common')
|
||||
implementation project(':services:mogo-service-api')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ class LauncherCardRefresher {
|
||||
loadNetworkConfigStrategy();
|
||||
break;
|
||||
case MSG_REFRESH_DEFAULT_CARD:
|
||||
renderDefaultLauncherCardConfig();
|
||||
renderDefaultLauncherCardConfig( false );
|
||||
mRefreshStrategy = mRefreshStrategy.getNext();
|
||||
restart();
|
||||
break;
|
||||
@@ -134,7 +134,7 @@ class LauncherCardRefresher {
|
||||
}
|
||||
break;
|
||||
case MSG_START_LOOP_DEFAULT_CARD:
|
||||
renderDefaultLauncherCardConfig();
|
||||
renderDefaultLauncherCardConfig( false );
|
||||
break;
|
||||
case MSG_REFRESH_ADVERTISEMENT:
|
||||
int index = msg.arg1;// 当前广告索引
|
||||
@@ -149,17 +149,17 @@ class LauncherCardRefresher {
|
||||
private boolean mStart = false;
|
||||
private RefreshModel mRefreshModel;
|
||||
private ZhidaoRefreshModel mZhidaoRefreshModel;
|
||||
private LauncherCardRefreshStrategy mRefreshStrategy = new LauncherCardRefreshStrategy(
|
||||
2 * ONE_MINUTE,
|
||||
new LauncherCardRefreshStrategy(
|
||||
3 * ONE_MINUTE,
|
||||
new LauncherCardRefreshStrategy(
|
||||
20 * ONE_MINUTE,
|
||||
null,
|
||||
MSG_EXPLORER_WAY_OR_ONLINE_CAR_DATA ),
|
||||
MSG_INDUCE ),
|
||||
MSG_REFRESH_DEFAULT_CARD
|
||||
|
||||
private LauncherCardRefreshStrategy mExplorerWayOrOnlineCarDataStrategy = new LauncherCardRefreshStrategy(
|
||||
20 * ONE_MINUTE,null, MSG_EXPLORER_WAY_OR_ONLINE_CAR_DATA
|
||||
);
|
||||
private LauncherCardRefreshStrategy mInduceStrategy = new LauncherCardRefreshStrategy(
|
||||
3 * ONE_MINUTE,mExplorerWayOrOnlineCarDataStrategy, MSG_INDUCE
|
||||
);
|
||||
private LauncherCardRefreshStrategy mLauncherCardConfigStrategy = new LauncherCardRefreshStrategy(
|
||||
2 * ONE_MINUTE,mInduceStrategy, MSG_REFRESH_DEFAULT_CARD
|
||||
);
|
||||
private LauncherCardRefreshStrategy mRefreshStrategy = mLauncherCardConfigStrategy;
|
||||
|
||||
public void start() {
|
||||
if ( DebugConfig.isLauncher() || DebugConfig.getCarMachineType() == DebugConfig.CAR_MACHINE_TYPE_BYD ) {
|
||||
@@ -172,6 +172,7 @@ class LauncherCardRefresher {
|
||||
mLaunchTTSText = mContext.getString( R.string.module_service_open_app_tip );
|
||||
mDefaultConfigCounter = 0;
|
||||
mRefreshTicketCounter = 0;
|
||||
mRefreshStrategy = mLauncherCardConfigStrategy;
|
||||
// 延时加载数据,已保证accOn之后网络恢复正常
|
||||
long delay = ONE_MINUTE;
|
||||
if ( NetworkUtils.isConnected( mContext ) ) {
|
||||
@@ -327,8 +328,10 @@ class LauncherCardRefresher {
|
||||
* 1. 刷新默认卡片样式
|
||||
* <p>
|
||||
* 2. 播报默认卡片语音
|
||||
*
|
||||
* @param sendConfigOnly 仅发送配置到
|
||||
*/
|
||||
private void renderDefaultLauncherCardConfig() {
|
||||
private void renderDefaultLauncherCardConfig( boolean sendConfigOnly ) {
|
||||
if ( mDefaultLauncherCardConfig != null ) {
|
||||
long curr = System.currentTimeMillis();
|
||||
if ( mDefaultLauncherCardConfig.endTime > curr && mDefaultLauncherCardConfig.startTime < curr ) {
|
||||
@@ -351,6 +354,10 @@ class LauncherCardRefresher {
|
||||
}
|
||||
}
|
||||
|
||||
if ( sendConfigOnly ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( mDefaultConfigCounter++ >= 3 ) {
|
||||
return;
|
||||
}
|
||||
@@ -454,6 +461,7 @@ class LauncherCardRefresher {
|
||||
}
|
||||
if ( launcherCardAdvertisement.cardType == LauncherCardAdvertisementData.TYPE_DEFAULT_CONFIG ) {
|
||||
mDefaultLauncherCardConfig = launcherCardAdvertisement;
|
||||
renderDefaultLauncherCardConfig( true );
|
||||
} else if ( launcherCardAdvertisement.cardType == LauncherCardAdvertisementData.TYPE_ACTIVITY ) {
|
||||
long curr = System.currentTimeMillis();
|
||||
if ( curr > launcherCardAdvertisement.startTime && curr < launcherCardAdvertisement.endTime ) {
|
||||
@@ -468,7 +476,7 @@ class LauncherCardRefresher {
|
||||
LauncherCardAdvertisementData.LauncherCardAdvertisement[] sorted = new LauncherCardAdvertisementData.LauncherCardAdvertisement[mAdvertisements.size()];
|
||||
sorted = mAdvertisements.toArray( sorted );
|
||||
Arrays.sort( sorted, ( ( o1, o2 ) -> {
|
||||
return o1.sort < o2.sort ? 1 : ( o1.sort == o2.sort ? 0 : -1 );
|
||||
return o1.sort > o2.sort ? 1 : ( o1.sort == o2.sort ? 0 : -1 );
|
||||
} ) );
|
||||
mAdvertisements = Arrays.asList( sorted );
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ import com.mogo.map.marker.IMogoMarkerClickListener;
|
||||
import com.mogo.map.marker.IMogoMarkerManager;
|
||||
import com.mogo.map.marker.MogoMarkerOptions;
|
||||
import com.mogo.map.marker.anim.OnMarkerAnimationListener;
|
||||
import com.mogo.map.uicontroller.EnumMapUI;
|
||||
import com.mogo.module.common.ModuleNames;
|
||||
import com.mogo.module.common.entity.MarkerCarPois;
|
||||
import com.mogo.module.common.entity.MarkerCardResult;
|
||||
@@ -32,6 +33,7 @@ import com.mogo.module.service.Utils;
|
||||
import com.mogo.module.service.network.RefreshCallback;
|
||||
import com.mogo.module.service.network.RefreshModel;
|
||||
import com.mogo.module.service.utils.ViewUtils;
|
||||
import com.mogo.service.adas.IMogoADASControlStatusChangedListener;
|
||||
import com.mogo.service.connection.IMogoOnMessageListener;
|
||||
import com.mogo.service.module.IMogoBizActionDoneListener;
|
||||
import com.mogo.utils.ResourcesHelper;
|
||||
@@ -58,7 +60,8 @@ import java.util.Map;
|
||||
*/
|
||||
public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
IMogoOnMessageListener< MarkerResponse >,
|
||||
IMogoBizActionDoneListener {
|
||||
IMogoBizActionDoneListener,
|
||||
IMogoADASControlStatusChangedListener {
|
||||
private static final String TAG = "MapMarkerManager";
|
||||
|
||||
private Context mContext;
|
||||
@@ -108,6 +111,7 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
// 长连接
|
||||
MarkerServiceHandler.getMogoSocketManager().registerOnMessageListener( 401001, this );
|
||||
MarkerServiceHandler.getActionManager().registerBizActionDoneListener( this );
|
||||
MarkerServiceHandler.getApis().getRegisterCenterApi().registerADASControlStatusChangedListener( TAG, this );
|
||||
}
|
||||
|
||||
// ACC ON 的时候重置为true,ACC OFF 设置为 false
|
||||
@@ -949,4 +953,21 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMapUiModeChanged( EnumMapUI mapUI ) {
|
||||
switch ( mapUI ) {
|
||||
case Type_Light:
|
||||
case Type_Night:
|
||||
if ( !MarkerServiceHandler.getApis().getStatusManagerApi().isMainPageOnResume() ) {
|
||||
return;
|
||||
}
|
||||
if ( mLastDataResult != null ) {
|
||||
MarkerServiceHandler.getMarkerManager().removeMarkers( ModuleNames.CARD_TYPE_ROAD_CONDITION );
|
||||
drawMarkerByCurrentType( mLastDataResult );
|
||||
mLastCheckMarker = null;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/module_services_info_window_height"
|
||||
android:paddingRight="@dimen/module_service_id_marker_content_paddingRight"
|
||||
android:background="@drawable/module_services_driver_blue_info"
|
||||
android:background="@drawable/module_services_driver_info_window_bkg"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
@@ -40,7 +40,7 @@
|
||||
android:ellipsize="end"
|
||||
android:minWidth="@dimen/module_service_content_minWidth"
|
||||
android:singleLine="true"
|
||||
android:textColor="#ffffff"
|
||||
android:textColor="@color/module_service_info_window_content_textColor"
|
||||
android:textSize="@dimen/module_service_content_textSize"
|
||||
app:layout_constraintStart_toEndOf="@+id/module_service_id_user_header"
|
||||
app:layout_constraintTop_toTopOf="@+id/module_service_id_user_header"
|
||||
@@ -86,7 +86,7 @@
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/bg_shape_reverse_triangle_grey" />
|
||||
android:src="@drawable/module_services_info_window_cursor" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="module_service_info_window_content_textColor">#ffffff</color>
|
||||
</resources>
|
||||
@@ -44,6 +44,11 @@ android {
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||
if (Boolean.valueOf(RELEASE)) {
|
||||
implementation rootProject.ext.dependencies.modulecommon
|
||||
} else {
|
||||
implementation project(':modules:mogo-module-common')
|
||||
}
|
||||
}
|
||||
|
||||
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="module_app_page_bkg_color_light">#FFFFFF</color>
|
||||
<color name="module_app_page_bkg_color_light">#B2F5F5F5</color>
|
||||
</resources>
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:angle="270"
|
||||
android:endColor="#F5F5F5"
|
||||
android:startColor="#FFFFFF" />
|
||||
<corners android:radius="360dp" />
|
||||
|
||||
<padding
|
||||
android:bottom="@dimen/dp_6"
|
||||
android:left="@dimen/dp_6"
|
||||
android:right="@dimen/dp_6"
|
||||
android:top="@dimen/dp_6" />
|
||||
|
||||
</shape>
|
||||
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<item android:id="@+id/shape_id" >
|
||||
<!-- 倒三角 -->
|
||||
<rotate
|
||||
android:fromDegrees="45"
|
||||
android:pivotX="135%"
|
||||
android:pivotY="15%"
|
||||
android:toDegrees="45" >
|
||||
<shape android:shape="rectangle" >
|
||||
<size android:width="@dimen/dp_20"
|
||||
android:height="@dimen/dp_20"/>
|
||||
<solid android:color="#F5F5F5" />
|
||||
</shape >
|
||||
</rotate >
|
||||
</item >
|
||||
</layer-list >
|
||||
@@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="module_service_info_window_content_textColor_light">#333333</color>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user