From: Yunhee Seo Date: Tue, 17 Jan 2023 06:50:17 +0000 (+0900) Subject: input: add enum type DEVICE_INPUT_TYPE_ALL handling X-Git-Tag: accepted/tizen/7.0/unified/20230207.015122~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2fd7a87d054d92c18c8b0ef0609f83997b6c9ae5;p=platform%2Fcore%2Fapi%2Fdevice.git input: add enum type DEVICE_INPUT_TYPE_ALL handling To avoid get DEVICE_INPUT_TYPE_ALL from device_input_get_default_device api because this type cannot have default input device also, add checking DEVICE_INPUT_TYPE_ALL to input_is_supported_input_type which was omitted Change-Id: I6b20a76fcde9b67097a3cb5606f71fa747483550 Signed-off-by: Yunhee Seo (cherry picked from commit 06effe44cadedac12d0ad77a57311a7a8615f911) --- diff --git a/src/input-internal.c b/src/input-internal.c index fb15c83..059ed4e 100644 --- a/src/input-internal.c +++ b/src/input-internal.c @@ -34,6 +34,7 @@ static bool input_is_supported_input_type(device_input_type_e input_device_type) { switch (input_device_type) { case DEVICE_INPUT_TYPE_UNKNOWN: + case DEVICE_INPUT_TYPE_ALL: case DEVICE_INPUT_TYPE_MOUSE: case DEVICE_INPUT_TYPE_KEYBOARD: case DEVICE_INPUT_TYPE_CUSTOM_KNOB: @@ -53,7 +54,7 @@ int device_input_get_default_device(device_input_type_e input_device_type, int * return DEVICE_ERROR_INVALID_PARAMETER; } - if (!input_device_id) { + if (!input_device_id || input_device_type == DEVICE_INPUT_TYPE_ALL) { _E("Invalid parameters"); return DEVICE_ERROR_INVALID_PARAMETER; }