Fixed jira issue and modified the problem of App freezing when AppControl fail return...
authorMyunkyu <mk70.kang@partner.samsung.com>
Wed, 17 Apr 2013 10:07:32 +0000 (19:07 +0900)
committerMyunkyu <mk70.kang@partner.samsung.com>
Thu, 18 Apr 2013 00:25:04 +0000 (09:25 +0900)
Change-Id: Ia5535cdf3952311f42025c676524a6a18da7cef6

15 files changed:
inc/MpMusicPlayerPresentationModel.h
src/MpAllListPanel.cpp
src/MpArtistContentListForm.cpp
src/MpCommonUtil.cpp
src/MpFolderContentListForm.cpp
src/MpMusicPlayerApp.cpp
src/MpMusicPlayerForm.cpp
src/MpMusicPlayerPresentationModel.cpp
src/MpPlaylistCreatorForm.cpp
src/MpPlaylistListEditorPanel.cpp
src/MpPlaylistReNameForm.cpp
src/MpSearchForm.cpp
src/MpSetAsPopup.cpp
src/MpSharePopup.cpp
src/MpUserPlaylistContentListForm.cpp

index 0476b2a..25873f6 100644 (file)
@@ -148,8 +148,8 @@ private:
        int __repeatMode;
        bool __shuffleEnable;
        bool __seekCompleted;
-       int     __playposition;
-
+       int __playposition;
+       int __lastPosition;
        Tizen::Media::PlayerState __previousPlayerState;
        int __xTimesValue;
        Tizen::Telephony::CallManager* __pCallManager;
index 96d617f..e0d217d 100644 (file)
@@ -235,6 +235,7 @@ AllListPanel::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
                // fall through         
        case IDA_CONTEXT_MENU_ITEM_MESSAGE:
                {
+                       result r = E_FAILURE;
                        String providerID = ((actionId == IDA_CONTEXT_MENU_ITEM_EMAIL) ? PROVIDER_ID_EMAIL : PROVIDER_ID_MESSAGE);
                        AppControl* pAppControl = AppManager::FindAppControlN(providerID, OPERATION_ID_COMPOSE);
                        if (pAppControl == null)
@@ -257,11 +258,18 @@ AllListPanel::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 
                        pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), pValueList);
 
-                       pAppControl->Start(null, null, pDataList, this);
+                       r = pAppControl->Start(null, null, pDataList, this);
 
-                       Frame* pFrame = MusicPlayerApp::GetInstance()->GetFrameAt(0);
-                       AppAssert(pFrame);
-                       pFrame->SetEnabled(false);
+                       if (r == E_SUCCESS)
+                       {
+                               Frame* pFrame = MusicPlayerApp::GetInstance()->GetFrameAt(0);
+                               AppAssert(pFrame);
+                               pFrame->SetEnabled(false);
+                       }
+                       else
+                       {
+                               AppLogDebug("AppControl Start fail");
+                       }
 
                        delete pContentInfoStruct;
                        delete pAppControl;
@@ -283,6 +291,7 @@ AllListPanel::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 
        case IDA_CONTEXT_MENU_ITEM_CALLER:
                {
+                       result r = E_FAILURE;
                        AppControl* pAppControl = AppManager::FindAppControlN(PROVIDER_ID_CONTACT, OPERATION_ID_SOCIAL_PICK);
                        if (pAppControl == null)
                        {
@@ -295,11 +304,17 @@ AllListPanel::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
                        pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_SOCIAL_ITEM_TYPE), new (std::nothrow) String(APPCONTROL_OPTION_PERSON));
                        pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_SOCIAL_RESULT_TYPE), new (std::nothrow) String(APPCONTROL_OPTION_ITEM_ID));
 
