Tizen::Base::String GetAppSettingIconPathFromAppIdListAt(Tizen::Base::String& id);
void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
void OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus);
+ void UpdateTableViewAndNoContent(void);
private:
Tizen::Base::Collection::IList* __pDownloadAppIdKeyList;
virtual void OnGroupedTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewContextItem* pContextItem, bool activated);
virtual void OnGroupedTableViewGroupItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status);
virtual void OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status);
+ virtual void OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus);
private:
void InitPackgaeManager(void);
result InitPrivacyAppPackageList(void);
Tizen::Base::String GetDisplayPackageName(int itemIndex);
Tizen::Base::String GetUsedPrivacyService(int itemIndex);
+ void UpdateTableViewAndNoContent(void);
private:
Tizen::Security::PrivacyManager* __pPrivacyManager;
clientRect.width = W_ALERT_POPUP_CLIENT_RECT_RESIZE;
clientRect.height = H_ALERT_POPUP_CLIENT_RECT_RESIZE;
- itemRectLabel.x = 0;
+ itemRectLabel.x = X_ALERT_POPUP_ITEM_RECT_LHS_BUTTON_DEFAULT;
itemRectLabel.y = Y_ALERT_POPUP_ITEM_RECT_LABEL_DEFAULT;
itemRectLabel.width = clientRect.width;
itemRectLabel.height = H_ALERT_POPUP_ITEM_RECT_LABEL_DEFAULT;
- itemRectLhsButton.x = X_ALERT_POPUP_ITEM_RECT_LHS_BUTTON_DEFAULT;
+ itemRectLhsButton.x = X_ALERT_POPUP_ITEM_RECT_LHS_BUTTON_DEFAULT + itemRectLabel.x;
itemRectLhsButton.y = Y_ALERT_POPUP_ITEM_RECT_LHS_BUTTON_DEFAULT;
itemRectLhsButton.width = W_ALERT_POPUP_ITEM_RECT_LHS_BUTTON_DEFAULT;
itemRectLhsButton.height = H_ALERT_POPUP_ITEM_RECT_LHS_BUTTON_DEFAULT;
RemoveControl(GetControl(0));
}
// RemoveAllControls();
- if (!IsFailed(__pCertificatePresentationModelInstance->FindUserCertificateToInstallFromStorage()))
+ result r = __pCertificatePresentationModelInstance->FindUserCertificateToInstallFromStorage();
+ if (IsFailed(r))
+ {
+ AppLogDebug("FindUserCertificateToInstallFromStorage is error %s", GetErrorMessage(r));
+ return;
+ }
+
+ if (__pCertificatePresentationModelInstance->GetFoundUserCertificateToInstallListCount() != 0)
{
CreateTableView();
__pTableView->UpdateTableView();
clientRect.width = W_ALERT_POPUP_CLIENT_RECT_DEFAULT;
clientRect.height = H_ALERT_POPUP_CLIENT_RECT_DEFAULT;
- itemRectLabel.x = 0;
- itemRectLabel.y = Y_ALERT_POPUP_ITEM_RECT_LABEL_DEFAULT;
+ itemRectLabel.x = Y_ALERT_POPUP_ITEM_RECT_LABEL_DEFAULT;
+ itemRectLabel.y = Y_ALERT_POPUP_ITEM_RECT_LABEL_DEFAULT + itemRectLabel.x;
itemRectLabel.width = W_ALERT_POPUP_ITEM_RECT_LABEL_DEFAULT;
itemRectLabel.height = H_ALERT_POPUP_ITEM_RECT_LABEL_DEFAULT;
CreateFooter();
CreateTableView();
SetAppIdListFromPackageManager();
+ UpdateTableViewAndNoContent();
return E_SUCCESS;
}
{
RemoveAllDownLoadAppIdKeyList();
RemoveAllAppIdList();
+ int controlCount = GetControlCount();
+ for (int i = 0; i < controlCount; i++)
+ {
+ RemoveControl(GetControl(0));
+ }
__pTableView = null;
SetFormBackEventListener(null);
RemoveAllDownLoadAppIdKeyList();
SetAppIdListFromPackageManager();
- __pTableView->UpdateTableView();
+ UpdateTableViewAndNoContent();
}
void
void
DownloadedApplicationForm::OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus)
{
+ UpdateTableViewAndNoContent();
Invalidate(true);
}
}
}
return iconPath;
+}
+
+void
+DownloadedApplicationForm::UpdateTableViewAndNoContent(void)
+{
+ bool createTableView = false;
+ if (__pTableView != null)
+ {
+ if (GetDownLoadAppCount() != 0)
+ {
+ __pTableView->UpdateTableView();
+ return;
+ }
+ }
+ else
+ {
+ if (GetDownLoadAppCount() != 0)
+ {
+ createTableView = true;
+ }
+ }
+
+ if (__pTableView != null)
+ {
+ int tableViewControlCount = __pTableView->GetControlCount();
+ for (int i = 0; i < tableViewControlCount; i++)
+ {
+ __pTableView->RemoveControl(__pTableView->GetControl(0));
+ }
+// __pTableView->RemoveAllControls();
+ __pTableView = null;
+ }
+ int controlCount = GetControlCount();
+ for (int i = 0; i < controlCount; i++)
+ {
+ RemoveControl(GetControl(0));
+ }
+// RemoveAllControls();
+
+ if (createTableView)
+ {
+ CreateTableView();
+ __pTableView->UpdateTableView();
+ }
+ else
+ {
+ Label* pLabel = static_cast<Label*>(this->GetControl(NO_CONTENTS, false));
+ if (pLabel == null)
+ {
+ Rectangle clientRect = GetClientAreaBounds();
+ Bitmap* pBitmp = ResourceManager::GetBitmapN(IDB_NO_CONTENTS);
+
+ int bitmapWidth = pBitmp->GetWidth();
+ int bitmapHeight = pBitmp->GetHeight();
+ String labelText = ResourceManager::GetString(L"IDS_ST_BODY_NO_CONTENT");
+ Color textColor = COLOR_HELP_TEXT_TYPE_03_NORMAL;
+ int noContentTextHeight = GetHeightForStringArea(labelText, bitmapWidth, 32);
+
+ int xPos = (clientRect.width / LINE_COUNT_2) - (bitmapWidth / DEVIDE_TWO);
+ int yPos = (clientRect.height / LINE_COUNT_2) - ((bitmapHeight + noContentTextHeight) / DEVIDE_TWO);
+
+ Label* pLabel = new (std::nothrow) Label();
+ pLabel->Construct(Rectangle(xPos, yPos, bitmapWidth, bitmapHeight), L"");
+ pLabel->SetName(NO_CONTENTS);
+ pLabel->SetBackgroundBitmap(*pBitmp);
+
+ yPos = yPos + bitmapHeight;
+
+ Label* pLabelNoContents = new (std::nothrow) Label();
+ pLabelNoContents->Construct(Rectangle(0, yPos, clientRect.width, noContentTextHeight), L"");
+ pLabelNoContents->SetName(NO_CONTENTS_TEXT);
+ pLabelNoContents->SetTextColor(textColor);
+ pLabelNoContents->SetText(labelText);
+
+ AddControl(*pLabel);
+ AddControl(*pLabelNoContents);
+ }
+ }
}
\ No newline at end of file
CreateHeader(ResourceManager::GetString(L"IDS_COM_BODY_PRIVACY"));
CreateFooter();
- CreateTableView();
+ UpdateTableViewAndNoContent();
return r;
}
{
__pPrivacyManager = null;
- __privacyPackageList->RemoveAll(true);
- __privacyPackageList = null;
+ if (__privacyPackageList != null)
+ {
+ __privacyPackageList->RemoveAll(true);
+ __privacyPackageList = null;
+ }
+ int controlCount = GetControlCount();
+ for (int i = 0; i < controlCount; i++)
+ {
+ RemoveControl(GetControl(0));
+ }
__pTableView = null;
SetFormBackEventListener(null);
delete pArgs;
}
- if (__pTableView)
- {
- __pTableView->UpdateTableView();
- }
+ UpdateTableViewAndNoContent();
}
result
void
PrivacyForm::OnGroupedTableViewGroupItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status)
{
+}
+
+void
+PrivacyForm::UpdateTableViewAndNoContent(void)
+{
+ bool createTableView = false;
+ if (__pTableView != null)
+ {
+ if (__privacyPackageList != null)
+ {
+ __pTableView->UpdateTableView();
+ return;
+ }
+ }
+ else
+ {
+ if (__privacyPackageList != null)
+ {
+ createTableView = true;
+ }
+ }
+
+ if (__pTableView != null)
+ {
+ int tableViewControlCount = __pTableView->GetControlCount();
+ for (int i = 0; i < tableViewControlCount; i++)
+ {
+ __pTableView->RemoveControl(__pTableView->GetControl(0));
+ }
+// __pTableView->RemoveAllControls();
+ __pTableView = null;
+ }
+ int controlCount = GetControlCount();
+ for (int i = 0; i < controlCount; i++)
+ {
+ RemoveControl(GetControl(0));
+ }
+// RemoveAllControls();
+
+ if (createTableView)
+ {
+ CreateTableView();
+ __pTableView->UpdateTableView();
+ }
+ else
+ {
+ Label* pLabel = static_cast<Label*>(this->GetControl(NO_CONTENTS, false));
+ if (pLabel == null)
+ {
+ Rectangle clientRect = GetClientAreaBounds();
+ Bitmap* pBitmp = ResourceManager::GetBitmapN(IDB_NO_CONTENTS);
+
+ int bitmapWidth = pBitmp->GetWidth();
+ int bitmapHeight = pBitmp->GetHeight();
+ String labelText = ResourceManager::GetString(L"IDS_ST_BODY_NO_CONTENT");
+ Color textColor = COLOR_HELP_TEXT_TYPE_03_NORMAL;
+ int noContentTextHeight = GetHeightForStringArea(labelText, bitmapWidth, 32);
+
+ int xPos = (clientRect.width / LINE_COUNT_2) - (bitmapWidth / DEVIDE_TWO);
+ int yPos = (clientRect.height / LINE_COUNT_2) - ((bitmapHeight + noContentTextHeight) / DEVIDE_TWO);
+
+ Label* pLabel = new (std::nothrow) Label();
+ pLabel->Construct(Rectangle(xPos, yPos, bitmapWidth, bitmapHeight), L"");
+ pLabel->SetName(NO_CONTENTS);
+ pLabel->SetBackgroundBitmap(*pBitmp);
+
+ yPos = yPos + bitmapHeight;
+
+ Label* pLabelNoContents = new (std::nothrow) Label();
+ pLabelNoContents->Construct(Rectangle(0, yPos, clientRect.width, noContentTextHeight), L"");
+ pLabelNoContents->SetName(NO_CONTENTS_TEXT);
+ pLabelNoContents->SetTextColor(textColor);
+ pLabelNoContents->SetText(labelText);
+
+ AddControl(*pLabel);
+ AddControl(*pLabelNoContents);
+ }
+ }
+}
+
+void
+PrivacyForm::OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus)
+{
+ UpdateTableViewAndNoContent();
+ Invalidate(true);
}
\ No newline at end of file
AppAssert(pSceneManager);
PackageAppInfo* pPackageAppInfo = dynamic_cast <PackageAppInfo*>(__pPackageAppInfoList->GetAt(groupIndex));
- AppLog("AppId [%ls]", pPackageAppInfo->GetAppId().GetPointer());
+ AppLogDebug("AppId [%ls]", pPackageAppInfo->GetAppId().GetPointer());
String screenType;
if (GetWallpaperIndex() == 0)
__pPackageAppInfoList = pPackageManager->GetPackageAppInfoListN(packageAppFilterMap);
#if 1 // temp for debugging
- AppLog("Package app filter = [%ls]", pKey->GetPointer());
+ AppLogDebug("Package app filter = [%ls]", pKey->GetPointer());
if (__pPackageAppInfoList)
{
for (int i = 0; i < __pPackageAppInfoList->GetCount(); i++)
{
- PackageAppInfo* pPackageAppInfo = dynamic_cast <PackageAppInfo*>(__pPackageAppInfoList->GetAt(i));
+ PackageAppInfo* pPackageAppInfo = dynamic_cast<PackageAppInfo*>(__pPackageAppInfoList->GetAt(i));
if (pPackageAppInfo)
{
- AppLog("[%d]-------------------------------------------------------", i+1);
- AppLog("AppId [%ls]", pPackageAppInfo->GetAppId().GetPointer());
- AppLog("Name [%ls]", pPackageAppInfo->GetAppName().GetPointer());
+ AppLogDebug("[%d]-------------------------------------------------------", i+1);
+ AppLogDebug("AppId [%ls]", pPackageAppInfo->GetAppId().GetPointer());
+ AppLogDebug("Name [%ls]", pPackageAppInfo->GetAppName().GetPointer());
}
else
{
- AppLog("pPackageAppInfo is null.");
+ AppLogDebug("pPackageAppInfo is null.");
}
}
}
else
{
- AppLog("pList is null.");
+ AppLogDebug("pList is null.");
}
#endif
ScreenTypeForm::GetPackageAppInfoListCount(void)
{
if(__pPackageAppInfoList)
+ {
return __pPackageAppInfoList->GetCount();
+ }
return 0;
}