/* Vibration Init */
ret = haptic_open();
+ if (ret == -EACCES || ret == -ECOMM || ret == -EPERM) {
+ _E("haptic_open ==> FAIL!! : %d", ret);
+ v_handle = -EACCES;
+ return;
+ }
if (ret < 0) {
_E("haptic_open ==> FAIL!! : %d", ret);
v_handle = -ENOTSUP;
return -EPERM;
}
- if (v_handle == -ENOTSUP) {
+ if (v_handle == -ENOTSUP || v_handle == -EACCES) {
_E("Not supported vibration");
- return -EACCES;
+ return v_handle;
}
if (vconf_get_bool(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, &vibstatus) < 0) {
return -EPERM;
}
- if (v_handle == -ENOTSUP) {
+ if (v_handle == -ENOTSUP || v_handle == -EACCES) {
_E("Not supported vibration");
- return -ENOTSUP;
+ return v_handle;
}
/* stop haptic device */
return -EPERM;
}
- if (v_handle == -ENOTSUP) {
+ if (v_handle == -ENOTSUP || v_handle == -EACCES) {
_E("Not supported vibration");
*supported = false;
return 0;