{
LOGI("device implementation init");
TizenDeviceImpl *obj = static_cast<TizenDeviceImpl *>(this);
- obj->mFakeTouchHandle = efl_util_input_initialize_generator(EFL_UTIL_INPUT_DEVTYPE_TOUCHSCREEN);
+ obj->mFakeTouchHandle = efl_util_input_initialize_generator_with_sync(EFL_UTIL_INPUT_DEVTYPE_TOUCHSCREEN, NULL);
obj->mFakeKeyboardHandle =
- efl_util_input_initialize_generator(EFL_UTIL_INPUT_DEVTYPE_KEYBOARD);
+ efl_util_input_initialize_generator_with_sync(EFL_UTIL_INPUT_DEVTYPE_KEYBOARD, NULL);
int width = 0;
int height = 0;
dependency('capi-appfw-service-application'),
dependency('capi-system-system-settings'),
dependency('capi-base-utils-i18n'),
+ dependency('vconf'),
]
endif
#include <iostream>
-#include <glib.h>
-#include "bootstrap.h"
-
#include <service_app.h>
-
#include <gio/gio.h>
#include <grpcpp/grpcpp.h>
#include <aurum.grpc.pb.h>
+#include <glib.h>
+#include <vconf.h>
+#include <system_info.h>
+#include "bootstrap.h"
#include "AurumServiceImpl.h"
#include "config.h"
typedef struct _ServiceContext {
std::unique_ptr<Server> server;
+ bool forceTouchEnabled;
} ServiceContext;
+static void _vconf_force_enable_touch_set(void *data, bool enable)
+{
+ ServiceContext *ctx = (ServiceContext *)data;
+ int ret;
+
+ if (ctx->forceTouchEnabled == enable) return;
+
+ ret = vconf_set_bool("memory/window_system/input/force_enable_touch", enable);
+ if (ret != VCONF_OK) {
+ LOGE("Fail to set touch enable via vconf");
+ return;
+ }
+
+ ctx->forceTouchEnabled = enable;
+}
+
static bool _service_app_create(void *data)
{
ServiceContext *ctx = (ServiceContext *)data;
std::string binding("0.0.0.0:50051");
aurumServiceImpl service;
ServerBuilder builder;
+ char *value;
+ int ret;
+
+ ctx->forceTouchEnabled = false;
+ ret = system_info_get_platform_string("http://tizen.org/feature/profile", &value);
+ if (ret != SYSTEM_INFO_ERROR_NONE) LOGE("Fail to get system profile infomation");
+ else {
+ if (!strncmp("tv", value, 2))
+ _vconf_force_enable_touch_set(ctx, true);
+
+ free(value);
+ }
LOGI("[T] Server Listening on %s", binding.c_str());
builder.AddListeningPort(binding, grpc::InsecureServerCredentials());
static void _service_app_terminate(void *data)
{
ServiceContext *ctx = (ServiceContext *)data;
+
+ if (ctx->forceTouchEnabled)
+ _vconf_force_enable_touch_set(ctx, false);
ctx->server->Shutdown();
}
BuildRequires: pkgconfig(libtzplatform-config)
BuildRequires: pkgconfig(capi-system-system-settings)
BuildRequires: pkgconfig(capi-base-utils-i18n)
+BuildRequires: pkgconfig(vconf)
%if 0%{?gendoc:1}
BuildRequires: doxygen
BuildRequires: lcov
%endif
-%if "%{?profile}" == "tv"
- %define __hash_signing 0
-%else
- %define __hash_signing 1
-%endif
-
-%if 0%{?__hash_signing}
BuildRequires: hash-signer
%if 0%{?sec_product_feature_profile_wearable}
Requires(post): signing-client
%endif
-%endif
%description
aurum is a project for testing ui.
%install
-%if 0%{?__hash_signing}
%define tizen_sign 1
%define tizen_sign_base /usr/apps/org.tizen.aurum-bootstrap
%define tizen_sign_level platform
%define tizen_author_sign 1
%define tizen_dist_sign 1
-%endif
export DESTDIR=%{buildroot}
ninja -C gbsbuild install
output = stream.read()
# Start scrip here
-run_command("sdb root on")
run_command("sdb forward tcp:50051 tcp:50051")
run_command("sdb shell app_launcher -s org.tizen.aurum-bootstrap")
# Wait 1 sec till bootstrap launched
output = stream.read()
# Start scrip here
-run_command("sdb root on")
-# To run bootstrap as command
-run_command("sdb shell tpk-backend -y org.tizen.aurum-bootstrap --preload")
-# TV need to enable touch
-run_command("sdb shell vconftool set -f -t bool memory/window_system/input/force_enable_touch 1")
-# Dut to input generator issue, temporarily do below command
-run_command("sdb shell winfo -init_device --type=touch")
run_command("sdb forward tcp:50051 tcp:50051")
run_command("sdb shell app_launcher -s org.tizen.aurum-bootstrap")
# Wait 1 sec till bootstrap launched