#include "shared/devices.h"
#include "core/log.h"
#include "display-ops.h"
-#include "display-plugin.h"
+#include "display-misc.h"
#include "power-supply.h"
#include "shared/plugin.h"
update_time(A_TIMETOFULL, estimated_time);
} else {
del_all_batt_node(B_CHARGING);
- display_plugin_get_system_wakeup_flag(&system_wakeup_flag);
+ display_misc_get_system_wakeup_flag(&system_wakeup_flag);
if (system_wakeup_flag == true) {
del_all_batt_node(B_UNCHARGING);
- display_plugin_set_system_wakeup_flag(false);
+ display_misc_set_system_wakeup_flag(false);
}
if (batt_head[B_UNCHARGING] == NULL) {
add_batt_node(B_UNCHARGING, clock, capacity);
static bool stay_touchscreen_off = false;
static bool touch_event_blocked = false;
+static bool system_wakeup_flag = false;
+
+int display_misc_get_system_wakeup_flag(bool *flag)
+{
+ *flag = system_wakeup_flag;
+
+ return 0;
+}
+
+int display_misc_set_system_wakeup_flag(bool flag)
+{
+ system_wakeup_flag = flag;
+
+ return 0;
+}
/* FIXME: This fucntion should be relocated under the battery module */
bool display_misc_is_low_battery_state(int val)
#include <stdbool.h>
#include <sys/types.h>
+int display_misc_get_system_wakeup_flag(bool *flag);
+int display_misc_set_system_wakeup_flag(bool flag);
bool display_misc_is_low_battery_state(int val);
void display_misc_get_process_name(pid_t pid, char *pname);
void display_misc_set_stay_touchscreen_off(bool on);
struct display_plugin g_display_plugin;
-int display_plugin_get_system_wakeup_flag(bool *flag)
-{
- *flag = g_display_plugin.system_wakeup_flag;
-
- return 0;
-}
-
-int display_plugin_set_system_wakeup_flag(bool flag)
-{
- g_display_plugin.system_wakeup_flag = flag;
-
- return 0;
-}
-
/* FIXME: Below functions are temorary to separtate display state transition functions */
int display_plugin_state_do_default_trans(enum syscommon_deviced_display_state state, int evt)
{
#include "shared/devices.h"
struct display_plugin {
- bool system_wakeup_flag;
int (*proc_change_state) (unsigned int cond, pid_t pid);
struct syscommon_deviced_display_config *config;
};
extern struct display_plugin g_display_plugin;
-int display_plugin_get_system_wakeup_flag(bool *flag);
-int display_plugin_set_system_wakeup_flag(bool flag);
-
/* FIXME: function names will be redefined */
int display_plugin_state_do_default_trans(enum syscommon_deviced_display_state state, int evt);
bool display_plugin_state_is_there_default_trans(enum syscommon_deviced_display_state state);
if (ret < 0)
return ret;
- display_plugin_set_system_wakeup_flag(true);
+ display_misc_set_system_wakeup_flag(true);
if (check_wakeup_src() == EVENT_DEVICE)
/* system waked up by devices */
display_state_transition_do_state_transition(current, EVENT_DEVICE);