diff --git a/frameworks/ets/ani/src/sts_convert_other.cpp b/frameworks/ets/ani/src/sts_convert_other.cpp index 25cd98494789928b1880192104d672ed157f86e7..50dbaa6bf80a4b6a399381cc01f3f98d7d01f836 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 06f993d6d087324bf359db011daa15855dc79d24..be48c0455303a85b01e4c23912fcb016d1349815 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");