Merge "remove badge dependency for legacy NotificationManager" into tizen_2.2
[platform/framework/native/appfw.git] / src / app / FApp_Aul.cpp
index 6846198..d5cf730 100644 (file)
@@ -114,7 +114,7 @@ _Aul::GetConvertedResult(const int aul_ret, const char* pFunctionName)
 }
 
 result
-_Aul::SendResult(bundle* b, appsvc_result_val res, bool isSubMode)
+_Aul::SendResult(bundle* b, appsvc_result_val res, bool isSubMode, bool isServiceApp)
 {
        // to skip error handling, of appsvc_send_result, use aul_send_service_result() directly.
        //int ret = appsvc_send_result(b, res);
@@ -128,6 +128,11 @@ _Aul::SendResult(bundle* b, appsvc_result_val res, bool isSubMode)
                _AppArg::UpdateSubMode(b);
        }
 
+       if (isServiceApp)
+       {
+               _AppArg::UpdateServiceApp(b);
+       }
+
        const int aul_ret = aul_send_service_result(b);
 
        result r = GetConvertedResult(aul_ret, "SendResult");
@@ -203,13 +208,14 @@ _Aul::SetOomAdj(int pid, int adj)
        return r;
 }
 
+typedef void (* cbForVconf)(keynode_t* node, void *pData);
 
 result
-_Aul::SetPowerOffNotiListener( void (*powerOffCb)(keynode_t* node, void *pData), void *pData)
+_Aul::SetPowerOffNotiListener( void (*powerOffCb)(void* node, void *pData), void *pData)
 {
 
 #if 1
-       int ret = vconf_notify_key_changed(VCONFKEY_SYSMAN_POWER_OFF_STATUS, powerOffCb, pData);
+       int ret = vconf_notify_key_changed(VCONFKEY_SYSMAN_POWER_OFF_STATUS, (cbForVconf)powerOffCb, pData);
        SysTryReturnResult(NID_SYS, ret == 0, E_SYSTEM, "It failed to set power off");
 #else
        int heyFd = heynoti_init();
@@ -282,7 +288,7 @@ _Aul::GetRealAppId(const AppId& appId)
        String temp;
        // [INFO] ugly code for submode callee
        appId.SubString(11, temp);
-       if (temp == L"_AppControl")
+       if (temp == String(SUBMODE_NAME))
        {
                String id;
                appId.SubString(0, 10, id);