summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVikas Kumar Agrawal <vikas.ag@samsung.com>2018-02-27 10:38:09 +0530
committerVikas Kumar Agrawal <vikas.ag@samsung.com>2018-02-27 10:38:55 +0530
commitec35bde05ff878ba57bcd124d224f7254536823b (patch)
tree5643c777b0376321041772687f1f340a3194b362
parentfac2f6173328417e0a98d7dace658ca5102ac573 (diff)
parenta3af7da6d92ae19fa6b76ee405659ef63070084d (diff)
downloadtimer-ec35bde05ff878ba57bcd124d224f7254536823b.tar.gz
timer-ec35bde05ff878ba57bcd124d224f7254536823b.tar.bz2
timer-ec35bde05ff878ba57bcd124d224f7254536823b.zip
Merge remote-tracking branch 'origin/tizen_4.0' into tizen
Change-Id: I4cea8187c35b98ed477f12b767e923615053dad1
-rwxr-xr-xinc/log.h3
-rwxr-xr-xinc/main.h22
-rwxr-xr-xsrc/main.c10
-rwxr-xr-xtimer_alert/inc/ring.h4
-rw-r--r--timer_alert/inc/timer_alert_string.h2
-rwxr-xr-xtimer_alert/src/ring.c1
-rwxr-xr-xtimer_alert/src/sound.c6
7 files changed, 26 insertions, 22 deletions
diff --git a/inc/log.h b/inc/log.h
index 4136a73..c12c52e 100755
--- a/inc/log.h
+++ b/inc/log.h
@@ -19,6 +19,7 @@
#include <unistd.h>
#include <dlog.h>
+/* color defines */
#define FONT_COLOR_RESET "\033[0m"
#define FONT_COLOR_RED "\033[31m"
#define FONT_COLOR_GREEN "\033[32m"
@@ -41,6 +42,8 @@
#undef LOG_TAG
#define LOG_TAG "TIMER"
+
+/* output log functions define*/
#if !defined(_D)
#define _D(fmt, arg...) dlog_print(DLOG_DEBUG, \
LOG_TAG, "%s: %s(%d) > " WCOLOR_GREEN fmt WCOLOR_END, MODULE_INFO, \
diff --git a/inc/main.h b/inc/main.h
index 5a98b05..34021f2 100755
--- a/inc/main.h
+++ b/inc/main.h
@@ -30,7 +30,6 @@
#define GRP_MAIN "main"
#define CONTROL_DOT "/time_picker_control_dot.png"
#define MAX_PATH_LEN 1024
-#define GRP_MAIN_GEAR3 "main,gear3"
#define GRP_MAIN_GEAR3_NEW "main,gear3_new"
#define BUF_SIZE 32
#define BUF_SIZE_256 256
@@ -53,7 +52,9 @@
#endif
#define UPTIME_FILE "/proc/uptime"
-
+/*
+ * @brief:enum to mark current or expected state of app
+ */
typedef enum {
TMR_STATE_TYPE_RESET = 0,
TMR_STATE_TYPE_START,
@@ -62,12 +63,18 @@ typedef enum {
TMR_STATE_TYPE_MAX,
} TMR_STATE_TYPE;
+/*
+ * @brief:enum to mark current or expected time type
+ */
typedef enum {
TMR_TIME_TYPE_HOUR,
TMR_TIME_TYPE_MIN,
TMR_TIME_TYPE_SEC,
} TMR_TIME_TYPE;
+/*
+ * @brief:enum to mark current or expected state of system type
+ */
typedef enum {
TMR_SYSTIME_TYPE_USEC,
TMR_SYSTIME_TYPE_SEC,
@@ -83,14 +90,7 @@ struct lap_data {
char interval_data[20]; // to record the intarval time on the time pannel
};
-typedef enum {
- SAMPLE_APP_ERROR_OK = 0,
- SAMPLE_APP_ERROR_FAIL = -1,
- SAMPLE_APP_ERROR_INVALID_PARAMETER = -2,
- SAMPLE_APP_ERROR_OUT_OF_MEMORY = -3,
- SAMPLE_APP_ERROR_NO_DATA = -4,
-} sample_app_error_e;
-
+// define data structure for screenreader api with every readable object
typedef struct screenreader_data {
Evas_Object* timer_title;
Evas_Object* hour_spinner;
@@ -154,7 +154,7 @@ typedef struct appdata {
Eina_Bool restart_flag;
Eina_Bool start_delaying;
Eina_Bool reset_delaying;
- char timer_edj_path[MAX_PATH_LEN];
+ char timer_edj_path[MAX_PATH_LEN]; //path to
char timer_control_dot_path[MAX_PATH_LEN];
char edje_radio_theme_path[MAX_PATH_LEN];
Elm_Theme *theme;
diff --git a/src/main.c b/src/main.c
index c969d36..2b92371 100755
--- a/src/main.c
+++ b/src/main.c
@@ -1013,7 +1013,6 @@ void _launch_alert(void* data)
ret = device_display_change_state(DISPLAY_STATE_NORMAL);
TMR_INFO("set display status to normal: ret:%d", ret);
}
- //int ret = device_power_wakeup(false);
app_control_create(&app_control);
app_control_set_operation(app_control, APP_CONTROL_OPERATION_DEFAULT);
app_control_set_app_id(app_control, "org.tizen.w-timer.alert");
@@ -1101,9 +1100,8 @@ static void _tmr_start_cb(void *data)
ad->tmp_usec = tmr_systime_double_to_time_t(ad->start_systime, TMR_SYSTIME_TYPE_USEC);
if (ad->restart_flag) {
ad->tmp_usec += ad->due_time.tv_usec;
- if (ad->tmp_usec >= 1000000) {
+ if (ad->tmp_usec >= 1000000)
ad->tmp_usec -= 1000000;
- }
}
double t = ((double)(ad->tmp_usec)/1000000);
@@ -2344,6 +2342,9 @@ void _screen_reader_objects_create(void* data)
elm_access_action_cb_set(sr_data->start_button, ELM_ACCESS_ACTION_ACTIVATE, _screen_reader_start_button_cb, ad);
+ elm_atspi_accessible_relationship_append(ad->win, ELM_ATSPI_RELATION_FLOWS_TO, sr_data->timer_title);
+
+ elm_atspi_accessible_relationship_append(sr_data->timer_title, ELM_ATSPI_RELATION_FLOWS_FROM, sr_data->timer_title);
elm_atspi_accessible_relationship_append(sr_data->reset_cancel_button, ELM_ATSPI_RELATION_FLOWS_FROM, sr_data->timer_title);
elm_atspi_accessible_relationship_append(sr_data->hour_spinner, ELM_ATSPI_RELATION_FLOWS_FROM, sr_data->reset_cancel_button);
elm_atspi_accessible_relationship_append(sr_data->min_spinner, ELM_ATSPI_RELATION_FLOWS_FROM, sr_data->hour_spinner);
@@ -2352,7 +2353,6 @@ void _screen_reader_objects_create(void* data)
elm_atspi_accessible_relationship_append(sr_data->time_text, ELM_ATSPI_RELATION_FLOWS_FROM, sr_data->start_button);
elm_atspi_accessible_relationship_append(sr_data->pause_resume_button, ELM_ATSPI_RELATION_FLOWS_FROM, sr_data->time_text);
- //elm_atspi_accessible_relationship_append(sr_data->time_text, ELM_ATSPI_RELATION_FLOWS_FROM, sr_data->cancel_button);
elm_atspi_accessible_relationship_append(sr_data->timer_title, ELM_ATSPI_RELATION_FLOWS_TO, sr_data->reset_cancel_button);
elm_atspi_accessible_relationship_append(sr_data->reset_cancel_button, ELM_ATSPI_RELATION_FLOWS_TO, sr_data->hour_spinner);
@@ -2361,9 +2361,7 @@ void _screen_reader_objects_create(void* data)
elm_atspi_accessible_relationship_append(sr_data->sec_spinner, ELM_ATSPI_RELATION_FLOWS_TO, sr_data->start_button);
elm_atspi_accessible_relationship_append(sr_data->start_button, ELM_ATSPI_RELATION_FLOWS_TO, sr_data->time_text);
- //elm_atspi_accessible_relationship_append(sr_data->cancel_button, ELM_ATSPI_RELATION_FLOWS_TO, sr_data->time_text);
elm_atspi_accessible_relationship_append(sr_data->time_text, ELM_ATSPI_RELATION_FLOWS_TO, sr_data->pause_resume_button);
- elm_atspi_accessible_relationship_append(sr_data->time_text, ELM_ATSPI_RELATION_FLOWS_TO, NULL);
}
/*
diff --git a/timer_alert/inc/ring.h b/timer_alert/inc/ring.h
index 474af84..f280183 100755
--- a/timer_alert/inc/ring.h
+++ b/timer_alert/inc/ring.h
@@ -32,6 +32,10 @@
#define GRP_MAIN "main"
#define BUF_LEN 1024
+/*
+* @brief: init sreeenreader for alert
+* @param[data]: in, pointer to appdata
+*/
void _screen_reader_objects_create(void* data);
#endif /* __ring_H__ */
diff --git a/timer_alert/inc/timer_alert_string.h b/timer_alert/inc/timer_alert_string.h
index 71da440..3cf0fa8 100644
--- a/timer_alert/inc/timer_alert_string.h
+++ b/timer_alert/inc/timer_alert_string.h
@@ -20,7 +20,7 @@
#define STRING_TIMER_TIME_IS_UP "WDS_TMR_NPBODY_TIMES_UP_ABB"
#define STRING_TMR_DISMISS "WDS_ALM_BODY_DISMISS_ABB"
#define STRING_TMR_CANCEL "WDS_TMR_BUTTON_CANCEL_ABB"
-#define STRING_TTS_TMR_SWIPE_RIGHT_TO_DISMISS "WDS_FMD_TBBODY_SWIPE_RIGHT_WITH_TWO_FINGERS_TO_DISMISS_ALERT"
+#define STRING_TTS_TMR_SWIPE_RIGHT_TO_DISMISS "WDS_FMD_TBBODY_SWIPE_RIGHT_WITH_TWO_FINGERS_TO_DISMISS_ALERT"
#define STRING_TTS_TIME_LAPSED "lapse time is "
#define STRING_TTS_TIME_HOUR "Hour"
#define STRING_TTS_TIME_MINUTE "Minutes"
diff --git a/timer_alert/src/ring.c b/timer_alert/src/ring.c
index a3b6c17..07de61d 100755
--- a/timer_alert/src/ring.c
+++ b/timer_alert/src/ring.c
@@ -586,6 +586,7 @@ void _screen_reader_objects_create(void* data)
elm_atspi_accessible_translation_domain_set(icon, PACKAGE);
elm_atspi_accessible_reading_info_type_set(icon, (ELM_ACCESSIBLE_READING_INFO_TYPE_NAME | ELM_ACCESSIBLE_READING_INFO_TYPE_DESCRIPTION));
elm_access_action_cb_set(icon, ELM_ACCESS_ACTION_SCROLL, _screen_reader_dismiss_button_scroll, ad);
+ elm_atspi_accessible_attribute_append(icon, "gesture_required", "scroll");
//create time text
elapse_time = elm_access_object_register((Evas_Object*)edje_object_part_object_get(_EDJ(ad->ly_main), "time"), ad->ly_main);
diff --git a/timer_alert/src/sound.c b/timer_alert/src/sound.c
index 4392e28..9e8890d 100755
--- a/timer_alert/src/sound.c
+++ b/timer_alert/src/sound.c
@@ -74,13 +74,11 @@ void ring_stop_player(void)
int ret = SUCCESS;
ret = player_stop(*(mm_player));
- if (ret != PLAYER_ERROR_NONE) {
+ if (ret != PLAYER_ERROR_NONE)
_E("player error Code: %x", ret);
- }
ret = player_unprepare(*(mm_player));
- if (ret != PLAYER_ERROR_NONE) {
+ if (ret != PLAYER_ERROR_NONE)
_E("player error Code: %x", ret);
- }
player_state_e play_state;
player_get_state(*(mm_player), &play_state);
_D("After unprepare play_state: %d", play_state);