mirror of
https://gitee.com/openharmony/msdp_device_status
synced 2024-11-23 15:40:16 +00:00
Merge branch 'master' of https://gitee.com/openharmony/msdp_device_status into dev_snake_animation
Change-Id: Ie9a88aab51941d9a6128ca98b73cda2eae67dd22
This commit is contained in:
commit
706e6a157c
@ -77,7 +77,7 @@ constexpr int32_t RADIUS_OUT { 42 };
|
||||
constexpr int32_t ALPHA_IN { 51 };
|
||||
constexpr int32_t ALPHA_OUT { 0 };
|
||||
const std::string UD_KEY { "Unified data key" };
|
||||
const std::string EXTRA_INFO { "{ \"drag_allow_distributed\", false }" };
|
||||
const std::string EXTRA_INFO { "{ \"drag_allow_distributed\" : false }" };
|
||||
const std::string SYSTEM_CORE { "system_core" };
|
||||
const std::string SYSTEM_BASIC { "system_basic" };
|
||||
int32_t g_deviceMouseId { -1 };
|
||||
|
@ -92,6 +92,7 @@ constexpr int32_t GLOBAL_WINDOW_ID { -1 };
|
||||
constexpr int32_t MOUSE_DRAG_CURSOR_CIRCLE_STYLE { 41 };
|
||||
constexpr int32_t CURSOR_CIRCLE_MIDDLE { 2 };
|
||||
constexpr int32_t ALPHA_SHIFT { 24 };
|
||||
constexpr size_t EXTRA_INFO_MAX_SIZE { 200 };
|
||||
const Rosen::RSAnimationTimingCurve SHARP_CURVE = Rosen::RSAnimationTimingCurve::CreateCubicCurve(0.33, 0, 0.67, 1);
|
||||
const std::string DEVICE_TYPE_DEFAULT { "default" };
|
||||
const std::string DEVICE_TYPE_PHONE { "phone" };
|
||||
@ -1171,6 +1172,10 @@ bool DragDrawing::GetAllowDragState()
|
||||
FI_HILOGE("The extraInfo is empty");
|
||||
return true;
|
||||
}
|
||||
if (g_drawingInfo.extraInfo.size() > EXTRA_INFO_MAX_SIZE) {
|
||||
FI_HILOGE("The extraInfo is greater than the length limit");
|
||||
return true;
|
||||
}
|
||||
JsonDataParser extraInfoParser;
|
||||
extraInfoParser.json = cJSON_Parse(g_drawingInfo.extraInfo.c_str());
|
||||
if (!cJSON_IsObject(extraInfoParser.json)) {
|
||||
@ -1183,7 +1188,7 @@ bool DragDrawing::GetAllowDragState()
|
||||
return true;
|
||||
}
|
||||
cJSON *json = cJSON_GetObjectItem(extraInfoParser.json, "drag_allow_distributed");
|
||||
if (json != nullptr || !cJSON_IsBool(json)) {
|
||||
if (json == nullptr || !cJSON_IsBool(json)) {
|
||||
FI_HILOGE("Can't parse \'drag_allow_distributed\' in extraInfo");
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user