+SignatureStep::OnStateContextAudit(void)
+{
+ InstallerError error = INSTALLER_ERROR_NONE;
+#if 0
+ TryCatch(__pContext->__pAppDataList, error = INSTALLER_ERROR_NONE, "__pContext->__pAppDataList is null.");
+
+ if (__pContext->__privilegeLevel == PRIVILEGE_LEVEL_PLATFORM)
+ {
+ TryCatch(__pContext->__privilegeLevel, error = INSTALLER_ERROR_NONE, "__pContext->__privilegeLevel is PRIVILEGE_LEVEL_PLATFORM.");
+ }
+ else if (__pContext->__privilegeLevel == PRIVILEGE_LEVEL_PARTNER)
+ {
+ TryCatch(__pContext->__privilegeLevel, error = INSTALLER_ERROR_NONE, "__pContext->__privilegeLevel is PRIVILEGE_LEVEL_PARTNER.");
+ }
+ else if (__pContext->__privilegeLevel == PRIVILEGE_LEVEL_PUBLIC)
+ {
+ int count = __pContext->__pAppDataList->GetCount();
+ result r = E_SUCCESS;
+
+ for (int i = 0; i < count; i++)
+ {
+ AppData* pAppData = null;
+ r = __pContext->__pAppDataList->GetAt(i, pAppData);
+ TryCatch(!IsFailed(r), error = INSTALLER_ERROR_NONE, "pAppDataList->GetAt() is failed.");
+
+ if (pAppData)
+ {
+ if ((pAppData->__type.Equals(L"UiApp", false) == true)
+ && (pAppData->__main.Equals(L"True", false) == true))
+ {
+ if (pAppData->__menuIconVisible == false)
+ {
+ AppLog("pAppData->__menuIconVisible[%d] does not be allowed in public privilege level", (int)pAppData->__menuIconVisible);
+ pAppData->__menuIconVisible = true;
+ }
+
+ if (pAppData->__launchingHistoryVisible.Equals(L"False", false) == true)
+ {
+ AppLog("pAppData->__launchingHistoryVisible(%ls) does not be allowed in public privilege level",
+ pAppData->__launchingHistoryVisible.GetPointer());
+ pAppData->__launchingHistoryVisible = L"True";
+ }
+ }
+
+ if (pAppData->__isSubMode == true)
+ {
+ AppLog("pAppData->__isSubMode(%d) does not be allowed in public privilege level",
+ pAppData->__isSubMode);
+
+ pAppData->__isSubModeAllowed = false;
+ }
+
+ if (pAppData->__pFeatureList)
+ {
+ String autoStart = L"AutoRestart";
+ String* pValue = static_cast<String *>(pAppData->__pFeatureList->GetValue(autoStart));
+ if (pValue && (pValue->Equals("True", false) == true))
+ {
+ AppLog("AutoRestart does not be allowed in public privilege level");
+ pAppData->__pFeatureList->Remove(autoStart);
+ }
+
+ String launchOnBoot = L"LaunchOnBoot";
+ pValue = static_cast<String *>(pAppData->__pFeatureList->GetValue(launchOnBoot));
+ if (pValue && (pValue->Equals("True", false) == true))
+ {
+ AppLog("LaunchOnBoot does not be allowed in public privilege level");
+ pAppData->__pFeatureList->Remove(launchOnBoot);
+ }
+ }
+ }
+ }
+ }
+ else
+ {
+ TryCatch(__pContext->__privilegeLevel, error = INSTALLER_ERROR_SIGNATURE_INVALID, "__pContext->__privilegeLevel is unknown.");
+ }
+
+CATCH:
+#endif
+ GoNextState();
+ return error;
+}
+
+InstallerError