diff options
author | Irfan Abdul <irfan.abdul@samsung.com> | 2016-10-25 21:38:46 +0530 |
---|---|---|
committer | Irfan Abdul <irfan.abdul@samsung.com> | 2016-10-25 21:38:46 +0530 |
commit | fe58561ffe1224ea1220faa25b47841487b2c4dc (patch) | |
tree | 5bb666ada494b25c60d1a92ed5db4b4e1c681adc | |
parent | 54433de706516075c7fa8fbbb4e42b6c8d057c1a (diff) | |
download | timer-fe58561ffe1224ea1220faa25b47841487b2c4dc.tar.gz timer-fe58561ffe1224ea1220faa25b47841487b2c4dc.tar.bz2 timer-fe58561ffe1224ea1220faa25b47841487b2c4dc.zip |
[TIMER] Fix TSAM 8901: Vibration does not work in timer notificationsubmit/tizen/20161026.071443
Change-Id: I0bae3e80af3b0ac855e7a28d8db5458f24dead9e
-rwxr-xr-x | timer_alert/src/ring.c | 11 | ||||
-rwxr-xr-x | timer_alert/src/sound.c | 5 | ||||
-rwxr-xr-x | tizen-manifest.xml | 3 |
3 files changed, 16 insertions, 3 deletions
diff --git a/timer_alert/src/ring.c b/timer_alert/src/ring.c index 7994879..9c3a471 100755 --- a/timer_alert/src/ring.c +++ b/timer_alert/src/ring.c @@ -22,6 +22,7 @@ #include <sound_manager.h> #include "timer_alert_string.h" #include "log.h" +#include <feedback.h> #define KEY_POWER "XF86PowerOff" #define KEY_BACK "XF86Back" @@ -234,7 +235,8 @@ static Eina_Bool _update_ring_view_by_timer_cb(void *data) snprintf(buf, sizeof(buf), "-%02d:%02d", delay_count/60, delay_count%60); elm_object_part_text_set(ly_main, "time", buf); - + int ret = feedback_play(FEEDBACK_PATTERN_TAP); + _D("feedback play ret:%d", ret); return ECORE_CALLBACK_RENEW; } @@ -290,6 +292,7 @@ app_create(void *data) If this function returns true, the main loop of application starts If this function returns false, the application is terminated */ appdata_s *ad = data; + int ret = 0; char* respath = app_get_resource_path(); char locale_path[256] = {0,}; snprintf(locale_path,sizeof(locale_path),"%s/locale",respath); @@ -297,6 +300,8 @@ app_create(void *data) create_base_gui(ad); _ring_pm_state_set(EINA_TRUE); ring_view_add_by_timer(ad->nf); + ret = feedback_initialize(); + _D("Feeback init: %d", ret); return true; } @@ -333,6 +338,10 @@ static void app_terminate(void *data) { _TMR_ENTER_; + int ret = feedback_stop(); + _D("feedback stop ret:%d", ret); + ret = feedback_deinitialize(); + _D("feedback deinit ret:%d", ret); } static void diff --git a/timer_alert/src/sound.c b/timer_alert/src/sound.c index a5e8cba..82cc407 100755 --- a/timer_alert/src/sound.c +++ b/timer_alert/src/sound.c @@ -26,6 +26,7 @@ #include <widget_errno.h> #include "sound.h" + static void _ring_player_error_cb(int error_code, void *data) { _TMR_ENTER_; @@ -53,6 +54,7 @@ static Eina_Bool _ring_player_start_cb(void *data) void ring_stop_player(void) { _TMR_ENTER_; + if (mm_player == NULL) { _E("mm_player = NULL. Returnr"); return; @@ -78,6 +80,7 @@ void ring_create_player(void) _D("player create"); int ret = SUCCESS; + /* Player create */ if (!mm_player) { player_h *player = (player_h *)calloc(1, sizeof(player_h)); @@ -100,7 +103,7 @@ void ring_create_player(void) player_state_e play_state; player_get_state(*(mm_player), &play_state); if (play_state == PLAYER_STATE_IDLE) { - ret = player_set_uri(*(mm_player), RING_DEFALT_TONE); + ret = player_set_uri(*(mm_player), RING_ON_CALL_TONE); if (PLAYER_ERROR_NONE != ret) { _E("player_set_uri Error ID: %x", ret); player_destroy(*(mm_player)); diff --git a/tizen-manifest.xml b/tizen-manifest.xml index 858afa7..8609396 100755 --- a/tizen-manifest.xml +++ b/tizen-manifest.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <manifest xmlns="http://tizen.org/ns/packages" api-version="3.0" package="org.tizen.timer" version="1.0.0"> <profile name="wearable"/> - <ui-application appid="org.tizen.timer" exec="timer" multiple="false" nodisplay="false" taskmanage="true" hw-acceleration="on" type="capp" > + <ui-application appid="org.tizen.timer" exec="timer" hw-acceleration="on" multiple="false" nodisplay="false" taskmanage="true" type="capp"> <label>Timer</label> <label xml:lang="hy-am">Ժամանակաչափ</label> <label xml:lang="az-az">Sayqac</label> @@ -55,6 +55,7 @@ <icon>org.tizen.timer.png</icon> </ui-application> <privileges> + <privilege>http://tizen.org/privilege/haptic</privilege> <privilege>http://tizen.org/privilege/appmanager.launch</privilege> <privilege>http://tizen.org/privilege/display</privilege> </privileges> |