-                       pAppControl->Start(null, null, pDataList, this);
-
-                       Frame* pFrame = MusicPlayerApp::GetInstance()->GetFrameAt(0);
-                       AppAssert(pFrame);
-                       pFrame->SetEnabled(false);
+                       r = pAppControl->Start(null, null, pDataList, this);
+                       if (r == E_SUCCESS)
+                       {
+                               Frame* pFrame = MusicPlayerApp::GetInstance()->GetFrameAt(0);
+                               AppAssert(pFrame);
+                               pFrame->SetEnabled(false);
+                       }
+                       else
+                       {
+                               AppLogDebug("AppControl Start fail");
+                       }
 
                        delete pAppControl;
                }
index 477f065..eeb5525 100644 (file)
@@ -970,16 +970,21 @@ ArtistContentListForm::EventHandlerContextMenuItemCaller(void)
                delete pDataList;
                return r;
        }
-
        pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_SELECTION_MODE), new (std::nothrow) String(APPCONTROL_OPTION_SINGLE));
        pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_SOCIAL_ITEM_TYPE), new (std::nothrow) String(APPCONTROL_OPTION_PERSON));
        pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_SOCIAL_RESULT_TYPE), new (std::nothrow) String(APPCONTROL_OPTION_ITEM_ID));
 
-       pAppControl->Start(null, null, pDataList, this);
-
-       Frame* pFrame = MusicPlayerApp::GetInstance()->GetFrameAt(0);
-       AppAssert(pFrame);
-       pFrame->SetEnabled(false);
+       r = pAppControl->Start(null, null, pDataList, this);
+       if (r == E_SUCCESS)
+       {
+               Frame* pFrame = MusicPlayerApp::GetInstance()->GetFrameAt(0);
+               AppAssert(pFrame);
+               pFrame->SetEnabled(false);
+       }
+       else
+       {
+               AppLogDebug("AppControl Start fail");
+       }
 
        delete pAppControl;
        pAppControl = null;
@@ -1014,6 +1019,7 @@ result
 ArtistContentListForm::EventHandlerContextMenuItemMessageEmail(ContentInformation& contentInfo, Tizen::Base::String providerId)
 {
        AppLogDebug("ENTER");
+       result r = E_FAILURE;
        if (!providerId.Equals(PROVIDER_ID_EMAIL, false) && !providerId.Equals(PROVIDER_ID_MESSAGE, false))
        {
                AppLogDebug("worng providerId(%s)", providerId.GetPointer());
@@ -1036,12 +1042,17 @@ ArtistContentListForm::EventHandlerContextMenuItemMessageEmail(ContentInformatio
 
        pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), pValueList);
 
-       pAppControl->Start(null, null, pDataList, this);
-
-       Frame* pFrame = MusicPlayerApp::GetInstance()->GetFrameAt(0);
-       AppAssert(pFrame);
-       pFrame->SetEnabled(false);
-
+       r = pAppControl->Start(null, null, pDataList, this);
+       if (r == E_SUCCESS)
+       {
+               Frame* pFrame = MusicPlayerApp::GetInstance()->GetFrameAt(0);
+               AppAssert(pFrame);
+               pFrame->SetEnabled(false);
+       }
+       else
+       {
+               AppLogDebug("AppControl Start fail");
+       }
        delete pAppControl;
        pAppControl = null;
 
index 15efb05..c45d0b2 100644 (file)
@@ -619,6 +619,7 @@ CommonUtil::SetTabHeaderStyle(Tizen::Ui::Controls::Header& pHeader)
 
                pHeader.AddItem(pTabHeaderItem);
        }
+       pHeader.SetDragEnabled(false);
        AppLogDebug("EXIT");
 }
 
