summaryrefslogtreecommitdiff
path: root/src/wearable
diff options
context:
space:
mode:
authorGeunsun, Lee <gs86.lee@samsung.com>2016-08-09 16:17:29 +0900
committerGeunsun, Lee <gs86.lee@samsung.com>2016-08-09 16:18:09 +0900
commit42d0dd0e193f695501ea1a9dfa7c965f5009528c (patch)
tree4b6a4985b40d581c4298aa05853f969d06084860 /src/wearable
parentbaf979b73ac6f1cb94137ba1f77f959d9208ff8c (diff)
downloadstarter-42d0dd0e193f695501ea1a9dfa7c965f5009528c.tar.gz
starter-42d0dd0e193f695501ea1a9dfa7c965f5009528c.tar.bz2
starter-42d0dd0e193f695501ea1a9dfa7c965f5009528c.zip
[Wearable] Implement double key press operationsubmit/tizen_wearable/20160819.015426
Change-Id: I9e070eb3470d44e5fa618c691d423fc202b20d6c
Diffstat (limited to 'src/wearable')
-rw-r--r--src/wearable/hw_key.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/wearable/hw_key.c b/src/wearable/hw_key.c
index c5448c6..d76ee58 100644
--- a/src/wearable/hw_key.c
+++ b/src/wearable/hw_key.c
@@ -399,7 +399,11 @@ void hw_key_destroy_window(void)
#define POWERKEY_LCDOFF_TIMER_SEC 0.4
#define POWERKEY_TIMER_SEC 0.25
+#define APP_CONTROL_OPERATION_MAIN_KEY "__APP_SVC_OP_TYPE__"
+#define APP_CONTROL_OPERATION_MAIN_VALUE "http://tizen.org/appcontrol/operation/main"
+
#define USE_DBUS_POWEROFF 1
+#define W_TASKMGR_PKGNAME "org.tizen.task-mgr"
const char *key_name[KEY_NAME_MAX] = {
"XF86AudioRaiseVolume",
@@ -508,6 +512,29 @@ static Eina_Bool _long_press_timer_cb(void* data)
+static void _do_double_home_key_operation(void)
+{
+ int op = 0;
+
+ op = status_passive_get()->setappl_double_press_home_key;
+ _D("Dobule home key operation : %d", op);
+
+ switch(op) {
+ case VCONFKEY_DOUBLE_PRESS_HOME_KEY_NONE:
+ break;
+ case VCONFKEY_DOUBLE_PRESS_HOME_KEY_LAST_APP:
+ break;
+ case VCONFKEY_DOUBLE_PRESS_HOME_KEY_RECENT_APPS:
+ process_mgr_must_launch(W_TASKMGR_PKGNAME, NULL, NULL, NULL, NULL);
+ break;
+ default:
+ _E("invalid operation(%d)", op);
+ break;
+ }
+}
+
+
+
static Eina_Bool _powerkey_timer_cb(void *data)
{
_W("%s, powerkey count[%d]", __func__, key_info.powerkey_count);
@@ -530,6 +557,7 @@ static Eina_Bool _powerkey_timer_cb(void *data)
/* double press */
_W("powerkey double press");
key_info.powerkey_count = 0;
+ _do_double_home_key_operation();
return ECORE_CALLBACK_CANCEL;
}
key_info.powerkey_count = 0;