From 708b33a79c9b8bc5992de1cb6bdb33b383b8c985 Mon Sep 17 00:00:00 2001 From: tongchenfei Date: Thu, 11 Jun 2020 15:34:37 +0800 Subject: [PATCH] =?UTF-8?q?bug=20fix=20UI-751=20=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E9=80=BB=E8=BE=91=EF=BC=9A=E5=A6=82=E6=9E=9C=E4=B8=8A=E4=B8=80?= =?UTF-8?q?=E6=9D=A1=E6=9C=AA=E4=B8=8A=E6=8A=A5=E5=AE=8C=E6=88=90=E5=B0=B1?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E4=B8=8A=E6=8A=A5=EF=BC=8C=E4=BC=9Atoast?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=EF=BC=8C=E5=B9=B6=E4=B8=94=E4=B8=8D=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E4=B8=8A=E6=8A=A5=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../share/dialog/LaucherShareDialog.java | 4 ---- .../mogo/module/share/manager/UploadHelper.kt | 24 ++++++++++++------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/modules/mogo-module-share/src/main/java/com/mogo/module/share/dialog/LaucherShareDialog.java b/modules/mogo-module-share/src/main/java/com/mogo/module/share/dialog/LaucherShareDialog.java index 519f098dea..5c685d1836 100644 --- a/modules/mogo-module-share/src/main/java/com/mogo/module/share/dialog/LaucherShareDialog.java +++ b/modules/mogo-module-share/src/main/java/com/mogo/module/share/dialog/LaucherShareDialog.java @@ -1,15 +1,12 @@ package com.mogo.module.share.dialog; import android.content.Context; -import android.content.Intent; import android.graphics.PixelFormat; -import android.net.Uri; import android.os.Build; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; import android.view.WindowManager; -import android.widget.ImageView; import android.widget.TextView; import androidx.annotation.NonNull; @@ -17,7 +14,6 @@ import androidx.annotation.NonNull; import com.alibaba.android.arouter.launcher.ARouter; import com.mogo.module.common.utils.CarSeries; import com.mogo.module.share.R; -import com.mogo.module.share.ShareControl; import com.mogo.module.share.constant.ShareConstants; import com.mogo.module.share.manager.ISeekHelpListener; import com.mogo.module.share.manager.SeekHelpManager; diff --git a/modules/mogo-module-share/src/main/java/com/mogo/module/share/manager/UploadHelper.kt b/modules/mogo-module-share/src/main/java/com/mogo/module/share/manager/UploadHelper.kt index a8b09e459d..545ab05cce 100644 --- a/modules/mogo-module-share/src/main/java/com/mogo/module/share/manager/UploadHelper.kt +++ b/modules/mogo-module-share/src/main/java/com/mogo/module/share/manager/UploadHelper.kt @@ -5,6 +5,7 @@ import android.content.Intent import com.mogo.commons.voice.AIAssist import com.mogo.module.share.ShareControl import com.mogo.module.share.dialog.LaucherShareDialog +import com.mogo.utils.TipToast import com.mogo.utils.logger.Logger /** @@ -12,14 +13,19 @@ import com.mogo.utils.logger.Logger */ object UploadHelper { fun upload(context:Context, type: String) { - ServiceApisManager.serviceApis.statusManagerApi.setUploadingStatus("CARD_TYPE_ROAD_CONDITION", true) - AIAssist.getInstance(context).speakTTSVoice("感谢分享,正在上传") - Logger.d("UploadHelper", "upload ----> $type") - val intent = Intent() - intent.action = "com.zhidao.share.roadcondition.action" - intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND) - intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES) - intent.putExtra("type", type) - context.sendBroadcast(intent) + if(ServiceApisManager.serviceApis.statusManagerApi.isUploading){ + Logger.d("UploadHelper", "正在上报===") + TipToast.tip("正在上报,请稍后重试") + }else { + ServiceApisManager.serviceApis.statusManagerApi.setUploadingStatus("CARD_TYPE_ROAD_CONDITION", true) + AIAssist.getInstance(context).speakTTSVoice("感谢分享,正在上传") + Logger.d("UploadHelper", "upload ----> $type") + val intent = Intent() + intent.action = "com.zhidao.share.roadcondition.action" + intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND) + intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES) + intent.putExtra("type", type) + context.sendBroadcast(intent) + } } } \ No newline at end of file