index ad0a03e..8784d42 100644 (file)
@@ -293,6 +293,7 @@ FolderContentListForm::OnActionPerformed(const Tizen::Ui::Control& source, int a
                // fall through
        case IDA_CONTEXT_MENU_ITEM_MESSAGE:
                {
+                       result r = E_FAILURE;
                        String providerID = ((actionId == IDA_CONTEXT_MENU_ITEM_EMAIL) ? PROVIDER_ID_EMAIL : PROVIDER_ID_MESSAGE);
                        AppControl* pAppControl = AppManager::FindAppControlN(providerID, OPERATION_ID_COMPOSE);
                        if (pAppControl == null)
@@ -318,11 +319,17 @@ FolderContentListForm::OnActionPerformed(const Tizen::Ui::Control& source, int a
                        pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), pValueList);
                        delete pContentInfo;
 
-                       pAppControl->Start(null, null, pDataList, this);
-
-                       Frame* pFrame = MusicPlayerApp::GetInstance()->GetFrameAt(0);
-                       AppAssert(pFrame);
-                       pFrame->SetEnabled(false);
+                       r = pAppControl->Start(null, null, pDataList, this);
+                       if (r == E_SUCCESS)
+                       {
+                               Frame* pFrame = MusicPlayerApp::GetInstance()->GetFrameAt(0);
+                               AppAssert(pFrame);
+                               pFrame->SetEnabled(false);
+                       }
+                       else
+                       {
+                               AppLogDebug("AppControl Start fail");
+                       }
 
                        delete pAppControl;
                }
index 3c8c16e..4ec6395 100644 (file)
@@ -204,6 +204,20 @@ MusicPlayerApp::OnForeground(void)
        Frame* pFrame = GetFrameAt(0);
        AppAssert(pFrame);
 
+       SceneManager* pSceneManager = SceneManager::GetInstance();
+       AppAssert(pSceneManager);
+
+       SceneId currentSceneId = pSceneManager->GetCurrentSceneId();
+       if (currentSceneId.Equals(__sceneId, false) && __sceneId.Equals(IDSCN_PLAYER, false) == true)
+       {
+               Scene* pScene = pSceneManager->GetCurrentScene();
+               PlayerForm* pPlayerForm = dynamic_cast<PlayerForm*>(pScene->GetForm());
+               if (pPlayerForm != null)
+               {
+                       pPlayerForm->OnChangedContentList(__pDataList);
+               }
+       }
+
        if (pFrame->IsEnabled() == false)
        {
                pFrame->SetEnabled(true);
index 285fdcf..016357b 100644 (file)
@@ -464,7 +464,7 @@ PlayerForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
                        __pContentsAlbumViewPanel->SetShowState(false);
                        __pContentsViewToggleButton->SetActionId(IDA_BUTTON_CONTENTS_ALBUM_VIEW);
 
-                       if (__pContentsListViewPanel->IsEnabled() == false)
+                       if (__pContentsListViewPanel->IsEnabled() == false && __isRunByAppControl == false)
                        {
                                __pContentsListViewPanel->SetEnabled(true);
                                TableView* pContentsTableView = static_cast<TableView*>(__pContentsListViewPanel->GetControl(IDC_CONTENTS_TABLEVIEW));
@@ -1183,34 +1183,32 @@ PlayerForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
        }
        else
        {
-               if (__pPlayerPresentationModel->GetContentListCount() == INIT_VALUE)
+               PlayerState playerState = __pPlayerPresentationModel->GetPlayerState();
+               if (playerState != PLAYER_STATE_PAUSED
+                               && playerState != PLAYER_STATE_PLAYING
+                               && __pPlayerPresentationModel->GetContentListCount() == INIT_VALUE)
                {
-                       AppLogDebug("__pPlayerPresentationModel->GetContentListCount() is 0");
-                       SetPlayerScreenState(PLAYER_SCREEN_STATE_NO_CONTENT_LIST);
-                       return;
+                       playerState = PLAYER_STATE_ERROR;
+               }
+
+               Bitmap* p  = __pPlayerPresentationModel->GetPlayContentThumbnail();
+               if (p == null)
+               {
+                       AppLogDebug("null");
                }
 
                SetContentInfo( __pPlayerPresentationModel->GetCurrentContentIndex());
-               OnPlayStateChanged(__pPlayerPresentationModel->GetPlayerState());
                OnPlayTimeChanged(__pPlayerPresentationModel->GetCurrentDuration(), __pPlayerPresentationModel->GetPlayPosition());
+               OnPlayStateChanged(playerState);
 
-               if (GetPlayerScreenState() == PLAYER_SCREEN_STATE_DURING_CALL)
+               if (GetPlayerScreenState() == PLAYER_SCREEN_STATE_DURING_CALL
+                       && playerState != PLAYER_STATE_ERROR
+                       && __pPlayerPresentationModel->IsDuringCall() == false)
                {
                        SetPlayerScreenState(PLAYER_SCREEN_STATE_NORMAL);
                }
        }
 
-       if (__pContentsListViewPanel->IsEnabled() == true && __isRunByAppControl == false)
-       {
-               TableView* pContentsTableView = static_cast<TableView*>(__pContentsListViewPanel->GetControl(IDC_CONTENTS_TABLEVIEW));
-               pContentsTableView->UpdateTableView();
-       }
-
-       if (__pPlayerPresentationModel->IsFileExist(__pPlayerPresentationModel->GetCurrentContentIndex()) != true)
-       {
-               SetFileNotExistState(false);
-       }
-
        Invalidate(true);
        AppLogDebug("EXIT");
 }
