+++ /dev/null
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __STC_EMULATOR_H__
-#define __STC_EMULATOR_H__
-
-#include <glib.h>
-
-gboolean stc_emulator_is_emulated(void);
-void stc_emulator_check_environment(void);
-
-#endif /* __STC_EMULATOR_H__ */
+++ /dev/null
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <stdio.h>
-#include <system_info.h>
-
-#include "stc-emulator.h"
-#include "stc-manager-util.h"
-
-static gboolean stc_is_emulated = FALSE;
-
-static gboolean __stc_emulator_check_env(void)
-{
- int ret;
- char *model = NULL;
-
- ret = system_info_get_platform_string("tizen.org/system/model_name", &model);
- if (ret != SYSTEM_INFO_ERROR_NONE) {
- STC_LOGE("Failed to get system information(%d)", ret); //LCOV_EXCL_LINE
- return FALSE; //LCOV_EXCL_LINE
- }
-
- if (model && strncmp(model, "Emulator", strlen("Emulator")) == 0) {
- g_free(model); //LCOV_EXCL_LINE
- return TRUE; //LCOV_EXCL_LINE
- }
-
- g_free(model); //LCOV_EXCL_LINE
- return FALSE; //LCOV_EXCL_LINE
-}
-
-gboolean stc_emulator_is_emulated(void)
-{
- return stc_is_emulated;
-}
-
-void stc_emulator_check_environment(void)
-{
- stc_is_emulated = __stc_emulator_check_env();
-
- STC_LOGD("Emulation environment : %s",
- stc_is_emulated ? "It's emulated" : "Not emulated");
-}
-
#include <errno.h>
#include <sys/wait.h>
#include "stc-manager.h"
-#include "stc-emulator.h"
#include "stc-manager-gdbus.h"
#include "stc-db.h"
#include "counter.h"
/* Crate the GLIB main loop */
main_loop = g_main_loop_new(NULL, FALSE);
- stc_emulator_check_environment();
- if (stc_emulator_is_emulated() == FALSE) {
- g_stc = __stc_manager_init();
- if (!g_stc)
- goto fail;
- g_stc->main_loop = main_loop;
- }
+ g_stc = __stc_manager_init();
+ if (!g_stc)
+ goto fail;
+
+ g_stc->main_loop = main_loop;
/* Run the main loop */
g_main_loop_run(main_loop);
ret = 0;
fail:
- if (stc_emulator_is_emulated() == FALSE)
- __stc_manager_deinit();
+ __stc_manager_deinit();
if (main_loop)
g_main_loop_unref(main_loop);