#include "log.h"
#include "timer_util.h"
#include <device/power.h>
+#include <device/display.h>
#include <sound_manager.h>
#include <app_preference.h>
#include <app_alarm.h>
_tmr_timepicker_time_update(ad);
edje_object_signal_emit(_EDJ(ad->progress), "default", "");
- app_control_h app_control = NULL;
- int ret = -1;
-
- app_control_create(&app_control);
- app_control_set_operation(app_control, APP_CONTROL_OPERATION_DEFAULT);
- app_control_set_app_id(app_control, "org.tizen.timer.alert");
- app_control_add_extra_data(app_control, "type", "timer");
- ret = app_control_send_launch_request(app_control, NULL, NULL);
- if (ret != 0)
- TMR_ERR("ret = %d, launch request is failed", ret);
-
- app_control_destroy(app_control);
-
TMR_INFO("progressbar hide");
return ECORE_CALLBACK_CANCEL;
}
}
+void _launch_alert()
+{
+ _TMR_ENTER_;
+ app_control_h app_control = NULL;
+ int ret = -1;
+ display_state_e state;
+ ret = device_display_get_state(&state);
+ TMR_INFO("display status state: %d and ret:%d", state, ret);
+ if(state == DISPLAY_STATE_SCREEN_OFF || state == DISPLAY_STATE_SCREEN_DIM) {
+ 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.timer.alert");
+ app_control_add_extra_data(app_control, "type", "timer");
+ ret = app_control_send_launch_request(app_control, NULL, NULL);
+ if (ret != 0)
+ TMR_ERR("ret = %d, launch request is failed", ret);
+
+ app_control_destroy(app_control);
+
+}
+
static Eina_Bool _tmr_timer_cb(void *data)
{
_TMR_ENTER_;
ad->due_time.tv_sec = -1;
_tmr_panel_time_update(ad);
+ _launch_alert();
ecore_timer_add(1.5, _tmr_view_change_to_timeset_cb, ad);
return ECORE_CALLBACK_CANCEL;
_TMR_ENTER_;
struct appdata *ad = (struct appdata *)data;
if (ad->cur_state == TMR_STATE_TYPE_START) {
- ecore_timer_freeze(ad->timer);
+ //ecore_timer_freeze(ad->timer);
_tmr_pm_state_set(EINA_FALSE);
} else if (ad->cur_state == TMR_STATE_TYPE_RESET) {
_tmr_set_start_time(ad);
_tmr_view_change_to_timeset_cb(ad);
} else {
elm_scroller_page_show(ad->scroller, 0, 1);
- ecore_timer_thaw(ad->timer);
+ //ecore_timer_thaw(ad->timer);
_tmr_pm_state_set(EINA_TRUE);
}
} else if (ad->cur_state == TMR_STATE_TYPE_RESET) {
#include "ring.h"
#include "sound.h"
#include "app_alarm.h"
+#include <device/power.h>
+#include <sound_manager.h>
typedef struct appdata {
Ecore_Timer *timer = NULL;
int delay_count = 0;
+
+static void _ring_pm_state_set(Eina_Bool isLock)
+{
+ dlog_print(DLOG_INFO, LOG_TAG, "_ring_pm_state_set");
+ int ret = 0;
+ if (isLock == EINA_TRUE) {
+ ret = device_power_request_lock(POWER_LOCK_DISPLAY_DIM, 0);
+ dlog_print(DLOG_INFO, LOG_TAG, "Lock display state :: ret = %d", ret);
+ } else {
+ ret = device_power_release_lock(POWER_LOCK_DISPLAY_DIM);
+ dlog_print(DLOG_INFO, LOG_TAG, "Unlock display state :: ret = %d", ret);
+ }
+}
+
+
void data_get_resource_path(const char *file_in, char *file_path_out, int file_path_max)
{
char *res_path = app_get_resource_path();
static void
win_delete_request_cb(void *data, Evas_Object *obj, void *event_info)
{
+ _ring_pm_state_set(EINA_FALSE);
ui_app_exit();
}
{
/* Handle the launch request. */
appdata_s *ad = data;
+ _ring_pm_state_set(EINA_TRUE);
dlog_print(DLOG_INFO, LOG_TAG, "app_control >>");
ring_view_add_by_timer(ad->nf);
app_pause(void *data)
{
/* Take necessary actions when application becomes invisible. */
+ _ring_pm_state_set(EINA_FALSE);
}
static void
app_resume(void *data)
{
/* Take necessary actions when application becomes visible. */
+ _ring_pm_state_set(EINA_TRUE);
}
static void