@@ -1619,6 +1617,9 @@ PlayerForm::SetFileNotExistState(bool isFileExist)
        __pMoreContextButton->SetEnabled(isFileExist);
        __pMoreContextButton->Invalidate(true);
 
+       __pShuffleButton->SetEnabled(isFileExist);
+       __pShuffleButton->Invalidate(true);
+
        if (__isRunByAppControl == false)
        {
                __pContentsViewToggleButton->SetEnabled(isFileExist);
@@ -1640,8 +1641,7 @@ PlayerForm::TogglePlayPauseImage(PlayerState playerState)
                        delete layout;
                }
 
-               Label* pAlbumTurnTable = static_cast<Label*>(__pContentsAlbumViewPanel->GetControl(IDC_ALBUM_TURN_TABLE));
-               pAlbumTurnTable->SetShowState(true);
+               static_cast<Label*>(__pContentsAlbumViewPanel->GetControl(IDC_ALBUM_TURN_TABLE))->SetShowState(true);
                SetPauseButtonImage();
        }
        else
@@ -1653,8 +1653,7 @@ PlayerForm::TogglePlayPauseImage(PlayerState playerState)
                        delete layout;
                }
 
-               Label* pAlbumTurnTable = static_cast<Label*>(__pContentsAlbumViewPanel->GetControl(IDC_ALBUM_TURN_TABLE));
-               pAlbumTurnTable->SetShowState(false);
+               static_cast<Label*>(__pContentsAlbumViewPanel->GetControl(IDC_ALBUM_TURN_TABLE))->SetShowState(false);
                SetPlayButtonImage();
        }
 
@@ -1863,8 +1862,10 @@ PlayerForm::OnMusicContentUpdateCompleted(void)
        RemovePlayListPicker();
        RemoveSetAsPicker();
 
+       bool isCurrentContentModified = false;
        if (__pPlayerPresentationModel->IsFileExist(__pPlayerPresentationModel->GetCurrentContentIndex()) != true)
        {
+               isCurrentContentModified = true;
                SetFileNotExistState(false);
        }
 
@@ -1883,6 +1884,7 @@ PlayerForm::OnMusicContentUpdateCompleted(void)
                return;
        }
 
+       String* pPlayContentPath = __pPlayerPresentationModel->GetPlayContentPath();
        int iContentListCount = __pPlayerPresentationModel->GetContentListCount();
        for (int iCount =  iContentListCount - 1; iCount >= 0; iCount--)
        {
@@ -1906,6 +1908,12 @@ PlayerForm::OnMusicContentUpdateCompleted(void)
                                isFind = true;
                                break;
                        }
+
+                       if (pPlayContentPath != null && pContentPath->Equals(*pPlayContentPath, false))
+                       {
+                               isFind = true;
+                               break;
+                       }
                }
                delete pIEnum;
 
