#include <vconf-keys.h>
#include <sys/time.h>
#include <libsyscommon/list.h>
+#include <libsyscommon/common.h>
#include <hal/device/hal-device-power.h>
#include "shared/log.h"
states[get_pm_cur_state()].trans(EVENT_TIMEOUT);
} else {
if ((get_pm_cur_state() == S_SLEEP)
- && (is_emulator() == true || timeout_sleep_support == false))
+ && (syscommon_is_emulator() == true || timeout_sleep_support == false))
return 0;
st->action(st->timeout);
#include <hal/device/hal-battery.h>
#include <libsyscommon/libgdbus.h>
#include <libsyscommon/list.h>
+#include <libsyscommon/common.h>
#include "lowbat-handler.h"
#include "battery-ops.h"
static int power_execute(int state)
{
- if (is_emulator()) {
+ if (syscommon_is_emulator()) {
CRITICAL_LOG("Poweroff by lowbattery is disabled at emulator.");
return 0;
}
#include <stdbool.h>
#include <fcntl.h>
#include <libsyscommon/libgdbus.h>
+#include <libsyscommon/common.h>
#include "core.h"
#include "display.h"
if (pid != INTERNAL_LOCK_AMBIENT)
return;
- if (is_emulator()) {
+ if (syscommon_is_emulator()) {
/* In emulator, deviced does not turn off the display. */
if (display_panel_get_dpms_cached_state() == DPMS_ON)
return;
* @brief This file has functions related to display state transition
*/
+#include <libsyscommon/common.h>
#include "shared/log.h"
#include "core/udev.h"
#include "device-interface.h"
return -EPERM;
if ((get_pm_cur_state() == S_LCDOFF)
- && (is_emulator() == true || timeout_sleep_support == false))
+ && (syscommon_is_emulator() == true || timeout_sleep_support == false))
return -EPERM;
_I("Reset timeout(%d ms) pm_cur_state(%d).", timeout, get_pm_cur_state());
display_state_transition_do_state_transition(get_pm_cur_state(), EVENT_TIMEOUT);
} else {
if ((get_pm_cur_state() == S_SLEEP) &&
- (is_emulator() == true || timeout_sleep_support == false))
+ (syscommon_is_emulator() == true || timeout_sleep_support == false))
return 0;
display_plugin_state_get_timeout(get_pm_cur_state(), &timeout);
display_state_transition_do_state_transition_by_pm_control_event(&recv_data);
return 0;
-}
\ No newline at end of file
+}
#include <stdarg.h>
#include <errno.h>
#include <poll.h>
-#include <system_info.h>
#include "log.h"
#include "common.h"
return r;
}
-#define MODEL_NAME "http://tizen.org/system/model_name"
-#define MODEL_EMULATOR "Emulator"
-
-bool is_emulator(void)
-{
- int ret;
- char *model_name = NULL;
- static bool emul = false;
- static int set = 0;
-
- if (set)
- return emul;
-
- ret = system_info_get_platform_string(MODEL_NAME, &model_name);
- if (ret < 0) {
- _E("Cannot get model name: %d", ret);
- return emul;
- }
-
- if (!strncmp(MODEL_EMULATOR, model_name, strlen(model_name) + 1))
- emul = true;
-
- set = 1;
- free(model_name);
-
- return emul;
-}
-
int do_mkdir(const char *path, mode_t mode)
{
char d[PATH_MAX];
#endif
int get_systemd_reboot_param(char *buf, unsigned bufsize);
-bool is_emulator(void);
int do_mkdir(const char *path, mode_t mode);
int do_copy_force(const char *src, const char *dst);
void watchdog_notify(void);
#include <libsyscommon/libsystemd.h>
#include <libsyscommon/list.h>
#include <libsyscommon/ini-parser.h>
+#include <libsyscommon/common.h>
#include <hal/device/hal-board.h>
#include <shared/log.h>
syscommon_config_parse_by_section(PATH_USB_GADGET_CONF, load_usb_gadget_config, NULL);
- if (is_emulator()) {
+ if (syscommon_is_emulator()) {
__usb_gadget_open = dummy_usb_gadget_open;
__usb_gadget_close = dummy_usb_gadget_close;
__usb_gadget_enable = dummy_usb_gadget_enable;