merge from qa
This commit is contained in:
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@@ -4,7 +4,7 @@
|
||||
<asm skipDebug="false" skipFrames="false" skipCode="false" expandFrames="false" />
|
||||
<groovy codeStyle="LEGACY" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="JDK" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -25,7 +25,7 @@ android {
|
||||
externalNativeBuild {
|
||||
ndk {
|
||||
// 设置支持的SO库架构
|
||||
abiFilters 'armeabi-v7a','x86'
|
||||
abiFilters 'armeabi-v7a'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -192,9 +192,6 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.guideshowprovider
|
||||
implementation rootProject.ext.dependencies.guideshow
|
||||
|
||||
implementation rootProject.ext.dependencies.modulepush, {
|
||||
exclude group: 'com.mogo.module', module: 'module-common'
|
||||
}
|
||||
implementation rootProject.ext.dependencies.moduleadcard
|
||||
|
||||
implementation rootProject.ext.dependencies.moduleV2x
|
||||
@@ -202,6 +199,10 @@ dependencies {
|
||||
exclude group: 'com.mogo.module', module: 'module-share'
|
||||
}
|
||||
|
||||
implementation rootProject.ext.dependencies.modulepushbase
|
||||
launcherImplementation rootProject.ext.dependencies.modulepush
|
||||
independentImplementation rootProject.ext.dependencies.modulepushnoop
|
||||
|
||||
if (Boolean.valueOf(RELEASE)) {
|
||||
launcherImplementation rootProject.ext.dependencies.modulemainlauncher
|
||||
independentImplementation rootProject.ext.dependencies.modulemainindependent
|
||||
|
||||
@@ -16,6 +16,7 @@ import com.mogo.module.common.MogoModule;
|
||||
import com.mogo.module.common.MogoModulePaths;
|
||||
import com.mogo.module.main.service.MogoMainService;
|
||||
import com.mogo.module.media.MediaConstants;
|
||||
import com.mogo.module.push.base.PushUIConstants;
|
||||
import com.mogo.module.service.ServiceConst;
|
||||
import com.mogo.module.tanlu.constant.TanluConstants;
|
||||
import com.mogo.module.v2x.V2XConst;
|
||||
@@ -51,7 +52,7 @@ public class MogoApplication extends AbsMogoApplication {
|
||||
MogoModulePaths.addModule(new MogoModule(AuthorizeConstant.PATH_AGREEMENT_FRAGMENT, AuthorizeConstant.PATH_AGREEMENT_MODULE_NAME));
|
||||
|
||||
//运营位卡片,需要默认显示,放在第一个加载
|
||||
MogoModulePaths.addModule(new MogoModule(AdCardConstants.TAG, AdCardConstants.MODULE_NAME));
|
||||
// MogoModulePaths.addModule(new MogoModule(AdCardConstants.TAG, AdCardConstants.MODULE_NAME));
|
||||
if (DebugConfig.isLauncher()) {
|
||||
MogoModulePaths.addModule(new MogoModule(MediaConstants.TAG, MediaConstants.MODULE_TYPE));
|
||||
}
|
||||
@@ -63,7 +64,7 @@ public class MogoApplication extends AbsMogoApplication {
|
||||
MogoModulePaths.addBaseModule(new MogoModule(ServiceConst.PATH_REFRESH_STRATEGY, ServiceConst.PATH_REFRESH_STRATEGY));
|
||||
MogoModulePaths.addBaseModule(new MogoModule(V2XConst.PATH_V2X_UI, V2XConst.PATH_V2X_UI));
|
||||
// 暂时去掉推送
|
||||
// MogoModulePaths.addModule(new MogoModule(PushUIConstants.TAG, PushUIConstants.TAG));
|
||||
MogoModulePaths.addModule(new MogoModule( PushUIConstants.PATH, PushUIConstants.NAME));
|
||||
|
||||
if (!DebugConfig.isLauncher()) {
|
||||
PersistentManager.getInstance().initManager(this);
|
||||
|
||||
@@ -112,7 +112,10 @@ ext {
|
||||
moduleV2x : "com.mogo.module:module-v2x:${MOGO_MODULE_V2X_VERSION}",
|
||||
modulemedia : "com.mogo.module:module-media:${MOGO_MODULE_MEDIA_VERSION}",
|
||||
modulesearch : "com.mogo.module:module-search:${MOGO_MODULE_SEARCH_VERSION}",
|
||||
// push
|
||||
modulepush : "com.mogo.module:module-push:${MOGO_MODULE_PUSH_VERSION}",
|
||||
modulepushbase : "com.mogo.module:module-push-base:${MOGO_MODULE_PUSH_BASE_VERSION}",
|
||||
modulepushnoop : "com.mogo.module:module-push-noop:${MOGO_MODULE_PUSH_NOOP_VERSION}",
|
||||
//运营位卡片
|
||||
moduleadcard : "com.mogo.module:module-adcard:${MOGO_MODULE_AD_CARD_VERSION}",
|
||||
//统一返回键
|
||||
|
||||
@@ -73,7 +73,9 @@ MOGO_MODULE_ONLINECAR_VERSION=1.0.3.2
|
||||
# v2x
|
||||
MOGO_MODULE_V2X_VERSION=1.1.53
|
||||
# 推送
|
||||
MOGO_MODULE_PUSH_VERSION=1.0.1
|
||||
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
|
||||
# 探路上报和分享模块
|
||||
|
||||
@@ -68,13 +68,27 @@ public class KwPresenter extends BaseMediaPresenter<IMusicView> {
|
||||
});
|
||||
|
||||
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<IMusicView> {
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -182,10 +182,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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -55,6 +55,7 @@ import com.mogo.service.module.MogoAction;
|
||||
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
|
||||
import com.mogo.service.statusmanager.IMogoStatusManager;
|
||||
import com.mogo.service.statusmanager.StatusDescriptor;
|
||||
import com.mogo.utils.TipToast;
|
||||
import com.mogo.utils.WorkThreadHandler;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
@@ -286,6 +287,7 @@ public class MogoServices implements IMogoMapListener,
|
||||
mStatusManager.registerStatusChangedListener( ServiceConst.TYPE, StatusDescriptor.ADAS_UI, this );
|
||||
mStatusManager.registerStatusChangedListener( ServiceConst.TYPE, StatusDescriptor.MAIN_PAGE_RESUME, this );
|
||||
mStatusManager.registerStatusChangedListener( ServiceConst.TYPE, StatusDescriptor.SEEK_HELPING, this );
|
||||
mStatusManager.registerStatusChangedListener( ServiceConst.TYPE, StatusDescriptor.ACC_STATUS, this );
|
||||
mStatusManager.setAIAssistReady( TAG, AIAssist.getInstance( mContext ).hasFlush() );
|
||||
|
||||
registerMogoReceiver( context );
|
||||
@@ -474,10 +476,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 +716,12 @@ public class MogoServices implements IMogoMapListener,
|
||||
case ACC_STATUS:
|
||||
if ( isTrue ) {
|
||||
mADASController.showADAS();
|
||||
try {
|
||||
MarkerServiceHandler.getApis().getMapServiceApi().getMarkerManager( mContext ).removeMarkers();
|
||||
} catch ( Exception e ) {
|
||||
Logger.e( TAG, e, "error." );
|
||||
}
|
||||
refreshStrategy();
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -756,7 +764,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 ) {
|
||||
|
||||
@@ -293,6 +293,7 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
MogoLatLng centerPoint ) {
|
||||
// 将数据同步给在线车辆,避免每次 perform 的时候去拉取,造成消耗
|
||||
if ( onlineCarList == null || onlineCarList.isEmpty() ) {
|
||||
MarkerServiceHandler.getMarkerManager().removeMarkers( ModuleNames.CARD_TYPE_USER_DATA );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -324,9 +325,12 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
|
||||
String sn = getPrimaryKeyFromEntity( markerOnlineCar );
|
||||
IMogoMarker mogoMarker = existCarMap.get( sn );
|
||||
if ( mogoMarker == null ) {
|
||||
if ( mogoMarker == null || mogoMarker.isDestroyed() ) {
|
||||
mogoMarker = drawMapMarker( markerShowEntity, ServiceConst.MARKER_Z_INDEX_LOW );
|
||||
}
|
||||
if ( mogoMarker != null ) {
|
||||
mogoMarker.setVisible( true );
|
||||
}
|
||||
startSmooth( mogoMarker, markerOnlineCar, markerLocation );
|
||||
}
|
||||
|
||||
@@ -349,8 +353,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();
|
||||
@@ -363,9 +366,12 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
|
||||
String sn = getPrimaryKeyFromEntity( markerExploreWay );
|
||||
IMogoMarker mogoMarker = existCarMap.get( sn );
|
||||
if ( mogoMarker == null ) {
|
||||
if ( mogoMarker == null || mogoMarker.isDestroyed() ) {
|
||||
Logger.d( TAG, "draw road condition, sn = %s", sn );
|
||||
drawMapMarker( markerShowEntity, ServiceConst.MARKER_Z_INDEX_HIGH );
|
||||
mogoMarker = drawMapMarker( markerShowEntity, ServiceConst.MARKER_Z_INDEX_HIGH );
|
||||
}
|
||||
if ( mogoMarker != null ) {
|
||||
mogoMarker.setVisible( true );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user