@@ -1917,7 +1925,7 @@ PlayerForm::OnMusicContentUpdateCompleted(void)
 
        if (__pContentsListViewPanel->IsEnabled() == true)
        {
-               if (__pPlayerPresentationModel->GetContentListCount() != INIT_VALUE)
+               if (__pPlayerPresentationModel->GetContentListCount() != INIT_VALUE && isCurrentContentModified == false)
                {
                        static_cast<TableView*>(__pContentsListViewPanel->GetControl(IDC_CONTENTS_TABLEVIEW))->UpdateTableView();
                }
@@ -2022,7 +2030,9 @@ PlayerForm::SetPlayerScreenState(unsigned int playerScreenState)
                {
                        __pPlayPauseButton->SetEnabled(false);
                        __pPlayStateSlider->SetEnabled(false);
+                       __pShuffleButton->SetEnabled(false);
                        __pMoreContextButton->SetEnabled(false);
+
                        Bitmap* pThumb = ResourceManager::GetBitmapN(L"music_play_grid_thumb_loading.png");
                        static_cast<Label*>(__pContentsAlbumViewPanel->GetControl(IDC_CONTENTS_THUMBNAIL))->SetBackgroundBitmap(*pThumb);
                        delete pThumb;
index 6e947b9..fb9d639 100644 (file)
@@ -104,6 +104,7 @@ PlayerPresentationModel::PlayerPresentationModel(void)
        , __shuffleEnable(false)
        , __seekCompleted(true)
        , __playposition(MIN_SLIDER_COUNT)
+       , __lastPosition(MIN_SLIDER_COUNT)
        , __previousPlayerState(PLAYER_STATE_ERROR)
        , __xTimesValue(INIT_X_VALUE)
        , __pCallManager(null)
@@ -693,7 +694,15 @@ PlayerPresentationModel::GetContentAlbumArtN(int contentIndex)
                return pAlbumArtBitmap;
        }
 
-       pAlbumArtBitmap = CommonUtil::GetContentAlbumArtN(*static_cast<String*>(__pPlayContentList->GetAt(contentIndex)));
+       String* path = static_cast<String*>(__pPlayContentList->GetAt(contentIndex));
+       if (path == null)
+       {
+               pAlbumArtBitmap = ResourceManager::GetBitmapN(L"34_thumb_07.png");
+               AppLogDebug("EXIT");
+               return pAlbumArtBitmap;
+       }
+
+       pAlbumArtBitmap = CommonUtil::GetContentAlbumArtN(*path);
        if (pAlbumArtBitmap == null)
        {
                pAlbumArtBitmap = ResourceManager::GetBitmapN(L"34_thumb_07.png");
@@ -1265,6 +1274,7 @@ PlayerPresentationModel::SetPlayPosition(int playPosition)
                        TryCatch(r == E_SUCCESS, r = E_FAILURE, "Unable to seek to.\n");
 
                        __playposition = playPosition;
+                       __lastPosition = __playposition;
                        currentDuration = CommonUtil::GetFormatDate(__pPlayer->GetPosition());
                        CallOnPlayTimeChanged(currentDuration, __playposition);
                        __seekCompleted = false;
@@ -1277,6 +1287,10 @@ PlayerPresentationModel::SetPlayPosition(int playPosition)
                        __seekCompleted = true;
                }
        }
+       else
+       {
+               __lastPosition = playPosition;
+       }
 
        AppLogDebug("EXIT");
        return r;
@@ -1832,6 +1846,11 @@ PlayerPresentationModel::OnPlayerSeekCompleted(result r)
        {
                __seekCompleted = false;
        }
+
+       if (__lastPosition != __playposition)
+       {
+               SetPlayPosition(__lastPosition);
+       }
        AppLogDebug("EXIT");
 }
 
index b2195a8..c346ddf 100644 (file)
@@ -68,7 +68,6 @@ PlaylistCreatorForm::OnInitializing(void)
        __pPlaylistEditField->AddKeypadEventListener(*this);
        __pPlaylistEditField->SetOverlayKeypadCommandButtonVisible(false);
        __pPlaylistEditField->SetFocus();
