//Empty Implementation.\r
}\r
\r
-//void\r
-//DetailsForm::OnDeviceChange(ComponentType deviceType, const Tizen::Base::String& state)\r
-//{\r
-// bool setMediaPath = false;\r
-// bool searchHistoryStatus = false;\r
-// MemoryType currentMemoryType = MEMORY_TYPE_PHONE;\r
-// String unmounted = sdCardStatusUnmounted;\r
-// String removed = usbDeviceStatusRemoved;\r
-// String currentPath;\r
-// String searchScene;\r
-// SceneManager* pSceneManager = null;\r
-// IListT< SceneId >* pSceneList = null;\r
-// int itemCount = 0;\r
-//\r
-// pSceneManager = SceneManager::GetInstance();\r
-//\r
-// if (state == unmounted || state == removed)\r
-// {\r
-// currentPath = FolderNavigationPresentationModel::GetCurrentPath();\r
-// if (state == unmounted)\r
-// {\r
-// if (currentPath.Contains(BasePresentationModel::GetSdCardPath()))\r
-// {\r
-// FolderNavigationPresentationModel::SetCurrentFilePath(BasePresentationModel::GetMediaPath());\r
-// FolderNavigationPresentationModel::SetStorageType(currentMemoryType);\r
-// setMediaPath = true;\r
-// }\r
-// }\r
-//\r
-// if (state == removed)\r
-// {\r
-// if (currentPath.Contains(BasePresentationModel::GetUsbPath()))\r
-// {\r
-// FolderNavigationPresentationModel::SetCurrentFilePath(BasePresentationModel::GetMediaPath());\r
-// FolderNavigationPresentationModel::SetStorageType(currentMemoryType);\r
-// setMediaPath = true;\r
-// }\r
-// }\r
-//\r
-// if (setMediaPath)\r
-// {\r
-// if (pSceneManager != null)\r
-// {\r
-// pSceneList = pSceneManager->GetSceneHistoryN();\r
-// }\r
-//\r
-// if (pSceneList != null)\r
-// {\r
-// itemCount = pSceneList->GetCount() - 1;\r
-// pSceneList->GetAt(itemCount, searchScene);\r
-// while (searchScene != IDSCN_SEARCH_FORM && itemCount >= 0)\r
-// {\r
-// itemCount--;\r
-// pSceneList->GetAt(itemCount, searchScene);\r
-// }\r
-// }\r
-//\r
-// if (searchScene == IDSCN_SEARCH_FORM)\r
-// {\r
-// AppLogDebug("Search scene present");\r
-// searchHistoryStatus = true;\r
-// }\r
-// else\r
-// {\r
-// AppLogDebug("Search scene not present");\r
-// searchHistoryStatus = false;\r
-// }\r
-//\r
-// if(pSceneList)\r
-// {\r
-// pSceneList->RemoveAll();\r
-// delete pSceneList;\r
-// pSceneList = null;\r
-// }\r
-//\r
-// if (searchHistoryStatus == true)\r
-// {\r
-// if (pSceneManager != null)\r
-// {\r
-// pSceneManager->DestroyScene(IDSCN_SEARCH_FORM);\r
-// pSceneManager->ClearSceneHistory();\r
-// }\r
-// }\r
-//\r
-// if (pSceneManager != null)\r
-// {\r
-// pSceneManager->GoForward(ForwardSceneTransition(IDSCN_TEMP_FORM, SCENE_TRANSITION_ANIMATION_TYPE_NONE, SCENE_HISTORY_OPTION_NO_HISTORY, SCENE_DESTROY_OPTION_DESTROY), null);\r
-// }\r
-// }\r
-// }\r
-//}\r
+void\r
+DetailsForm::OnDeviceChange(ComponentType deviceType, const Tizen::Base::String& state)\r
+{\r
+ bool setMediaPath = false;\r
+ bool searchHistoryStatus = false;\r
+ MemoryType currentMemoryType = MEMORY_TYPE_PHONE;\r
+ String unmounted = sdCardStatusUnmounted;\r
+ String removed = usbDeviceStatusRemoved;\r
+ String currentPath;\r
+ String searchScene;\r
+ SceneManager* pSceneManager = null;\r
+ IListT< SceneId >* pSceneList = null;\r
+ int itemCount = 0;\r
+\r
+ pSceneManager = SceneManager::GetInstance();\r
+\r
+ if (state == unmounted || state == removed)\r
+ {\r
+ currentPath = FolderNavigationPresentationModel::GetCurrentPath();\r
+ if (state == unmounted)\r
+ {\r
+ if (currentPath.Contains(BasePresentationModel::GetSdCardPath()))\r
+ {\r
+ FolderNavigationPresentationModel::SetCurrentFilePath(BasePresentationModel::GetMediaPath());\r
+ FolderNavigationPresentationModel::SetStorageType(currentMemoryType);\r
+ setMediaPath = true;\r
+ }\r
+ }\r
+\r
+ if (state == removed)\r
+ {\r
+ if (currentPath.Contains(BasePresentationModel::GetUsbPath()))\r
+ {\r
+ FolderNavigationPresentationModel::SetCurrentFilePath(BasePresentationModel::GetMediaPath());\r
+ FolderNavigationPresentationModel::SetStorageType(currentMemoryType);\r
+ setMediaPath = true;\r
+ }\r
+ }\r
+\r
+ if (setMediaPath)\r
+ {\r
+ if (pSceneManager != null)\r
+ {\r
+ pSceneList = pSceneManager->GetSceneHistoryN();\r
+ }\r
+\r
+ if (pSceneList != null)\r
+ {\r
+ itemCount = pSceneList->GetCount() - 1;\r
+ pSceneList->GetAt(itemCount, searchScene);\r
+ while (searchScene != IDSCN_SEARCH_FORM && itemCount >= 0)\r
+ {\r
+ itemCount--;\r
+ pSceneList->GetAt(itemCount, searchScene);\r
+ }\r
+ }\r
+\r
+ if (searchScene == IDSCN_SEARCH_FORM)\r
+ {\r
+ AppLogDebug("Search scene present");\r
+ searchHistoryStatus = true;\r
+ }\r
+ else\r
+ {\r
+ AppLogDebug("Search scene not present");\r
+ searchHistoryStatus = false;\r
+ }\r
+\r
+ if(pSceneList)\r
+ {\r
+ pSceneList->RemoveAll();\r
+ delete pSceneList;\r
+ pSceneList = null;\r
+ }\r
+\r
+ if (searchHistoryStatus == true)\r
+ {\r
+ if (pSceneManager != null)\r
+ {\r
+ pSceneManager->DestroyScene(IDSCN_SEARCH_FORM);\r
+ pSceneManager->ClearSceneHistory();\r
+ }\r
+ }\r
+\r
+ if (pSceneManager != null)\r
+ {\r
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_TOP_LEVEL_DIRECTORY_FORM, SCENE_TRANSITION_ANIMATION_TYPE_NONE, SCENE_HISTORY_OPTION_NO_HISTORY, SCENE_DESTROY_OPTION_DESTROY), null);\r
+ }\r
+ }\r
+ }\r
+}\r
\r
void\r
DetailsForm::OnDeviceStateChanged(Tizen::System::DeviceType deviceType, const Tizen::Base::String& state)\r
}\r
break;\r
}\r
-// OnDeviceChange(currentDeviceType, state);\r
+ OnDeviceChange(currentDeviceType, state);\r
}\r