1.Prevent issue fix 2.Nabi issue resolution
authorchitta ranjan <chitta.rs@samsung.com>
Fri, 3 May 2013 03:39:44 +0000 (12:39 +0900)
committerchitta ranjan <chitta.rs@samsung.com>
Fri, 3 May 2013 06:53:14 +0000 (15:53 +0900)
Change-Id: I841088d63efa823daeb1260f0345743ca8278c18
Signed-off-by: chitta ranjan <chitta.rs@samsung.com>
inc/StDisplayForm.h
src/StDisplayForm.cpp
src/StNfcForm.cpp
src/StNfcPresentationModel.cpp
src/StWallpaperAlbumListDetailForm.cpp

index 628218e..0ecdf62 100644 (file)
@@ -55,6 +55,8 @@ public:
        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 OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
+
 private:
        int GetBackLightTime(void);
        int GetBackLightTimeIndex(void);
index ab700be..f5e6c18 100644 (file)
@@ -375,6 +375,30 @@ DisplayForm::DeleteItem(int groupIndex, int itemIndex, TableViewItem* pItem)
 }
 
 void
+DisplayForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs)
+{
+       AppLogDebug("ENTER");
+       AppLogDebug("RequestFrom[%d]", requestId);
+       if (requestId == FRFRESH_REQUEST_EVENT)
+       {
+               int itemCount = __pTableView->GetItemCountAt(ID_GROUP_BACKLIGHT_TIME_LIST);
+
+               for (int index = 0; index < itemCount; index++)
+               {
+                       if (index == GetBackLightTimeIndex())
+                       {
+                               __pTableView->SetItemChecked(ID_GROUP_BACKLIGHT_TIME_LIST, index, true);
+                       }
+                       else
+                       {
+                               __pTableView->SetItemChecked(ID_GROUP_BACKLIGHT_TIME_LIST, index, false);
+                       }
+               }
+               __pTableView->UpdateTableView();
+       }
+}
+
+void
 DisplayForm::OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status)
 {
        SceneManager* pSceneManager = SceneManager::GetInstance();
@@ -711,4 +735,4 @@ DisplayForm::GetBackLightTimeIndexString(int itemIndex)
        }
 
        return itemText;
