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 <yuni.seo@samsung.com>
(cherry picked from commit
06effe44cadedac12d0ad77a57311a7a8615f911)
{
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:
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;
}