diff options
-rw-r--r-- | project/src/AddAccountForm.cpp | 9 | ||||
-rw-r--r-- | project/src/ConfigureAccountForm.cpp | 15 |
2 files changed, 24 insertions, 0 deletions
diff --git a/project/src/AddAccountForm.cpp b/project/src/AddAccountForm.cpp index 091ec5c..91ce733 100644 --- a/project/src/AddAccountForm.cpp +++ b/project/src/AddAccountForm.cpp @@ -84,6 +84,15 @@ AddAccountForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId result r = pAccountManager->AddAccount(account); if (IsFailed(r)) { + if (r == E_USER_NOT_CONSENTED) + { + MessageBox messageBox; + messageBox.Construct(L"Error", L"The account privacy should be enabled.", MSGBOX_STYLE_OK); + + int modalResult; + messageBox.ShowAndWait(modalResult); + } + AppControlProviderManager::GetInstance()->SendAppControlResult(__reqId, APP_CTRL_RESULT_FAILED, null); } else diff --git a/project/src/ConfigureAccountForm.cpp b/project/src/ConfigureAccountForm.cpp index e28a22f..2f70a93 100644 --- a/project/src/ConfigureAccountForm.cpp +++ b/project/src/ConfigureAccountForm.cpp @@ -187,6 +187,21 @@ ConfigureAccountForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previo AppAssert(pAccountAccessor); Account account = pAccountAccessor->GetAccount(__accountId); + if (GetLastResult() == E_USER_NOT_CONSENTED) + { + MessageBox messageBox; + messageBox.Construct(L"Error", L"The account privacy should be enabled.", MSGBOX_STYLE_OK); + + int modalResult; + messageBox.ShowAndWait(modalResult); + + // Terminate the application + UiApp* pApp = UiApp::GetInstance(); + AppAssert(pApp); + + pApp->Terminate(); + return; + } IMap* pExtendData = account.GetExtendedDataN(); |