Change-Id: I790800ea2299e4b780c39d773a4e3c9336bb4ecf
Signed-off-by: Daehyeon Jung <darrenh.jung@samsung.com>
AUL_TERMINATE,
AUL_TERMINATE_BGAPP,
AUL_PAUSE,
+ AUL_WAKE,
+ AUL_SUSPEND,
}aul_type;
/** AUL public key - To check caller's secuirty */
#define AUL_K_SEQ_NUM "__AUL_SEQ_NUM__"
/** AUL internal private key */
#define AUL_K_API_VERSION "__AUL_API_VERSION__"
-
+/** AUL internal private key */
+#define AUL_K_ALLOWED_BG "__AUL_ALLOWED_BG__"
/**
* @brief This is callback function for aul_launch_init
APP_REGISTER_PID,
+ /* background category */
+ APP_WAKE,
+ APP_SUSPEND,
+
/* for special purpose */
AMD_RELOAD_APPINFO,
/* reserved for AMD Agent */
return 0;
}
+static int app_prepare_to_suspend()
+{
+ _D("[__SUSPEND__]");
+ __call_aul_handler(AUL_SUSPEND, NULL);
+ return 0;
+}
+
+static int app_prepare_to_wake()
+{
+ _D("[__WAKE__]");
+ __call_aul_handler(AUL_WAKE, NULL);
+ return 0;
+}
+
static int __get_aul_error(int res)
{
int ret;
case APP_COM_MESSAGE:
app_com_recv(kbundle);
break;
+ case APP_WAKE:
+ app_prepare_to_wake();
+ break;
+ case APP_SUSPEND:
+ app_prepare_to_suspend();
+ break;
default:
_E("no support packet");
}