diff --git a/app/build.gradle b/app/build.gradle
index 2718b5d308..8921b9cb87 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -25,7 +25,7 @@ android {
externalNativeBuild {
ndk {
// 设置支持的SO库架构
- abiFilters 'armeabi-v7a','x86'
+ abiFilters 'armeabi-v7a'
}
}
}
@@ -63,9 +63,12 @@ android {
independent {
manifest.srcFile 'src/independent/AndroidManifest.xml'
}
- e8xx {
+ e8xx{
manifest.srcFile 'src/e8xx/AndroidManifest.xml'
}
+ em4 {
+ manifest.srcFile 'src/em4/AndroidManifest.xml'
+ }
}
flavorDimensions "product", "basic", "env"
@@ -100,13 +103,34 @@ android {
buildConfigField 'int', 'AIType','2'
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'false'
}
- // e系列
+ // e系列,采用Launcher方案
e8xx {
dimension "product"
// 使用思必驰语音
buildConfigField 'int', 'AIType','2'
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'true'
}
+ // 同上
+ em4 {
+ dimension "product"
+ // 使用思必驰语音
+ buildConfigField 'int', 'AIType','2'
+ buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'true'
+ }
+ // e系列-2+32,对标D系列2+32,采用独立app的形式
+ em3 {
+ dimension "product"
+ // 使用思必驰语音
+ buildConfigField 'int', 'AIType', '2'
+ buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'true'
+ }
+ // e系列-1+16,对标D系列1+16,采用独立app形式
+ em1 {
+ dimension "product"
+ // 使用思必驰语音
+ buildConfigField 'int', 'AIType', '2'
+ buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'true'
+ }
// d系列
d8xx {
dimension "product"
@@ -220,14 +244,21 @@ dependencies {
implementation rootProject.ext.dependencies.moduleservice
// 事件面板分渠道引用
d82xImplementation rootProject.ext.dependencies.moduleventpanelnoop
+ em1Implementation rootProject.ext.dependencies.moduleventpanelnoop
d8xxImplementation rootProject.ext.dependencies.moduleventpanel
+ em4Implementation rootProject.ext.dependencies.moduleventpanel
e8xxImplementation rootProject.ext.dependencies.moduleventpanel
f8xxImplementation rootProject.ext.dependencies.moduleventpanel
+ em3Implementation rootProject.ext.dependencies.moduleventpanel
// 左侧面板分渠道引用
d82xImplementation rootProject.ext.dependencies.moduleleftpanel
+ em1Implementation rootProject.ext.dependencies.moduleleftpanel
d8xxImplementation rootProject.ext.dependencies.moduleleftpanelnoop
+ em4Implementation rootProject.ext.dependencies.moduleleftpanelnoop
+ e8xxImplementation rootProject.ext.dependencies.moduleleftpanelnoop
e8xxImplementation rootProject.ext.dependencies.moduleleftpanelnoop
f8xxImplementation rootProject.ext.dependencies.moduleleftpanelnoop
+ em3Implementation rootProject.ext.dependencies.moduleleftpanelnoop
} else {
launcherImplementation project(':main-extensions:mogo-module-main-launcher')
// launcherImplementation project(':modules:mogo-module-main')
@@ -243,14 +274,20 @@ dependencies {
implementation project(':modules:mogo-module-service')
// 事件面板分渠道引用
d82xImplementation project(':modules:mogo-module-event-panel-noop')
+ em1Implementation project(':modules:mogo-module-event-panel-noop')
d8xxImplementation project(':modules:mogo-module-event-panel')
+ em4Implementation project(':modules:mogo-module-event-panel')
e8xxImplementation project(':modules:mogo-module-event-panel')
f8xxImplementation project(':modules:mogo-module-event-panel')
+ em3Implementation project(':modules:mogo-module-event-panel')
// 左侧面板分渠道引用
d82xImplementation project(':modules:mogo-module-left-panel')
+ em1Implementation project(':modules:mogo-module-left-panel')
d8xxImplementation project(':modules:mogo-module-left-panel-noop')
+ em4Implementation project(':modules:mogo-module-left-panel-noop')
e8xxImplementation project(':modules:mogo-module-left-panel-noop')
f8xxImplementation project(':modules:mogo-module-left-panel-noop')
+ em3Implementation project(':modules:mogo-module-left-panel-noop')
}
}
diff --git a/app/src/em4/AndroidManifest.xml b/app/src/em4/AndroidManifest.xml
new file mode 100644
index 0000000000..d755054676
--- /dev/null
+++ b/app/src/em4/AndroidManifest.xml
@@ -0,0 +1,6 @@
+
+
+
\ No newline at end of file
diff --git a/gradle.properties b/gradle.properties
index afbb1c99bb..9761541b02 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -74,9 +74,9 @@ MOGO_MODULE_ONLINECAR_VERSION=1.0.3.2
# v2x
MOGO_MODULE_V2X_VERSION=1.2.7
# 推送
-MOGO_MODULE_PUSH_VERSION=1.1.5.2
-MOGO_MODULE_PUSH_BASE_VERSION=1.1.5.2
-MOGO_MODULE_PUSH_NOOP_VERSION=1.1.5.2
+MOGO_MODULE_PUSH_VERSION=1.1.5.5
+MOGO_MODULE_PUSH_BASE_VERSION=1.1.5.5
+MOGO_MODULE_PUSH_NOOP_VERSION=1.1.5.5
# 广告资源位
MOGO_MODULE_AD_CARD_VERSION=1.0.1
# 探路上报和分享模块
diff --git a/modules/mogo-module-main/src/main/java/com/mogo/module/main/MainActivity.java b/modules/mogo-module-main/src/main/java/com/mogo/module/main/MainActivity.java
index 5ec6d71509..b42f31f3c3 100644
--- a/modules/mogo-module-main/src/main/java/com/mogo/module/main/MainActivity.java
+++ b/modules/mogo-module-main/src/main/java/com/mogo/module/main/MainActivity.java
@@ -237,7 +237,7 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
super.onPause();
mMogoStatusManager.setMainPageResumeStatus( TAG, false );
mMogoStatusManager.setMainPageLaunchedStatus( TAG, false );
- if ( !mIsHomeKeyDown ) {
+ if ( !mIsHomeKeyDown || !DebugConfig.isLauncher() ) {
mServiceApis.getAdasControllerApi().closeADAS();
}
mIsHomeKeyDown = false;
diff --git a/modules/mogo-module-media/src/main/java/com/mogo/module/media/presenter/KwPresenter.java b/modules/mogo-module-media/src/main/java/com/mogo/module/media/presenter/KwPresenter.java
index a43c30f4af..a45a42bb6d 100644
--- a/modules/mogo-module-media/src/main/java/com/mogo/module/media/presenter/KwPresenter.java
+++ b/modules/mogo-module-media/src/main/java/com/mogo/module/media/presenter/KwPresenter.java
@@ -68,13 +68,27 @@ public class KwPresenter extends BaseMediaPresenter {
});
kwapi.registerPlayerStatusListener((playerStatus, music) -> {
- Logger.d(TAG, "onPlayerStatusListener: " + playerStatus);
- Log.d(TAG, "onPlayerStatusListener: " + playerStatus);
+ Logger.d(TAG, "onPlayerStatusListener: " + playerStatus + " music: " + music.name);
switch (playerStatus) {
case BUFFERING:
+ if (currentMedia.getMediaName() == null || !currentMedia.getMediaName().equals(music.name)) {
+ // 说明是切了新歌,需要及时同步一下状态
+ currentMedia.setPlayState(MusicConstant.PLAY_STATE_PLAYING);
+ currentMedia.setMediaName(music.name);
+ currentMedia.setMediaImg("");
+ mView.onMediaInfoChanged(currentMedia);
+ mView.onMusicPlaying();
+ }
kwapi.getSongPicUrl(music, onGetSongImgUrlListener);
break;
case PLAYING:
+ if (currentMedia.getMediaName() == null || !currentMedia.getMediaName().equals(music.name)) {
+ // 说明是切了新歌,需要及时同步一下状态
+ currentMedia.setPlayState(MusicConstant.PLAY_STATE_PLAYING);
+ currentMedia.setMediaName(music.name);
+ currentMedia.setMediaImg("");
+ mView.onMediaInfoChanged(currentMedia);
+ }
currentMedia.setPlayState(MusicConstant.PLAY_STATE_PLAYING);
kwapi.getSongPicUrl(music, onGetSongImgUrlListener);
startTrackTrackProgress();
@@ -105,6 +119,43 @@ public class KwPresenter extends BaseMediaPresenter {
if (!isBind) {
// 未绑定,需要重新绑定,同时第一次绑定初始化也是在此处
kwapi.bindAutoSdkService();
+ }else if(kwapi.isKuwoRunning()){
+ Music currentMusic = kwapi.getNowPlayingMusic();
+ if (currentMedia.getMediaName() == null && currentMusic != null) {
+ // 当前处于绑定状态,且有音乐信息,需判断是否正在播放,进行界面刷新
+ Log.d(TAG, "step1==" + currentMusic.name);
+ if (kwapi.getPlayerStatus() == PlayerStatus.BUFFERING || kwapi.getPlayerStatus() == PlayerStatus.PLAYING) {
+ Logger.d(TAG, "当前可能正在播放音乐,需要更新=1=" + currentMusic.name);
+ currentMedia.setMediaName(currentMusic.name);
+ currentMedia.setPlayState(MusicConstant.PLAY_STATE_PLAYING);
+ mView.onMediaInfoChanged(currentMedia);
+ mView.onMusicPlaying();
+ kwapi.getSongPicUrl(currentMusic, onGetSongImgUrlListener);
+ } else if (kwapi.getPlayerStatus() == PlayerStatus.INIT) {
+ Logger.d(TAG, "当前可能正在播放音乐,需要更新=3=" + currentMusic.name);
+ currentMedia.setMediaName(currentMusic.name);
+ currentMedia.setPlayState(MusicConstant.PLAY_STATE_PAUSE_OR_STOP);
+ mView.onMediaInfoChanged(currentMedia);
+ mView.onMusicStopped();
+ }
+ } else if (currentMedia.getMediaName() != null && currentMusic != null && !currentMedia.getMediaName().equals(currentMusic.name)) {
+ Log.d(TAG, "step2==media: " + currentMedia.getMediaName() + " " +
+ "musicName: " + currentMusic.name + " status: " + kwapi.getPlayerStatus());
+ if (kwapi.getPlayerStatus() == PlayerStatus.BUFFERING || kwapi.getPlayerStatus() == PlayerStatus.PLAYING) {
+ Logger.d(TAG, "当前可能正在播放音乐,需要更新=2=" + currentMusic.name);
+ currentMedia.setMediaName(currentMusic.name);
+ currentMedia.setPlayState(MusicConstant.PLAY_STATE_PLAYING);
+ mView.onMediaInfoChanged(currentMedia);
+ mView.onMusicPlaying();
+ kwapi.getSongPicUrl(currentMusic, onGetSongImgUrlListener);
+ }else if (kwapi.getPlayerStatus() == PlayerStatus.INIT) {
+ Logger.d(TAG, "当前可能正在播放音乐,需要更新=4=" + currentMusic.name);
+ currentMedia.setMediaName(currentMusic.name);
+ currentMedia.setPlayState(MusicConstant.PLAY_STATE_PAUSE_OR_STOP);
+ mView.onMediaInfoChanged(currentMedia);
+ mView.onMusicStopped();
+ }
+ }
}
}
}
diff --git a/modules/mogo-module-media/src/main/java/com/mogo/module/media/widget/AnimCircleImageView.java b/modules/mogo-module-media/src/main/java/com/mogo/module/media/widget/AnimCircleImageView.java
index 77cee5ce4e..6a0a8daab1 100644
--- a/modules/mogo-module-media/src/main/java/com/mogo/module/media/widget/AnimCircleImageView.java
+++ b/modules/mogo-module-media/src/main/java/com/mogo/module/media/widget/AnimCircleImageView.java
@@ -13,6 +13,7 @@ import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.NinePatchDrawable;
import android.util.AttributeSet;
+import android.util.Log;
import android.widget.ImageView;
import com.mogo.module.common.utils.CarSeries;
@@ -32,7 +33,8 @@ public class AnimCircleImageView extends ImageView {
int savedDegree;
boolean isRotateEnable;
boolean isRotating;
- private int delayMilliseconds = 450;
+// private int delayMilliseconds = 450;
+ private int delayMilliseconds = 2000;
private int mRotateAngleStep = 3;
public AnimCircleImageView(Context context) {
@@ -79,6 +81,7 @@ public class AnimCircleImageView extends ImageView {
}
public void startAnim() {
+ Log.d("AnimCircle", "startAnim====" + isRotating);
if (isRotating){
return;
}
@@ -86,9 +89,12 @@ public class AnimCircleImageView extends ImageView {
isRotating = true;
currentDegree = savedDegree;
invalidate();
+ Log.d("AnimCircle", "invalidate==");
}
public void stopAnim() {
+ Log.d("AnimCircle", "stopAnim===");
+ removeCallbacks(loopInvalidate);
isRotating = false;
isRotateEnable = false;
savedDegree = currentDegree;
@@ -100,7 +106,7 @@ public class AnimCircleImageView extends ImageView {
@Override
protected void onDraw(Canvas canvas) {
-
+ Log.d("AnimCircle", "onDraw====");
try {
if (mDrawbleSrc == null)
return;
@@ -146,7 +152,9 @@ public class AnimCircleImageView extends ImageView {
canvas.drawBitmap(output, defaultWidth / 2 - radius, defaultHeight / 2 - radius, null);
canvas.restore();
if (isRotateEnable) {
- postInvalidateDelayed(delayMilliseconds);
+ removeCallbacks(loopInvalidate);
+ postDelayed(loopInvalidate, delayMilliseconds);
+// postInvalidateDelayed(delayMilliseconds);
}
} else {
canvas.save();
@@ -161,6 +169,8 @@ public class AnimCircleImageView extends ImageView {
}
+ private Runnable loopInvalidate = this::invalidate;
+
private Bitmap getCuttedPicture(Drawable DrawbleSrc) {
Bitmap mBitmapOrigin = ((BitmapDrawable) DrawbleSrc).getBitmap();
int mWidth = mBitmapOrigin.getWidth();
diff --git a/modules/mogo-module-media/src/main/java/com/mogo/module/media/window/MediaWindow2.java b/modules/mogo-module-media/src/main/java/com/mogo/module/media/window/MediaWindow2.java
index 818bf5e792..8be84e1222 100644
--- a/modules/mogo-module-media/src/main/java/com/mogo/module/media/window/MediaWindow2.java
+++ b/modules/mogo-module-media/src/main/java/com/mogo/module/media/window/MediaWindow2.java
@@ -27,7 +27,9 @@ import com.mogo.utils.logger.Logger;
import com.tencent.wecarflow.flowoutside.sdk.FlowPlayControl;
/**
- * 适配爱趣听的window
+ * 适配爱趣听和酷我的window,通过presenter区分
+ * 爱趣听使用{@link com.mogo.module.media.presenter.WeCarFlowPresenter}
+ * 酷我使用{@link KwPresenter}
*
* @author tongchenfei
*/
@@ -182,10 +184,14 @@ public class MediaWindow2 implements IMusicView {
}
if (mCircleImg != null) {
- com.bumptech.glide.request.RequestOptions options =
- new com.bumptech.glide.request.RequestOptions()
- .placeholder(R.drawable.module_media_default_music_img);
- GlideApp.with(mContext).applyDefaultRequestOptions(options).load(mMediaInfoData.getMediaImg()).into(mCircleImg);
+ if(mMediaInfoData!=null&&mMediaInfoData.getMediaImg()!=null&&!mMediaInfoData.getMediaImg().isEmpty()) {
+ com.bumptech.glide.request.RequestOptions options =
+ new com.bumptech.glide.request.RequestOptions()
+ .placeholder(R.drawable.module_media_default_music_img);
+ GlideApp.with(mContext).applyDefaultRequestOptions(options).load(mMediaInfoData.getMediaImg()).into(mCircleImg);
+ }else{
+ mCircleImg.setImageResource(R.drawable.module_media_default_music_img);
+ }
}
}
diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/MogoServices.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/MogoServices.java
index 9082bcadea..26572251a6 100644
--- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/MogoServices.java
+++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/MogoServices.java
@@ -474,10 +474,10 @@ public class MogoServices implements IMogoMapListener,
}
private void stopAutoRefreshStrategy() {
- stopAutoRefreshStrategy(true);
+ stopAutoRefreshStrategy( true );
}
- private void stopAutoRefreshStrategy(boolean stopOnlineCarRefresh) {
+ private void stopAutoRefreshStrategy( boolean stopOnlineCarRefresh ) {
if ( DebugConfig.isDebug() ) {
Logger.d( TAG, Log.getStackTraceString( new Throwable() ) );
}
@@ -714,6 +714,13 @@ public class MogoServices implements IMogoMapListener,
case ACC_STATUS:
if ( isTrue ) {
mADASController.showADAS();
+ refreshStrategy();
+ } else {
+ try {
+ MarkerServiceHandler.getApis().getMapServiceApi().getMarkerManager( mContext ).removeMarkers();
+ } catch ( Exception e ) {
+ Logger.e( TAG, e, "error." );
+ }
}
break;
}
@@ -756,7 +763,7 @@ public class MogoServices implements IMogoMapListener,
Logger.w( TAG, "ignore refresh request case time < 0" );
return;
}
- stopAutoRefreshStrategy(stopOnlineCarRefresh);
+ stopAutoRefreshStrategy( stopOnlineCarRefresh );
mRefreshRemainingTime = time;
long delay = ServiceConst.DECREASE_INTERVAL;
if ( mRefreshRemainingTime < ServiceConst.DECREASE_INTERVAL ) {
diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerManager.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerManager.java
index d762476e0c..7e0c094b6f 100644
--- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerManager.java
+++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerManager.java
@@ -349,8 +349,7 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
}
int size = getAppropriateSize( maxAmount, exploreWayList );
Map< String, IMogoMarker > existCarMap = purgeMarkerData( exploreWayList, ModuleNames.CARD_TYPE_ROAD_CONDITION );
- Logger.i( TAG, "existCarMap: size = %d", existCarMap.size() );
- for ( int i = 0; i < size; i++ ) {
+ Logger.i( TAG, "existCarMap: size = %d", existCarMap.size() );for ( int i = 0; i < size; i++ ) {
MarkerExploreWay markerExploreWay = exploreWayList.get( i );
if ( !markerExploreWay.getCanLive() ) {
MarkerLocation markerLocation = markerExploreWay.getLocation();