Merge branch 'dev' into dev_1.1.2

This commit is contained in:
董宏宇
2020-07-29 20:34:50 +08:00
4 changed files with 36 additions and 41 deletions

View File

@@ -1,6 +1,5 @@
package com.mogo.module.extensions.entrance;
import android.content.Intent;
import android.graphics.Rect;
import android.os.Bundle;
import android.text.TextUtils;
@@ -45,7 +44,6 @@ import com.mogo.service.MogoServicePaths;
import com.mogo.service.analytics.IMogoAnalytics;
import com.mogo.service.entrance.ButtonIndex;
import com.mogo.service.fragmentmanager.IMogoFragmentManager;
import com.mogo.service.intent.IMogoIntentListener;
import com.mogo.service.map.IMogoMapService;
import com.mogo.service.module.IMogoRegisterCenter;
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
@@ -240,34 +238,25 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
} else {
mMApUIController.changeMapMode(EnumMapUI.NorthUP_2D);
}
// mCameraMode.setSelected(!mCameraMode.isSelected());
// mCameraMode.setText(getString(mCameraMode.isSelected() ? R.string.mode_car_up :
// R.string.mode_north_up));
});
mApis.getIntentManagerApi().registerIntentListener(AUTONAVI_STANDARD_BROADCAST_RECV,
new IMogoIntentListener() {
@Override
public void onIntentReceived(String intentStr, Intent intent) {
int key_type = intent.getIntExtra("KEY_TYPE", 0);
int type = intent.getIntExtra("EXTRA_TYPE", -1);
int opera_type = intent.getIntExtra("EXTRA_OPERA", -1);
if (key_type == 10027) {
if (opera_type == 0) {
mCameraMode.setSelected(false);
} else if (opera_type == 1) {
mCameraMode.setSelected(true);
}
mCameraMode.setText(getString(mCameraMode.isSelected() ?
R.string.mode_car_up : R.string.mode_north_up));
}
}
});
MogoEntranceButtons.save(ButtonIndex.BUTTON1,
findViewById(R.id.module_entrance_id_button1));
MogoEntranceButtons.save(ButtonIndex.BUTTON2,
findViewById(R.id.module_entrance_id_button2));
mApis.getIntentManagerApi().registerIntentListener( AUTONAVI_STANDARD_BROADCAST_RECV, (( intentStr, intent ) -> {
int key_type = intent.getIntExtra( "KEY_TYPE", 0 );
int type = intent.getIntExtra( "EXTRA_TYPE", -1 );
int opera_type = intent.getIntExtra( "EXTRA_OPERA", -1 );
if ( key_type == 10027 ) {
if ( opera_type == 0 ) {
mCameraMode.setSelected( false );
} else if ( opera_type == 1 ) {
mCameraMode.setSelected( true );
}
mCameraMode.setText( getString( mCameraMode.isSelected() ? R.string.mode_car_up : R.string.mode_north_up ) );
} else if( key_type == 10021 ){
onStopNavi();
}
}) );
MogoEntranceButtons.save( ButtonIndex.BUTTON1, findViewById( R.id.module_entrance_id_button1 ) );
MogoEntranceButtons.save( ButtonIndex.BUTTON2, findViewById( R.id.module_entrance_id_button2 ) );
mDisplayOverviewBounds = new Rect(
ResourcesHelper.getDimensionPixelSize(getContext(),
@@ -312,8 +301,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
// 埋点
final Map<String, Object> properties = new HashMap<>();
properties.put("type", 3);
ServiceApisManager.serviceApis.getAnalyticsApi().track("Launcher_APP_Icon",
properties);
ServiceApisManager.serviceApis.getAnalyticsApi().track("Launcher_APP_Icon", properties);
} catch (Exception e) {
Logger.e(TAG, e, "打开个人中心Exception");
}
@@ -321,8 +309,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
mUserHeadImg.setVisibility(DebugConfig.isLauncher() ? View.VISIBLE : View.GONE);
mUploadButtonAnimatorController = new UploadButtonAnimatorController(mUploading, mUpload,
mStatusManager);
mUploadButtonAnimatorController = new UploadButtonAnimatorController(mUploading, mUpload, mStatusManager);
debugTopView();
}
@@ -333,8 +320,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
traceData("1");
}
private static final String AUTONAVI_STANDARD_BROADCAST_RECV =
"AUTONAVI_STANDARD_BROADCAST_RECV";
private static final String AUTONAVI_STANDARD_BROADCAST_RECV = "AUTONAVI_STANDARD_BROADCAST_RECV";
@NonNull
@Override
@@ -389,8 +375,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
TopViewAnimHelper.getInstance().showNaviView();
mMApUIController.changeMapMode(mCameraMode.isSelected() ? EnumMapUI.NorthUP_2D :
EnumMapUI.CarUp_2D);
MapCenterPointStrategy.setMapCenterPointBySceneAndDelay(mMApUIController, Scene.NAVI, 500
, () -> {
MapCenterPointStrategy.setMapCenterPointBySceneAndDelay(mMApUIController, Scene.NAVI, 500, () -> {
return !mMogoNavi.isNaviing();
});
if (CustomNaviInterrupter.getInstance().interrupt()) {

View File

@@ -109,10 +109,7 @@ public class MapPresenter extends Presenter< MapView > implements
if ( key_type == 10027 ) {
if ( type == 0 ) {
onChangeTrafficMode( opera_type );
} else if ( type == 1 ) {
zoomMap( opera_type == 0 );
} else if ( type == 2 ) {
// mMogoIntentManager.invoke( AUTONAVI_STANDARD_BROADCAST_RECV, intent );
onChangeCameraMode( opera_type );
}
} else if ( key_type == 10048 ) {
@@ -183,6 +180,7 @@ public class MapPresenter extends Presenter< MapView > implements
mMogoMapService.getNavi( getContext() ).reCalculateRoute( config );
}
mMogoIntentManager.invoke( AUTONAVI_STANDARD_BROADCAST_RECV, intent );
}
};

View File

@@ -164,8 +164,8 @@ public class VoiceConstants {
static {
// 免唤醒
// sVoiceCmds.put( VoiceConstants.CMD_MAP_ZOOM_IN_UN_WAKEUP, VoiceConstants.CMD_MAP_ZOOM_IN_TRIGGER_WORDS );
// sVoiceCmds.put( VoiceConstants.CMD_MAP_ZOOM_OUT_UN_WAKEUP, VoiceConstants.CMD_MAP_ZOOM_OUT_TRIGGER_WORDS );
sVoiceCmds.put( VoiceConstants.CMD_MAP_ZOOM_IN_UN_WAKEUP, VoiceConstants.CMD_MAP_ZOOM_IN_TRIGGER_WORDS );
sVoiceCmds.put( VoiceConstants.CMD_MAP_ZOOM_OUT_UN_WAKEUP, VoiceConstants.CMD_MAP_ZOOM_OUT_TRIGGER_WORDS );
//sVoiceCmds.put( VoiceConstants.CMD_MAP_2D_UN_WAKEUP, VoiceConstants.CMD_MAP_2D_TRIGGER_WORDS );
//sVoiceCmds.put( VoiceConstants.CMD_MAP_3D_UN_WAKEUP, VoiceConstants.CMD_MAP_3D_TRIGGER_WORDS );
//sVoiceCmds.put( VoiceConstants.CMD_MAP_DAY_TIME_MODE_UN_WAKEUP, VoiceConstants.CMD_MAP_DAY_TIME_MODE_TRIGGER_WORDS );

View File

@@ -11,6 +11,7 @@ import android.widget.TextView;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.commons.voice.AIAssist;
import com.mogo.commons.voice.IMogoVoiceCmdCallBack;
import com.mogo.module.media.MediaConstants;
import com.mogo.module.media.R;
import com.mogo.module.media.ServiceMediaHandler;
import com.mogo.module.media.constants.MusicConstant;
@@ -22,6 +23,8 @@ import com.mogo.module.media.view.IMusicView;
import com.mogo.module.media.widget.AnimCircleImageView;
import com.mogo.module.media.widget.NoScrollSeekBar;
import com.mogo.module.media.widget.ScrollingTextView;
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
import com.mogo.service.statusmanager.StatusDescriptor;
import com.mogo.utils.WindowUtils;
import com.mogo.utils.glide.GlideApp;
import com.mogo.utils.logger.Logger;
@@ -72,11 +75,20 @@ public class MediaWindow2 implements IMusicView {
});
}
ServiceMediaHandler.getIMogoStatusManager().registerStatusChangedListener(MediaConstants.MODULE_TYPE, StatusDescriptor.ACC_STATUS, (descriptor, isTrue) -> {
if (descriptor == StatusDescriptor.ACC_STATUS&&!isTrue) {
ServiceMediaHandler.getMogoWindowManager().removeView(mWindowView);
mHasAddWindow = false;
}
});
isFirstPlay = true;
}
private void addWindowView() {
Log.d(TAG, "addWindowView===" + mHasAddWindow);
if (ServiceMediaHandler.getMogoWindowManager() == null) {
Log.d(TAG, "addWindowView return");
return;
}