PrivilegeInfo* pPrivilege = null;
TryReturn(groupIndex == 0, E_FAILURE, "Group Index Error");
+
if (__pPrivilegeList != null){
pPrivilege = dynamic_cast <PrivilegeInfo*>(__pPrivilegeList->GetAt(itemIndex));
}
+ else{
+ AppLogException("__pPrivilegeList is empty");
+ }
if (pPrivilege != null){
pPrivilege->GetDisplayName().IsEmpty() == false ? name = pPrivilege->GetDisplayName() : name = "";
pPrivilege->GetDescription().IsEmpty() == false ? description = pPrivilege->GetDescription() : description = "";
+ AppLog("name : %ls", name.GetPointer());
+ AppLog("description : %ls", description.GetPointer());
}
return E_SUCCESS;
__pTargetPackageInfo = pMgr->GetPackageInfoFromFileN(filePath);
TryReturn(__pTargetPackageInfo != null, GetLastResult(), "[%s] Package Path is not delivered", GetErrorMessage(GetLastResult()))
+ String UNTRUSTED_SOURCE = L"UnknownSrc";
+ if (__pTargetPackageInfo->GetStoreClientId().IsEmpty()){
+ AppLogException("Store Client id is Empty");
+ }
+ else if (__pTargetPackageInfo->GetStoreClientId().CompareTo(UNTRUSTED_SOURCE) == 0){
+ __isUntrustedSource = true;
+ }
+ __isUntrustedSource = true;
+ AppLog("Store resource id : %ls", __pTargetPackageInfo->GetStoreClientId().GetPointer());
+
__pHeader->SetTitleText(__pTargetPackageInfo->GetDisplayName());
packageId = __pTargetPackageInfo->GetId().GetPointer();
TryReturn(packageId.IsEmpty() == false, E_FAILURE, "pakcageId is Empty!!!");
}
__pPrivilegeList = __pTargetPackageInfo->GetPrivilegeListN();
- if (__pPrivilegeList) {
+ result res = GetLastResult();
+ TryReturn(res == E_SUCCESS, res, "[%s] GetPrivilegeListN() error occurred", GetErrorMessage(res));
+
+ if (__pPrivilegeList)
+ {
__itemCount = __pPrivilegeList->GetCount();
+ AppLog("item count : %d ", __itemCount);
}
else{
AppLog("No Privilege List");
DetailForm::SetInfoTextBox()
{
String installMsg = L"Do you want to install this application?\n\nAllow this application to:";
- if (__isInstalled){
- installMsg.Append(L"\n\n(application will be updated)");
+ if (__isUntrustedSource){
+ installMsg.Append(L"\n\n(Unknown sources)");
}
__pTextBox = static_cast<TextBox *>(GetControl(L"IDC_INFO_TEXTBOX"));
__pTextBox->SetText(installMsg);
InstallerApp* pUiApp = static_cast<InstallerApp*>(UiApp::GetInstance());
String packagePath = pUiApp->GetPackagePath();
- if (packagePath.IsEmpty() || pUiApp->IsValidAccess() == false)
+ if (packagePath.IsEmpty() || pUiApp->IsValidAccess() == false || !__isValidPackage)
{
- pTextBox->SetText(L"Wrong Execution.");
+ if (!__isValidPackage){
+ pTextBox->SetText(L"Invalid Package.");
+ }
+ else{
+ pTextBox->SetText(L"Wrong Execution.");
+ }
__pPopup->AddControl(pTextBox);
pButtonClose->SetPosition(X_CANCEL_BTN_ALONE, pButtonClose->GetY());
__pPopup->AddControl(pButtonClose);
__itemCount = 0;
__isUpdatable = false;
__isInstalled = false;
+ __isValidPackage = true;
// parsing tpk package info then get and set item count
- ParsingTPK();
+ r = ParsingTPK();
+ if (r != E_SUCCESS)
+ {
+ __isValidPackage = false;
+ }
// Install Confirmation Popup
SetPopupControl();