优化点击即上报成功:连续点击场景
This commit is contained in:
@@ -75,7 +75,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
IMogoMapListener,
|
||||
IMogoAimlessModeListener,
|
||||
IMogoStatusChangedListener,
|
||||
IMogoIntentListener{
|
||||
IMogoIntentListener {
|
||||
|
||||
private static final String TAG = "EntranceFragment";
|
||||
|
||||
@@ -192,13 +192,13 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
}
|
||||
mStatusManager.setUserInteractionStatus(TAG, true, false);
|
||||
mMApUIController.recoverLockMode();
|
||||
UiThreadHandler.postDelayed( ()->{
|
||||
UiThreadHandler.postDelayed(() -> {
|
||||
if (!mStatusManager.isV2XShow()) {
|
||||
mStatusManager.setUserInteractionStatus(TAG, true, false);
|
||||
mMApUIController.setLockZoom(16);
|
||||
mMApUIController.changeZoom(16.0f);
|
||||
}
|
||||
}, 1_000L );
|
||||
}, 1_000L);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -208,7 +208,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
return true;
|
||||
});
|
||||
|
||||
mUploadRoadCondition.setOnLongClickListener(view->{
|
||||
mUploadRoadCondition.setOnLongClickListener(view -> {
|
||||
mApis.getMogoMonitorApi().showLogDebugDialog();
|
||||
return true;
|
||||
});
|
||||
@@ -301,7 +301,8 @@ 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");
|
||||
}
|
||||
@@ -309,7 +310,8 @@ 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();
|
||||
}
|
||||
@@ -320,7 +322,8 @@ 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
|
||||
@@ -450,17 +453,19 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
return;
|
||||
}
|
||||
|
||||
if (descriptor == StatusDescriptor.UPLOADING) {
|
||||
if (isTrue) {
|
||||
mUploading.setVisibility(View.VISIBLE);
|
||||
mUpload.setVisibility(View.GONE);
|
||||
mUploadButtonAnimatorController.doFrameAnimOnUploadButton();
|
||||
} else {
|
||||
mUploadButtonAnimatorController.stopAnimation();
|
||||
mUploading.setVisibility(View.GONE);
|
||||
mUpload.setVisibility(View.VISIBLE);
|
||||
}
|
||||
} else if (descriptor == StatusDescriptor.DISPLAY_OVERVIEW) {
|
||||
// 1.1.5的需求,上报即成功,去掉此处动画
|
||||
// if (descriptor == StatusDescriptor.UPLOADING) {
|
||||
// if (isTrue) {
|
||||
// mUploading.setVisibility(View.VISIBLE);
|
||||
// mUpload.setVisibility(View.GONE);
|
||||
// mUploadButtonAnimatorController.doFrameAnimOnUploadButton();
|
||||
// } else {
|
||||
// mUploadButtonAnimatorController.stopAnimation();
|
||||
// mUploading.setVisibility(View.GONE);
|
||||
// mUpload.setVisibility(View.VISIBLE);
|
||||
// }
|
||||
// } else
|
||||
if (descriptor == StatusDescriptor.DISPLAY_OVERVIEW) {
|
||||
if (!mMogoNavi.isNaviing()) {
|
||||
return;
|
||||
}
|
||||
@@ -585,7 +590,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
});
|
||||
});
|
||||
|
||||
findViewById(R.id.btnDebugAddBottomLayerView).setOnClickListener(v->{
|
||||
findViewById(R.id.btnDebugAddBottomLayerView).setOnClickListener(v -> {
|
||||
TextView tv = new TextView(getContext());
|
||||
tv.setText("entrance add");
|
||||
mApis.getEntranceButtonController().addBottomLayerView(tv, 50, 50);
|
||||
@@ -593,28 +598,30 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMapModeChanged( EnumMapUI ui ) {
|
||||
if ( mCameraMode == null ) {
|
||||
public void onMapModeChanged(EnumMapUI ui) {
|
||||
if (mCameraMode == null) {
|
||||
return;
|
||||
}
|
||||
mCameraMode.setSelected(ui == EnumMapUI.NorthUP_2D);
|
||||
mCameraMode.setText(getString(ui == EnumMapUI.NorthUP_2D ? R.string.mode_car_up : R.string.mode_north_up));
|
||||
mCameraMode.setText(getString(ui == EnumMapUI.NorthUP_2D ? R.string.mode_car_up :
|
||||
R.string.mode_north_up));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
if ( mMogoRegisterCenter != null ) {
|
||||
if (mMogoRegisterCenter != null) {
|
||||
mMogoRegisterCenter.unregisterMogoNaviListener(ExtensionsModuleConst.TYPE_ENTRANCE);
|
||||
mMogoRegisterCenter.unregisterMogoMapListener(ExtensionsModuleConst.TYPE_ENTRANCE);
|
||||
mMogoRegisterCenter.unregisterMogoAimlessModeListener(TAG);
|
||||
}
|
||||
if ( mStatusManager != null ) {
|
||||
if (mStatusManager != null) {
|
||||
mStatusManager.unregisterStatusChangedListener(TAG, StatusDescriptor.UPLOADING, this);
|
||||
mStatusManager.unregisterStatusChangedListener(TAG, StatusDescriptor.DISPLAY_OVERVIEW, this);
|
||||
mStatusManager.unregisterStatusChangedListener(TAG, StatusDescriptor.DISPLAY_OVERVIEW
|
||||
, this);
|
||||
}
|
||||
if ( mApis != null ) {
|
||||
if ( mApis.getIntentManagerApi() != null ) {
|
||||
if (mApis != null) {
|
||||
if (mApis.getIntentManagerApi() != null) {
|
||||
mApis.getIntentManagerApi().unregisterIntentListener(AUTONAVI_STANDARD_BROADCAST_RECV, this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,14 +19,15 @@ import com.mogo.utils.logger.Logger
|
||||
object UploadHelper {
|
||||
fun upload(context:Context, type: TanluUploadParams,forcePlayVoice:Boolean = false) {
|
||||
if(ServiceApisManager.serviceApis.statusManagerApi.isUploading){
|
||||
Logger.d("UploadHelper", "正在上报===")
|
||||
TipToast.tip("正在上报,请稍后重试")
|
||||
// 上报即成功,当前还有正在上报的事件,仅做界面展示,不做具体操作
|
||||
ServiceApisManager.serviceApis.tanluUiApi.shareSuccess(type.eventType, type.location)
|
||||
// Logger.d("UploadHelper", "正在上报===")
|
||||
// TipToast.tip("正在上报,请稍后重试")
|
||||
}else {
|
||||
// 判断当前网络状态
|
||||
if(NetworkUtils.isConnected(context)) {
|
||||
// 有网就正常上报
|
||||
// 1.1.5的需求,上报即成功,所以不需要设定下面这个变量
|
||||
// ServiceApisManager.serviceApis.statusManagerApi.setUploadingStatus("CARD_TYPE_ROAD_CONDITION", true)
|
||||
ServiceApisManager.serviceApis.statusManagerApi.setUploadingStatus("CARD_TYPE_ROAD_CONDITION", true)
|
||||
// if (DebugConfig.getAIType() == DebugConfig.AI_TYPE_TXZ || forcePlayVoice) {
|
||||
// 因为思必驰语音分享时,语音助手会自己播报一段文字
|
||||
// AIAssist.getInstance(context).speakTTSVoice("感谢分享,正在上传")
|
||||
|
||||
Reference in New Issue
Block a user