-}
\ No newline at end of file
+}
index 2d33b02..978f6b4 100644 (file)
@@ -98,7 +98,10 @@ NfcForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, co
        if (__pNfcPresentationModelInstance == null)
        {
                __pNfcPresentationModelInstance = NfcPresentationModel::GetInstance();
-               __pNfcPresentationModelInstance->SetNfcEventListener(this);
+               if (__pNfcPresentationModelInstance != null)
+               {
+                       __pNfcPresentationModelInstance->SetNfcEventListener(this);
+               }
        }
        if (__pNfcPredefinedItemPresentationModelInstance == null)
        {
@@ -427,7 +430,6 @@ NfcForm::OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::GroupedTableVie
                        if (__isNfcBusy)
                        {
                                AppLogDebug("nfc turn on or off");
-                               __pTableView->SetItemChecked(groupIndex, itemIndex, !__pTableView->IsItemChecked(groupIndex, itemIndex));
                                return;
                        }
                        __isNfcBusy = true;
@@ -610,9 +612,10 @@ NfcForm::ToggleNfcActivateStatus(Tizen::Ui::Controls::TableViewItemStatus itemSt
 void
 NfcForm::OnNfcPresentationModelEventCompleted(NfcPresentationModelEvent requestEvent, result r)
 {
+       AppLog("requestEvent = %d", requestEvent);
        if ((requestEvent == NFC_PRESENTATION_MODEL_EVENT_ACTIVATED)
                || (requestEvent == NFC_PRESENTATION_MODEL_EVENT_DEACTIVATED))
        {
                __isNfcBusy = false;
        }
-}
\ No newline at end of file
+}
index 1efcc41..e50ae30 100644 (file)
@@ -206,6 +206,12 @@ NfcPredefinedItemPresentationModel::InitReservedPushCandidatesList(void)
        __pReservedPushCandidatesMap = __pNdefPushManager->GetReservedPushCandidatesN();\r
        result r = E_SUCCESS;\r
 \r
+       if(__pReservedPushCandidatesMap == null)\r
+       {\r
+               AppLogDebug("__pReservedPushCandidatesMap is null");\r
+               return;\r
+       }\r
+\r
        if (__pReservedPushCandidatesAppIdList != null)\r
        {\r
                delete __pReservedPushCandidatesAppIdList;\r
@@ -368,4 +374,4 @@ NfcPredefinedItemPresentationModel::DestroyInstance(void)
                delete __pNfcPredefinedItemPresentationModelInstance;\r
                __pNfcPredefinedItemPresentationModelInstance = null;\r
        }\r
-}
\ No newline at end of file
+}\r
index 9535806..9bd06fb 100644 (file)
@@ -449,90 +449,96 @@ WallpaperAlbumListDetailForm::OnAppControlCompleteResponseReceived(const AppId&
                                while (pEnum->MoveNext() == E_SUCCESS)
                                {
                                        String* pKey = dynamic_cast<String*>(pEnum->GetKey());
-                                       if (pKey->Equals(String(L"http://tizen.org/appcontrol/data/selected")))
+                                       if (pKey != null && *pKey == L"http://tizen.org/appcontrol/data/selected")
                                        {
                                                IList* pValueList = dynamic_cast<IList*>(pEnum->GetValue());
                                                if (pValueList)
                                                {
-                                                       for (int i = 0; i < pValueList->GetCount(); i++)
+                                                       String dstPath = Application::GetInstance()->GetAppDataPath();
+                                                       String srcPath = L"";
+                                                       String srcFileExtention = L"";
+                                                       String* pSrcPath = dynamic_cast<String*>(pValueList->GetAt(0));
+                                                       if (pSrcPath != null)
                                                        {
-                                                               String dstPath = Application::GetInstance()->GetAppDataPath();
-                                                               String srcPath = *dynamic_cast<String*>(pValueList->GetAt(i));
-                                                               String srcFileExtention = File::GetFileExtension(srcPath);
+                                                               srcPath = *pSrcPath;
+                                                       }
+                                                       if (srcPath.IsEmpty() == false)
+                                                       {
+                                                               srcFileExtention = File::GetFileExtension(srcPath);
+                                                       }
+
+                                                       switch (argIndex)
+                                                       {
+                                                       case 0:
+                                                       {
+                                                               dstPath.Append(L"/home.");
+                                                               dstPath.Append(srcFileExtention);
+                                                               File::Copy(srcPath, dstPath, false);
 
-                                                               switch (argIndex)
+                                                               if (SettingInfo::SetValue(RUNTIME_INFO_KEY_WALLPAPER_SCREEN, dstPath) != E_SUCCESS)
                                                                {
-                                                               case 0:
-                                                                       {
-                                                                               dstPath.Append(L"/home.");
-                                                                               dstPath.Append(srcFileExtention);
-                                                                               File::Copy(srcPath, dstPath, false);
-
-                                                                               if (SettingInfo::SetValue(RUNTIME_INFO_KEY_WALLPAPER_SCREEN, dstPath) != E_SUCCESS)
-                                                                               {
-                                                                                       AppLogDebug("Wallpapaer Screen SetValue is Fail [%s]", GetErrorMessage(GetLastResult()));
-                                                                               }
-                                                                       }
-                                                                       break;
+                                                                       AppLogDebug("Wallpaper Screen SetValue is Fail [%s]", GetErrorMessage(GetLastResult()));
+                                                               }
+                                                       }
+                                                       break;
 
-                                                               case 1:
-                                                                       {
-                                                                               dstPath.Append(L"/lock.");
-                                                                               dstPath.Append(srcFileExtention);
-                                                                               File::Copy(srcPath, dstPath, false);
-
-                                                                               if (SettingInfo::SetValue(RUNTIME_INFO_KEY_WALLPAPER_SCREEN_LOCK, dstPath) != E_SUCCESS)
-                                                                               {
-                                                                                       AppLogDebug("Wallpapaer Lock Screen SetValue is Fail [%s]", GetErrorMessage(GetLastResult()));
-                                                                               }
-                                                                       }
-                                                                       break;
+                                                       case 1:
+                                                       {
+                                                               dstPath.Append(L"/lock.");
+                                                               dstPath.Append(srcFileExtention);
+                                                               File::Copy(srcPath, dstPath, false);
 
-                                                               case 2:
-                                                                       {
-                                                                               dstPath.Append(L"/homelock.");
-                                                                               dstPath.Append(srcFileExtention);
-                                                                               File::Copy(srcPath, dstPath, false);
-
-                                                                               if (SettingInfo::SetValue(RUNTIME_INFO_KEY_WALLPAPER_SCREEN, dstPath) != E_SUCCESS)
-                                                                               {
-                                                                                       AppLogDebug("Wallpapaer Screen SetValue is Fail [%s]", GetErrorMessage(GetLastResult()));
-                                                                               }
-
-                                                                               if (SettingInfo::SetValue(RUNTIME_INFO_KEY_WALLPAPER_SCREEN_LOCK, dstPath) != E_SUCCESS)
-                                                                               {
-                                                                                       AppLogDebug("Wallpapaer Lock Screen SetValue is Fail [%s]", GetErrorMessage(GetLastResult()));
-                                                                               }
-                                                                       }
-                                                                       break;
+                                                               if (SettingInfo::SetValue(RUNTIME_INFO_KEY_WALLPAPER_SCREEN_LOCK, dstPath) != E_SUCCESS)
+                                                               {
+                                                                       AppLogDebug("Wallpaper Lock Screen SetValue is Fail [%s]", GetErrorMessage(GetLastResult()));
+                                                               }
+                                                       }
+                                                       break;
+
+                                                       case 2:
+                                                       {
+                                                               dstPath.Append(L"/homelock.");
+                                                               dstPath.Append(srcFileExtention);
+                                                               File::Copy(srcPath, dstPath, false);
 
-                                                               default:
-                                                                       break;
+                                                               if (SettingInfo::SetValue(RUNTIME_INFO_KEY_WALLPAPER_SCREEN, dstPath) != E_SUCCESS)
+                                                               {
+                                                                       AppLogDebug("Wallpaper Screen SetValue is Fail [%s]", GetErrorMessage(GetLastResult()));
                                                                }
-                                                               SceneManager* pSceneManager = SceneManager::GetInstance();
-                                                               AppAssert(pSceneManager);
-                                                               IListT<SceneId>* sceneList = pSceneManager->GetSceneHistoryN();
-                                                               pSceneManager->ClearSceneHistory();
-                                                               int sceneIndex = 0;
-                                                               while (sceneIndex < sceneList->GetCount())
+
+                                                               if (SettingInfo::SetValue(RUNTIME_INFO_KEY_WALLPAPER_SCREEN_LOCK, dstPath) != E_SUCCESS)
                                                                {
-                                                                       String* pSceneId = new (std::nothrow) String();
-                                                                       sceneList->GetAt(sceneIndex++, *pSceneId);
-                                                                       if (pSceneId->Equals(IDSCN_WALLPAPER_ALBUM_LIST, true) == true)
+                                                                       AppLogDebug("Wallpaper Lock Screen SetValue is Fail [%s]", GetErrorMessage(GetLastResult()));
+                                                               }
+                                                       }
+                                                       break;
+
+                                                       default:
+                                                               break;
+                                                       }
+                                                       SceneManager* pSceneManager = SceneManager::GetInstance();
+                                                       AppAssert(pSceneManager);
+                                                       IListT<SceneId>* sceneList = pSceneManager->GetSceneHistoryN();
+                                                       pSceneManager->ClearSceneHistory();
+                                                       int sceneIndex = 0;
+                                                       while (sceneIndex < sceneList->GetCount())
+                                                       {
+                                                               String* pSceneId = new (std::nothrow) String();
+                                                               sceneList->GetAt(sceneIndex++, *pSceneId);
+                                                               if (pSceneId->Equals(IDSCN_WALLPAPER_ALBUM_LIST, true) == true)
+                                                               {
+                                                                       if (pSceneManager->IsSceneAlive(*pSceneId) == true)
                                                                        {
-                                                                               if (pSceneManager->IsSceneAlive(*pSceneId) == true)
-                                                                               {
-                                                                                       pSceneManager->DestroyScene(*pSceneId);
-                                                                               }
-                                                                               delete pSceneId;
-                                                                               continue;
+                                                                               pSceneManager->DestroyScene(*pSceneId);
                                                                        }
-
-                                                                       pSceneManager->AddToSceneHistory(*pSceneId);
                                                                        delete pSceneId;
+                                                                       continue;
                                                                }
-                                                               pSceneManager->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_RIGHT), null);
+
+                                                               pSceneManager->AddToSceneHistory(*pSceneId);
+                                                               delete pSceneId;
                                                        }
+                                                       pSceneManager->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_RIGHT), null);
                                                }
                                        }
                                }
@@ -601,4 +607,4 @@ WallpaperAlbumListDetailForm::SetAllAlbumPathList(void)
                pAlbumPathList->Add(*(new (std::nothrow) String(pAlbumInfo->GetDirectory(i))));
        }
        __pAlbumPathList = pAlbumPathList;
-}
\ No newline at end of file
+}