-       __pPlaylistEditField->ShowKeypad();
        __pPlaylistEditorPresentationModel = PlaylistEditorPresentationModel::GetInstance();
 
        SetFormBackEventListener(this);
@@ -213,6 +212,8 @@ PlaylistCreatorForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previou
                __pPlaylistEditField->SetText(PlayListName);
        }
 
+       __pPlaylistEditField->ShowKeypad();
+
        if (pNumberList != null)
        {
                pNumberList->RemoveAll(true);
@@ -326,6 +327,17 @@ void
 PlaylistCreatorForm::OnTextValueChanged(const Tizen::Ui::Control& source)
 {
        AppLogDebug("ENTER");
+       Footer* pFooter = GetFooter();
+       EditArea* pEditArea = const_cast<EditArea*>(static_cast<const EditArea*>(&source));
+       String editareaString = pEditArea->GetText();
+       if (editareaString.GetLength() == INIT_VALUE)
+       {
+               CommonUtil::SetFooterItemEnabled(*pFooter, false);
+       }
+       else
+       {
+               CommonUtil::SetFooterItemEnabled(*pFooter, true);
+       }
        AppLogDebug("EXIT");
 }
 
index ce57436..7b9a559 100644 (file)
@@ -171,6 +171,11 @@ PlaylistListEditorPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& pre
 
        UpdateContentEditScreenState();
 
+       if (previousSceneId.Equals(IDSCN_PLAYLIST_RENAME, true))
+       {
+               __pContentTableView->UpdateTableView();
+       }
+
        if (pArgs != null)
        {
                pArgs->RemoveAll(true);
index e3349d0..21af9c0 100644 (file)
@@ -68,7 +68,6 @@ PlaylistReNameForm::OnInitializing(void)
        __pPlaylistEditField->AddKeypadEventListener(*this);
        __pPlaylistEditField->SetOverlayKeypadCommandButtonVisible(false);
        __pPlaylistEditField->SetFocus();
-       __pPlaylistEditField->ShowKeypad();
        __pPlaylistEditorPresentationModel = PlaylistEditorPresentationModel::GetInstance();
 
        AppLogDebug("EXIT");
@@ -133,6 +132,7 @@ PlaylistReNameForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previous
 
        __playlistName = *static_cast<String*>(pPlaylistList->GetAt(__selectedPlaylistIndex));
        __pPlaylistEditField->SetText(__playlistName);
+       __pPlaylistEditField->ShowKeypad();
 
        pPlaylistList->RemoveAll(true);
        delete pPlaylistList;
index f0a5ec3..19a45c9 100644 (file)
@@ -250,7 +250,7 @@ SearchForm::CreateItem(const int itemIndex, int itemWidth)
 
        if (__pPresentationModel->GetArtistIndex() == itemIndex)
        {
-               r = CreateGroupNameTableViewItem(*pItem, ResourceManager::GetString(L"IDS_MUSIC_BODY_ARTISTS"));
+               r = CreateGroupNameTableViewItem(*pItem, ResourceManager::GetString(L"IDS_MUSIC_TAB4_ARTISTS"));
                TryCatch(r == E_SUCCESS, delete pItem, "CreateTableViewItem failed(%s)", GetErrorMessage(r));
 
                AppLogDebug("EXIT");
index 12f907f..15c198d 100644 (file)
@@ -311,6 +311,7 @@ SetAsPopup::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableVie
                                                Tizen::Ui::Controls::TableViewItemStatus status)
 {
        AppLogDebug("ENTER");
+       result r = E_FAILURE;
        if (itemIndex == 0)
        {
                result r = Tizen::System::SettingInfo::SetValue(CALL_RINGTONE_KEY, *__pCurrentContentPath);
@@ -346,12 +347,17 @@ SetAsPopup::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableVie
 //             pData->Add(*(new (std::nothrow) String(SELECTION_MODE)));
 //             pData->Add(*(new (std::nothrow) String(RETURN_TYPE)));
 
-               pAppControl->Start(null, null, pDataList, this);
-
-               Frame* pFrame = MusicPlayerApp::GetInstance()->GetFrameAt(0);
-               AppAssert(pFrame);
-               pFrame->SetEnabled(false);
-
+               r = pAppControl->Start(null, null, pDataList, this);
+               if (r == E_SUCCESS)
+               {
+                       Frame* pFrame = MusicPlayerApp::GetInstance()->GetFrameAt(0);
+                       AppAssert(pFrame);
+                       pFrame->SetEnabled(false);
+               }
+               else
+               {
+                       AppLogDebug("AppControl Start fail");
+               }
                SetShowState(false);
                Invalidate(true);
                delete pAppControl;
index 04b134e..1376455 100644 (file)
@@ -362,17 +362,25 @@ result
 SharePopup::LaunchAppControl(const Tizen::Base::String& operationId, const Tizen::Base::String& providerId)
 {
        AppLogDebug("ENTER");
+       result r = E_FAILURE;
        AppControl* pAc = AppManager::FindAppControlN(providerId, operationId);
        if (pAc == null)
        {
                return E_FAILURE;
        }
 
-       pAc->Start(null, null, __pDataList, this);
+       r = pAc->Start(null, null, __pDataList, this);
 
-       Frame* pFrame = MusicPlayerApp::GetInstance()->GetFrameAt(0);
-       AppAssert(pFrame);
-       pFrame->SetEnabled(false);
+       if (r == E_SUCCESS)
+       {
+               Frame* pFrame = MusicPlayerApp::GetInstance()->GetFrameAt(0);
+               AppAssert(pFrame);
+               pFrame->SetEnabled(false);
+       }
+       else
+       {
+               AppLogDebug("AppControl Start fail");
+       }
 
        delete pAc;
        AppLogDebug("EXIT");
index bbbeadb..1d0601c 100644 (file)
@@ -198,15 +198,15 @@ UserPlaylistContentListForm::OnActionPerformed(const Tizen::Ui::Control& source,
 
        case IDA_CONTEXT_MENU_ITEM_STYLE_ADD:
                {
-                       if (__pPresentationModel->GetContentCount() == 0)
-                       {
-                               MessageBox messageBox;
-                               messageBox.Construct(L"", ResourceManager::GetString(L"IDS_MUSIC_HEADER_NO_SONGS"), MSGBOX_STYLE_NONE, 500);
-
-                               int modalResult = 0;
-                               messageBox.ShowAndWait(modalResult);
-                       }
-                       else
+//                     if (__pPresentationModel->GetContentCount() == 0)
+//                     {
+//                             MessageBox messageBox;
+//                             messageBox.Construct(L"", ResourceManager::GetString(L"IDS_MUSIC_HEADER_NO_SONGS"), MSGBOX_STYLE_NONE, 500);
+//
+//                             int modalResult = 0;
+//                             messageBox.ShowAndWait(modalResult);
+//                     }
+//                     else
                        {
                                CommonUtil::SetAddtoPlaylistState(true);
                                CommonUtil::SetAddtoPlaylistName(__headerTitle);
@@ -244,12 +244,12 @@ UserPlaylistContentListForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId&
                pArgs->RemoveAll(true);
                delete pArgs;
        }
-//     else if (!(__headerTitle.Equals(L"", false)))
-//     {
-//             __pPresentationModel->UpdatePlaylistContentList(USER_CONTENT, __headerTitle);
-//             UpdateScreenState();
-//             UpdateTableView();
-//     }
+       else if (!(__headerTitle.Equals(L"", false)))
+       {
+               __pPresentationModel->UpdatePlaylistContentList(USER_CONTENT, __headerTitle);
+               UpdateScreenState();
+               UpdateTableView();
+       }
        AppLogDebug("EXIT");
 }