#include <stdio.h>
#include <fcntl.h>
-#include <sys/reboot.h>
#include <glib.h>
-#include <libsyscommon/dbus-system.h>
+#include <sys/reboot.h>
+
+#include <system_info.h>
#include <systemd/sd-daemon.h>
+#include <libsyscommon/dbus-system.h>
#include "core/log.h"
#include "core/common.h"
#include "haptic/haptic.h"
+#define VIBRATION_FEATURE "http://tizen.org/feature/feedback.vibration"
+
static GMainLoop *mainloop = NULL;
static void sig_quit(int signo)
{
int ret;
dbus_handle_h handle = NULL;
+ bool haptic_avail = false;
+
+ ret = system_info_get_platform_bool(VIBRATION_FEATURE, &haptic_avail);
+ if ((ret < 0) || !haptic_avail) {
+ _I("Vibration feature is not supported.");
+ return 0;
+ }
mainloop = g_main_loop_new(NULL, FALSE);
ret = haptic_probe();
if (ret != 0) {
_E("'Haptic' probe fail.");
+ g_main_loop_unref(mainloop);
return ret;
}
haptic_init();