}
else
{
- SysTryReturn(NID_APP, __pPrivilegeList, null, E_SYSTEM, "__pPrivilegeList must not be null.");
-
- for (int i = 0; i < __pPrivilegeList->GetCount(); i++)
+ if (__pPrivilegeList)
{
- String* pPrivilege = dynamic_cast < String* >(__pPrivilegeList->GetAt(i));
- if (pPrivilege)
+ for (int i = 0; i < __pPrivilegeList->GetCount(); i++)
{
- std::unique_ptr< PrivilegeInfo > pPrivilegeInfo(new (std::nothrow) PrivilegeInfo);
- SysTryReturn(NID_APP, pPrivilegeInfo, null, E_OUT_OF_MEMORY, "pPrivilegeInfo must not be null.");
+ String* pPrivilege = dynamic_cast < String* >(__pPrivilegeList->GetAt(i));
+ if (pPrivilege)
+ {
+ std::unique_ptr< PrivilegeInfo > pPrivilegeInfo(new (std::nothrow) PrivilegeInfo);
+ SysTryReturn(NID_APP, pPrivilegeInfo, null, E_OUT_OF_MEMORY, "pPrivilegeInfo must not be null.");
- r = pPrivilegeInfo->Construct(*pPrivilege);
- SysTryReturn(NID_APP, !IsFailed(r), null, E_SYSTEM, "pPrivilegeInfo->Construct() failed.");
+ r = pPrivilegeInfo->Construct(*pPrivilege);
+ SysTryReturn(NID_APP, !IsFailed(r), null, E_SYSTEM, "pPrivilegeInfo->Construct() failed.");
- r = pPrivilegeList->Add(*pPrivilegeInfo.release());
- SysTryReturn(NID_APP, !IsFailed(r), null, E_SYSTEM, "pPrivilegeList->Add() failed.");
- }
- }
+ r = pPrivilegeList->Add(*pPrivilegeInfo.release());
+ SysTryReturn(NID_APP, !IsFailed(r), null, E_SYSTEM, "pPrivilegeList->Add() failed.");
+ }
+ }
+ }
}
if (pPrivilegeList->GetCount() <= 0)
res = pkgmgrinfo_appinfo_filter_add_bool(handle, PMINFO_APPINFO_PROP_APP_NODISPLAY, nodisplay);
SysTryCatch(NID_APP, res == PMINFO_R_OK, , E_SYSTEM, "pkgmgrinfo_pkginfo_filter_add_bool(NODISPLAY, %d) is failed. [%d]", nodisplay, res);
}
+#if 0
+ else if ((*pKey) == PACKAGE_APP_FILTER_LAUNCH_ONBOOT)
+ {
+ definedKey = true;
+
+ Boolean* pVal = static_cast< Boolean* >(pEnum->GetValue());
+ SysTryCatch(NID_APP, pVal, , E_INVALID_ARG, "GetValue() is failed.");
+
+ bool value = pVal->ToBool();
+ SysLog(NID_APP, "Key[%ls], Value[%d]", pKey->GetPointer(), value);
+
+ res = pkgmgrinfo_appinfo_filter_add_bool(handle, PMINFO_APPINFO_PROP_APP_ONBOOT, value);
+ SysTryCatch(NID_APP, res == PMINFO_R_OK, , E_SYSTEM, "pkgmgrinfo_pkginfo_filter_add_bool(ONBOOT, %d) is failed. [%d]", value, res);
+ }
+ else if ((*pKey) == PACKAGE_APP_FILTER_AUTO_RESTART)
+ {
+ definedKey = true;
+
+ Boolean* pVal = static_cast< Boolean* >(pEnum->GetValue());
+ SysTryCatch(NID_APP, pVal, , E_INVALID_ARG, "GetValue() is failed.");
+
+ bool value = pVal->ToBool();
+ SysLog(NID_APP, "Key[%ls], Value[%d]", pKey->GetPointer(), value);
+
+ res = pkgmgrinfo_appinfo_filter_add_bool(handle, PMINFO_APPINFO_PROP_APP_AUTORESTART, value);
+ SysTryCatch(NID_APP, res == PMINFO_R_OK, , E_SYSTEM, "pkgmgrinfo_pkginfo_filter_add_bool(AUTORESTART, %d) is failed. [%d]", value, res);
+ }
+#endif
+ else if ((*pKey) == PACKAGE_APP_FILTER_LAUNCHING_HISTORY_VISIBLE)
+ {
+ definedKey = true;
+
+ Boolean* pVal = static_cast< Boolean* >(pEnum->GetValue());
+ SysTryCatch(NID_APP, pVal, , E_INVALID_ARG, "GetValue() is failed.");
+
+ bool value = pVal->ToBool();
+ SysLog(NID_APP, "Key[%ls], Value[%d]", pKey->GetPointer(), value);
+
+ res = pkgmgrinfo_appinfo_filter_add_bool(handle, PMINFO_APPINFO_PROP_APP_TASKMANAGE, value);
+ SysTryCatch(NID_APP, res == PMINFO_R_OK, , E_SYSTEM, "pkgmgrinfo_pkginfo_filter_add_bool(TASKMANAGE, %d) is failed. [%d]", value, res);
+ }
+ else if ((*pKey) == PACKAGE_APP_FILTER_LAUNCH_CONDITION)
+ {
+ definedKey = true;
+
+ Boolean* pVal = static_cast< Boolean* >(pEnum->GetValue());
+ SysTryCatch(NID_APP, pVal, , E_INVALID_ARG, "GetValue() is failed.");
+
+ bool value = pVal->ToBool();
+ SysLog(NID_APP, "Key[%ls], Value[%d]", pKey->GetPointer(), value);
+
+ res = pkgmgrinfo_appinfo_filter_add_bool(handle, PMINFO_APPINFO_PROP_APP_LAUNCHCONDITION, value);
+ SysTryCatch(NID_APP, res == PMINFO_R_OK, , E_SYSTEM, "pkgmgrinfo_pkginfo_filter_add_bool(LAUNCHCONDITION, %d) is failed. [%d]", value, res);
+ }
else if ((*pKey) == PACKAGE_APP_FILTER_CATEGORY_HOMEAPP || (*pKey) == PACKAGE_APP_FILTER_CATEGORY_LOCKAPP
|| (*pKey) == PACKAGE_APP_FILTER_CATEGORY_MENUAPP)
{