From 234b0148dafb670ca0fba96958d47f8e6bd36df4 Mon Sep 17 00:00:00 2001 From: heguokai <275503077@qq.com> Date: Thu, 11 Sep 2025 15:02:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbutton=E4=B8=ADiconsResource?= =?UTF-8?q?=E8=A7=A3=E6=9E=90=E5=A4=B1=E8=B4=A5=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?&=E4=BF=AE=E5=A4=8D=E5=85=8D=E6=89=93=E6=89=B0=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: heguokai <275503077@qq.com> --- frameworks/ets/ani/src/sts_convert_other.cpp | 7 +++---- frameworks/ets/ani/src/sts_notification_manager.cpp | 4 ---- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/frameworks/ets/ani/src/sts_convert_other.cpp b/frameworks/ets/ani/src/sts_convert_other.cpp index 25cd98494..50dbaa6bf 100644 --- a/frameworks/ets/ani/src/sts_convert_other.cpp +++ b/frameworks/ets/ani/src/sts_convert_other.cpp @@ -104,10 +104,9 @@ ani_status UnwrapResource(ani_env *env, ani_object obj, ResourceManager::Resourc std::string moduleName = GetResizeStr(tempStr, STR_MAX_SIZE); resource.moduleName = moduleName; - ani_double idAni = 0.0; - if ((status = GetPropertyDouble(env, obj, "id", isUndefined, idAni)) != ANI_OK - || isUndefined == ANI_TRUE) { - ANS_LOGE("GetPropertyDouble id fail. status : %{public}d", status); + ani_long idAni = 0; + if ((status = env->Object_GetPropertyByName_Long(obj, "id", &idAni)) != ANI_OK) { + ANS_LOGE("Object_GetPropertyByName_Long id fail. status : %{public}d", status); return ANI_INVALID_ARGS; } resource.id = static_cast(idAni); diff --git a/frameworks/ets/ani/src/sts_notification_manager.cpp b/frameworks/ets/ani/src/sts_notification_manager.cpp index 06f993d6d..be48c0455 100644 --- a/frameworks/ets/ani/src/sts_notification_manager.cpp +++ b/frameworks/ets/ani/src/sts_notification_manager.cpp @@ -837,10 +837,6 @@ bool UnWarpNotificationDoNotDisturbDate( return false; } } - if (beginTime >= endTime) { - ANS_LOGE("Invalid time range"); - return false; - } doNotDisturbDate.SetBeginDate(beginTime); doNotDisturbDate.SetEndDate(endTime); ANS_LOGD("Successfully parsed DoNotDisturbDate"); -- Gitee