Fixed Jira issue and fixed an issue that comes out wrong contentlist when the player...
authorMyunkyu <mk70.kang@partner.samsung.com>
Sat, 20 Apr 2013 11:46:11 +0000 (20:46 +0900)
committerMyunkyu <mk70.kang@partner.samsung.com>
Sat, 20 Apr 2013 12:04:45 +0000 (21:04 +0900)
Change-Id: I676a4cb0918f1b476f87c30960274626da2debbb

12 files changed:
inc/MpMusicPlayerForm.h
inc/MpNotificationTicker.h
src/MpArtistListPresentationModel.cpp
src/MpContentDetailForm.cpp
src/MpContentListPanel.cpp
src/MpFolderContentListForm.cpp
src/MpFolderListEditorPanel.cpp
src/MpFolderListPanel.cpp
src/MpMiniPlayer.cpp
src/MpMusicPlayerForm.cpp
src/MpMusicPlayerPresentationModel.cpp
src/MpNotificationTicker.cpp

index 6bc0658..dbfc04e 100644 (file)
@@ -212,6 +212,7 @@ private:
        unsigned int __playerScreenState;
        bool __isAnimationPerformed;
        bool __isRunByAppControl;
+       int __prevRepeatStateRunByAppControl;
 
        Tizen::Base::Runtime::Timer* __pAnimationFinishedTimer;
        Tizen::Base::Runtime::Timer* __pContentPlayTimer;
index a63d309..1f071c6 100644 (file)
@@ -28,7 +28,7 @@
 #include <FUiAnimations.h>\r
 \r
 class NotificationTicker\r
-       : public Tizen::Base::Runtime::ITimerEventListener\r
+       : public Tizen::Ui::Animations::IAnimationTransactionEventListener\r
        , protected Tizen::Ui::Window\r
 {\r
 public:\r
@@ -37,25 +37,38 @@ public:
 \r
        result Construct(void);\r
 \r
-       void SetBoundTicker(Tizen::Graphics::Point point = Tizen::Graphics::Point(0, 0), int width = 720);\r
+       void SetBoundTicker(Tizen::Graphics::Rectangle rect);\r
        void ShowTicker(const Tizen::Base::String& text, int timeOut = 2000);\r
        result DestoryTicker(void);\r
 \r
 protected:\r
-       void PlayControlAnimator(bool isShow);\r
-\r
        virtual result OnInitializing(void);\r
        virtual result OnTerminating(void);\r
 \r
-       virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);\r
+       virtual result OnDraw(void);\r
+\r
+       virtual void OnAnimationTransactionStarted(int transactionId){}\r
+       virtual void OnAnimationTransactionStopped(int transactionId);\r
+       virtual void OnAnimationTransactionFinished(int transactionId);\r
+\r
+private:\r
+       void DrawBackground(Tizen::Graphics::Canvas& canvas);\r
+       Tizen::Graphics::Bitmap* GetCapturedBitmapN(void);\r
+       void PlayControlAnimator(bool isShow);\r
+       void ForceStopAnimation(void);\r
 \r
 private:\r
        Tizen::Ui::Controls::Panel* __pNotificationTickerPanel;\r
        Tizen::Ui::Controls::Label* __pTickerTextLabel;\r
-       Tizen::Base::Runtime::Timer* __pTickerTimeOutTimer;\r
-       Tizen::Ui::Animations::VisualElement* __pVisualElement;\r
+       Tizen::Graphics::Bitmap* __pBgBitmap;\r
 \r
+       Tizen::Graphics::Rectangle __hideStateRectangle;\r
+       Tizen::Graphics::Rectangle __showStateRectangle;\r
+\r
+       int __showTransactionId;\r
+       int __HideTransactionId;\r
        int __timeOut;\r
+\r
        bool __isDestory;\r
 };\r
 \r
index c954a6a..56f8957 100644 (file)
@@ -141,7 +141,27 @@ ArtistListPresentationModel::GetArtistAlbumContentCount(int albumIndex)
                return INIT_VALUE;
        }
 
-       IList* pContentSearchResultList = CommonUtil::ContentSearchResultListN(*pContentFileName, STRING_SORT_ALBUM, STRING_SORT_TITLE);
+       IList* pContentSearchResultList = null;
+       if (__keyWord == null)
+       {
+               pContentSearchResultList = CommonUtil::ContentSearchResultListN(*pContentFileName, STRING_SORT_ALBUM, STRING_SORT_TITLE);
+       }
+       else
+       {
+               String WhereExpr = null;
+               WhereExpr = CommonUtil::SpecialReplaceChange(__keyWord);
+               WhereExpr = CommonUtil::MakeQuery(STRING_SORT_ARTIST, WhereExpr);
+
+               String SearchKeyword(WhereExpr);
+               SearchKeyword.Append(L" AND ");
+
+               WhereExpr = CommonUtil::SpecialReplaceChange(*pContentFileName);
+               WhereExpr = CommonUtil::MakeQuery(STRING_SORT_ALBUM, WhereExpr);
+
+               SearchKeyword.Append(WhereExpr);
+               pContentSearchResultList = CommonUtil::SearchContentList(SearchKeyword, STRING_SORT_TITLE);
+       }
+
        if (pContentSearchResultList == null)
        {
                AppLogDebug("CommonUtil::ContentSearchResultListN() failed");
@@ -149,7 +169,6 @@ ArtistListPresentationModel::GetArtistAlbumContentCount(int albumIndex)
        }
 
        int totalCount = pContentSearchResultList->GetCount();
-
        pContentSearchResultList->RemoveAll(true);
        delete pContentSearchResultList;
 
index a75f906..76ffa2e 100644 (file)
@@ -73,115 +73,201 @@ ContentDetailForm::OnInitializing(void)
 
        __pPlayerPresentationModel = PlayerPresentationModel::GetInstance();
        int currentContentIndex = __pPlayerPresentationModel->GetCurrentContentIndex();
-
        String* tempPath = __pPlayerPresentationModel->GetContentPath(currentContentIndex);
+       AppLogDebug("CATCH %ls", tempPath->GetPointer());
        AudioContentInfo* pAudioInfo = CommonUtil::GetAudioContentInfoN(*(tempPath));
 
-//     Label* pTitletName = static_cast<Label*>(GetControl(IDC_TITLE_LABEL));
-//     pTitletName->SetTextConfig(56,LABEL_TEXT_STYLE_BOLD);
-//     pTitletName->SetText(pAudioInfo->GetTitle());
-
-       GetHeader()->SetTitleText(pAudioInfo->GetTitle());
-
-       Label* pArtistName = static_cast<Label*>(GetControl(IDC_ARTIST_NAME_LABEL));
-       pArtistName->SetTextConfig(37,LABEL_TEXT_STYLE_NORMAL);
-       pArtistName->SetText(pAudioInfo->GetArtist());
-
-       Label* pMediaInfo = static_cast<Label*>(GetControl(IDC_MEDIA_INFO_LABEL));
-       pMediaInfo->SetTextConfig(52,LABEL_TEXT_STYLE_NORMAL);
-       pMediaInfo->SetText(ResourceManager::GetString(L"IDS_MUSIC_BODY_MEDIA_INFO"));
-
-       Label* pNameLabel = static_cast<Label*>(GetControl(IDC_NAME_LABEL));
-       pNameLabel->SetText(ResourceManager::GetString(L"IDS_COM_BODY_DETAILS_NAME"));
-
-       Label* pFormatLabel = static_cast<Label*>(GetControl(IDC_FORMAT_LABEL));
-       pFormatLabel->SetText(ResourceManager::GetString(L"IDS_COM_BODY_FORMAT"));
-
-       Label* pSizeLabel = static_cast<Label*>(GetControl(IDC_SIZE_LABEL));
-       pSizeLabel->SetText(ResourceManager::GetString(L"IDS_COM_BODY_SIZE"));
-
-       Label* pForwardingLabel = static_cast<Label*>(GetControl(IDC_FORWARDING_LABEL));
-       pForwardingLabel->SetText(ResourceManager::GetString(L"IDS_MUSIC_BODY_FORWARDING"));
-
-       Label* pDateLabel = static_cast<Label*>(GetControl(IDC_DATE_LABEL));
-       pDateLabel->SetText(ResourceManager::GetString(L"IDS_IV_BODY_DATE_CREATED"));
-
-       Label*  plocationLable= static_cast<Label*>(GetControl(IDC_LOCATION_LABEL));
-       plocationLable->SetText(ResourceManager::GetString(L"IDS_MUSIC_BODY_MUSIC_LOCATION"));
-
-       Label* pTitletNameInMediaInfo = static_cast<Label*>(GetControl(IDC_NAME_DATA_LABEL));
-       pTitletNameInMediaInfo->SetText(pAudioInfo->GetTitle());
-
-       Label* pFormatData = static_cast<Label*>(GetControl(IDC_FORMAT_DATA_LABEL));
-       pFormatData->SetText(pAudioInfo->GetMediaFormat());
-
-       unsigned long contentSize = 0;
-       String stringContentSize = null;
-       Label* pSize = static_cast<Label*>(GetControl(IDC_SIZE_DATA_LABEL));
-       contentSize = pAudioInfo->GetContentSize();
-
-       if (contentSize >= SCALE_MBYTE)
-       {
-               int megaByte = (contentSize / SCALE_MBYTE);
-               int killoByte = ((((contentSize % SCALE_MBYTE) / SCALE_KBYTE ) * DECIMAL_ROUNDING) / SCALE_KBYTE);
-
-               stringContentSize.Format(256, L"%d.%dMB", megaByte, killoByte);
-       }
-       else if (contentSize >= SCALE_KBYTE)
-       {
-               int killoByte = (contentSize / SCALE_KBYTE);
-               int bytes = (((contentSize % SCALE_KBYTE) * DECIMAL_ROUNDING) / SCALE_KBYTE);
-               stringContentSize.Format(256, L"%d.%dKB", killoByte, bytes);
-       }
-       else
-       {
-               stringContentSize.Format(256, L"%dB", contentSize);
-       }
-       pSize->SetText(stringContentSize);
-
-       bool isDrmProtected = false;
-       isDrmProtected = pAudioInfo->IsDrmProtected();
-       Label* pForwarding = static_cast<Label*>(GetControl(IDC_FORWARDING_DATA_LABEL));
-       if (isDrmProtected == true)
+       if (pAudioInfo != null)
        {
-               pForwarding->SetText(ResourceManager::GetString(L"IDS_MUSIC_BODY_IMPOSSIBLE"));
+               GetHeader()->SetTitleText(pAudioInfo->GetTitle());
+
+               Label* pArtistName = static_cast<Label*>(GetControl(IDC_ARTIST_NAME_LABEL));
+               pArtistName->SetTextConfig(37,LABEL_TEXT_STYLE_NORMAL);
+               pArtistName->SetText(pAudioInfo->GetArtist());
+
+               Label* pMediaInfo = static_cast<Label*>(GetControl(IDC_MEDIA_INFO_LABEL));
+               pMediaInfo->SetTextConfig(52,LABEL_TEXT_STYLE_NORMAL);
+               pMediaInfo->SetText(ResourceManager::GetString(L"IDS_MUSIC_BODY_MEDIA_INFO"));
+
+               Label* pNameLabel = static_cast<Label*>(GetControl(IDC_NAME_LABEL));
+               pNameLabel->SetText(ResourceManager::GetString(L"IDS_COM_BODY_DETAILS_NAME"));
+
+               Label* pFormatLabel = static_cast<Label*>(GetControl(IDC_FORMAT_LABEL));
+               pFormatLabel->SetText(ResourceManager::GetString(L"IDS_COM_BODY_FORMAT"));
+
+               Label* pSizeLabel = static_cast<Label*>(GetControl(IDC_SIZE_LABEL));
+               pSizeLabel->SetText(ResourceManager::GetString(L"IDS_COM_BODY_SIZE"));
+
+               Label* pForwardingLabel = static_cast<Label*>(GetControl(IDC_FORWARDING_LABEL));
+               pForwardingLabel->SetText(ResourceManager::GetString(L"IDS_MUSIC_BODY_FORWARDING"));
+
+               Label* pDateLabel = static_cast<Label*>(GetControl(IDC_DATE_LABEL));
+               pDateLabel->SetText(ResourceManager::GetString(L"IDS_IV_BODY_DATE_CREATED"));
+
+               Label* plocationLable= static_cast<Label*>(GetControl(IDC_LOCATION_LABEL));
+               plocationLable->SetText(ResourceManager::GetString(L"IDS_MUSIC_BODY_MUSIC_LOCATION"));
+
+               Label* pTitletNameInMediaInfo = static_cast<Label*>(GetControl(IDC_NAME_DATA_LABEL));
+               pTitletNameInMediaInfo->SetText(pAudioInfo->GetTitle());
+
+               Label* pFormatData = static_cast<Label*>(GetControl(IDC_FORMAT_DATA_LABEL));
+               pFormatData->SetText(pAudioInfo->GetMediaFormat());
+
+               unsigned long contentSize = 0;
+               String stringContentSize = null;
+               Label* pSize = static_cast<Label*>(GetControl(IDC_SIZE_DATA_LABEL));
+               contentSize = pAudioInfo->GetContentSize();
+
+               if (contentSize >= SCALE_MBYTE)
+               {
+                       int megaByte = (contentSize / SCALE_MBYTE);
+                       int killoByte = ((((contentSize % SCALE_MBYTE) / SCALE_KBYTE ) * DECIMAL_ROUNDING) / SCALE_KBYTE);
+
+                       stringContentSize.Format(256, L"%d.%dMB", megaByte, killoByte);
+               }
+               else if (contentSize >= SCALE_KBYTE)
+               {
+                       int killoByte = (contentSize / SCALE_KBYTE);
+                       int bytes = (((contentSize % SCALE_KBYTE) * DECIMAL_ROUNDING) / SCALE_KBYTE);
+                       stringContentSize.Format(256, L"%d.%dKB", killoByte, bytes);
+               }
+               else
+               {
+                       stringContentSize.Format(256, L"%dB", contentSize);
+               }
+               pSize->SetText(stringContentSize);
+
+               bool isDrmProtected = false;
+               isDrmProtected = pAudioInfo->IsDrmProtected();
+               Label* pForwarding = static_cast<Label*>(GetControl(IDC_FORWARDING_DATA_LABEL));
+               if (isDrmProtected == true)
+               {
+                       pForwarding->SetText(ResourceManager::GetString(L"IDS_MUSIC_BODY_IMPOSSIBLE"));
+               }
+               else
+               {
+                       pForwarding->SetText(ResourceManager::GetString(L"IDS_MUSIC_BODY_POSSIBLE"));
+               }
+
+               String stringDate = null;
+               int day = 0;
+               int month = 0;
+               int year = 0;
+               int hour = 0;
+               int minute = 0;
+
+               day = pAudioInfo->GetDateTime().GetDay();
+               month = pAudioInfo->GetDateTime().GetMonth();
+               year = pAudioInfo->GetDateTime().GetYear();
+               hour = pAudioInfo->GetDateTime().GetHour();
+               minute = pAudioInfo->GetDateTime().GetMinute();
+               stringDate.Format(20, L"%04d.%02d.%02d %02d:%02d",
+                                                                                                               year,
+                                                                                                               month,
+                                                                                                               day,
+                                                                                                               hour,
+                                                                                                               minute);
+
+               Label* pDate = static_cast<Label*>(GetControl(IDC_DATE_DATA_LABEL));
+               pDate->SetText(stringDate);
+
+               String stringContentPath = null;
+               int indexOf = 0;
+               pAudioInfo->GetContentPath().LastIndexOf(L"/", (pAudioInfo->GetContentPath().GetLength() - 1), indexOf);
+               pAudioInfo->GetContentPath().SubString(0, indexOf, stringContentPath);
+
+               Label* pLocation = static_cast<Label*>(GetControl(IDC_LOCATION_DATA_LABEL));
+               pLocation->SetText(stringContentPath);
+               Invalidate(true);
        }
        else
        {
-               pForwarding->SetText(ResourceManager::GetString(L"IDS_MUSIC_BODY_POSSIBLE"));
+               Tizen::Content::AudioMetadata* pAudioMeta = Tizen::Content::ContentManagerUtil::GetAudioMetaN(*tempPath);
+               if (pAudioMeta == null)
+               {
+                       AppLogDebug("EXIT");
+                       return E_FAILURE;
+               }
+
+               if (pAudioMeta->GetTitle() != null)
+               {
+                       GetHeader()->SetTitleText(pAudioMeta->GetTitle());
+               }
+               else
+               {
+                       GetHeader()->SetTitleText(ResourceManager::GetString(L"IDS_MUSIC_BODY_UNKNOWN"));
+               }
+
+               Label* pArtistName = static_cast<Label*>(GetControl(IDC_ARTIST_NAME_LABEL));
+               pArtistName->SetTextConfig(37, LABEL_TEXT_STYLE_NORMAL);
+               if (pAudioMeta->GetArtist() != null)
+               {
+                       pArtistName->SetText(pAudioMeta->GetArtist());
+               }
+               else
+               {
+                       pArtistName->SetText(ResourceManager::GetString(L"IDS_MUSIC_BODY_UNKNOWN"));
+               }
+
+               Label* pMediaInfo = static_cast<Label*>(GetControl(IDC_MEDIA_INFO_LABEL));
+               pMediaInfo->SetTextConfig(52,LABEL_TEXT_STYLE_NORMAL);
+               pMediaInfo->SetText(ResourceManager::GetString(L"IDS_MUSIC_BODY_MEDIA_INFO"));
+
+               Label* pNameLabel = static_cast<Label*>(GetControl(IDC_NAME_LABEL));
+               pNameLabel->SetText(ResourceManager::GetString(L"IDS_COM_BODY_DETAILS_NAME"));
+
+               Label* pFormatLabel = static_cast<Label*>(GetControl(IDC_FORMAT_LABEL));
+               pFormatLabel->SetText(ResourceManager::GetString(L"IDS_COM_BODY_FORMAT"));
+
+               Label* pSizeLabel = static_cast<Label*>(GetControl(IDC_SIZE_LABEL));
+               pSizeLabel->SetText(ResourceManager::GetString(L"IDS_COM_BODY_SIZE"));
+
+               Label* pForwardingLabel = static_cast<Label*>(GetControl(IDC_FORWARDING_LABEL));
+               pForwardingLabel->SetText(ResourceManager::GetString(L"IDS_MUSIC_BODY_FORWARDING"));
+
+               Label* pDateLabel = static_cast<Label*>(GetControl(IDC_DATE_LABEL));
+               pDateLabel->SetText(ResourceManager::GetString(L"IDS_IV_BODY_DATE_CREATED"));
+
+               Label* plocationLable= static_cast<Label*>(GetControl(IDC_LOCATION_LABEL));
+               plocationLable->SetText(ResourceManager::GetString(L"IDS_MUSIC_BODY_MUSIC_LOCATION"));
+
+               Label* pTitletNameInMediaInfo = static_cast<Label*>(GetControl(IDC_NAME_DATA_LABEL));
+               if (pAudioMeta->GetTitle() != null)
+               {
+                       pTitletNameInMediaInfo->SetText(pAudioMeta->GetTitle());
+               }
+               else
+               {
+                       pTitletNameInMediaInfo->SetText(ResourceManager::GetString(L"IDS_MUSIC_BODY_UNKNOWN"));
+               }
+
+               Label* pFormatData = static_cast<Label*>(GetControl(IDC_FORMAT_DATA_LABEL));
+               pFormatData->SetText(ResourceManager::GetString(L"IDS_MUSIC_BODY_UNKNOWN"));
+
+               Label* pSize = static_cast<Label*>(GetControl(IDC_SIZE_DATA_LABEL));
+               pSize->SetText(ResourceManager::GetString(L"IDS_MUSIC_BODY_UNKNOWN"));
+
+               Label* pForwarding = static_cast<Label*>(GetControl(IDC_FORWARDING_DATA_LABEL));
+               pForwarding->SetText(ResourceManager::GetString(L"IDS_MUSIC_BODY_UNKNOWN"));
+
+               Label* pDate = static_cast<Label*>(GetControl(IDC_DATE_DATA_LABEL));
+               if (pAudioMeta->GetRecordingDate() != null)
+               {
+                       pDate->SetText(pAudioMeta->GetRecordingDate());
+               }
+               else
+               {
+                       pDate->SetText(ResourceManager::GetString(L"IDS_MUSIC_BODY_UNKNOWN"));
+               }
+
+               String stringContentPath = null;
+               int indexOf = 0;
+               tempPath->LastIndexOf(L"/", (tempPath->GetLength() - 1), indexOf);
+               tempPath->SubString(0, indexOf, stringContentPath);
+               Label* pLocation = static_cast<Label*>(GetControl(IDC_LOCATION_DATA_LABEL));
+               pLocation->SetText(stringContentPath);
+               Invalidate(true);
        }
-
-       String stringDate = null;
-       int day = 0;
-       int month = 0;
-       int year = 0;
-       int hour = 0;
-       int minute = 0;
-
-       day = pAudioInfo->GetDateTime().GetDay();
-       month = pAudioInfo->GetDateTime().GetMonth();
-       year = pAudioInfo->GetDateTime().GetYear();
-       hour = pAudioInfo->GetDateTime().GetHour();
-       minute = pAudioInfo->GetDateTime().GetMinute();
-       stringDate.Format(20, L"%04d.%02d.%02d %02d:%02d",
-                                                                                                       year,
-                                                                                                       month,
-                                                                                                       day,
-                                                                                                       hour,
-                                                                                                       minute);
-
-       Label* pDate = static_cast<Label*>(GetControl(IDC_DATE_DATA_LABEL));
-       pDate->SetText(stringDate);
-
-       String stringContentPath = null;
-       int indexOf = 0;
-       pAudioInfo->GetContentPath().LastIndexOf(L"/", (pAudioInfo->GetContentPath().GetLength() - 1), indexOf);
-       pAudioInfo->GetContentPath().SubString(0, indexOf, stringContentPath);
-
-       Label* pLocation = static_cast<Label*>(GetControl(IDC_LOCATION_DATA_LABEL));
-       pLocation->SetText(stringContentPath);
-       Invalidate(true);
-
        AppLogDebug("EXIT");
        return r;
 }
index 84e68ee..a6bca8c 100644 (file)
@@ -499,7 +499,7 @@ ContentLibaryPanel::ShowNotificationTicker(Tizen::Base::String text, Tizen::Grap
                }\r
        }\r
 \r
-       __pNotificationTicker->SetBoundTicker(point, TickerWidth);\r
+//     __pNotificationTicker->SetBoundTicker(point, TickerWidth);\r
        __pNotificationTicker->ShowTicker(text);\r
        AppLogDebug("EXIT");\r
        return E_SUCCESS;\r
index 8784d42..f66225b 100644 (file)
@@ -527,7 +527,7 @@ result
 FolderContentListForm::CreateTableViewItem(Tizen::Ui::Controls::TableViewItem& parent,         const ContentInformation& contentInfo)
 {
        AppLogDebug("ENTER");
-       Panel* pTableViewItem =  new (std::nothrow) Panel();
+       Panel* pTableViewItem = new (std::nothrow) Panel();
        if (GetScreenState() != SCREEN_STATE_NORMAL)
        {
                if (IsFailed(pTableViewItem->Construct(IDL_CONTENT_LIST_FOLDER_EDITOR_ITEM_PANEL)))
@@ -555,11 +555,11 @@ FolderContentListForm::CreateTableViewItem(Tizen::Ui::Controls::TableViewItem& p
        tempPath.LastIndexOf(L"/", tempPath.GetLength() - 1, indexOf);
        tempPath.SubString(indexOf + 1, fileName);
 
-       if (filePath.Contains(IDS_STORAGE_PHONE_PATH))
+       if (IDS_STORAGE_PHONE_PATH.Contains(filePath))
        {
                StorageIconBitmap = ResourceManager::GetBitmapN(IDB_STORAGE_PHONE);
        }
-       else if (filePath.Contains(IDS_STORAGE_SDCARD_PATH))
+       else if (IDS_STORAGE_SDCARD_PATH.Contains(filePath))
        {
                StorageIconBitmap = ResourceManager::GetBitmapN(IDB_STORAGE_SDCARD);
        }
index 6051360..68aa2d2 100644 (file)
@@ -331,11 +331,11 @@ FolderListEditorPanel::CreateTableViewItem(Tizen::Ui::Container& parent, const T
        contentPath.LastIndexOf(IDS_SEPARATOR_SLASH, contentPath.GetLength() - 1, folderNamePosition);
        contentPath.SubString(folderNamePosition + 1, strFolderName);
 
-       if (contentPath.Contains(IDS_STORAGE_PHONE_PATH))
+       if (IDS_STORAGE_PHONE_PATH.Contains(contentPath))
        {
                StorageIconBitmap = ResourceManager::GetBitmapN(IDB_STORAGE_PHONE);
        }
-       else if (contentPath.Contains(IDS_STORAGE_SDCARD_PATH))
+       else if (IDS_STORAGE_SDCARD_PATH.Contains(contentPath))
        {
                StorageIconBitmap = ResourceManager::GetBitmapN(IDB_STORAGE_SDCARD);
        }
index c425ec1..b48de2e 100644 (file)
@@ -342,11 +342,11 @@ FolderListPanel::CreateTableViewItem(Tizen::Ui::Container& parent, const Tizen::
        contentPath.LastIndexOf(IDS_SEPARATOR_SLASH, contentPath.GetLength() - 1, folderNamePosition);
        contentPath.SubString(folderNamePosition + 1, strFolderName);
 
-       if (contentPath.Contains(IDS_STORAGE_PHONE_PATH))
+       if (IDS_STORAGE_PHONE_PATH.Contains(contentPath))
        {
                StorageIconBitmap = ResourceManager::GetBitmapN(IDB_STORAGE_PHONE);
        }
-       else if (contentPath.Contains(IDS_STORAGE_SDCARD_PATH))
+       else if (IDS_STORAGE_SDCARD_PATH.Contains(contentPath))
        {
                StorageIconBitmap = ResourceManager::GetBitmapN(IDB_STORAGE_SDCARD);
        }
index b602492..174b0da 100644 (file)
@@ -552,6 +552,10 @@ MiniPlayer::MiniPlayerActivate(void)
        {\r
                __pMinPlayerPlayToggleButton->SetEnabled(false);\r
        }\r
+       else if (__pMinPlayerPlayToggleButton->IsEnabled() == false)\r
+       {\r
+               __pMinPlayerPlayToggleButton->SetEnabled(true);\r
+       }\r
 \r
        switch (__pPresentationModel->GetPlayerState())\r
        {\r
index cd98631..6c4ec31 100644 (file)
@@ -145,6 +145,7 @@ PlayerForm::PlayerForm(void)
        , __playerScreenState(PLAYER_SCREEN_STATE_NORMAL)
        , __isAnimationPerformed(false)
        , __isRunByAppControl(false)
+       , __prevRepeatStateRunByAppControl(0)
        , __pAnimationFinishedTimer(null)
        , __pContentPlayTimer(null)
        , __pPreviousSceneId(null)
@@ -406,7 +407,11 @@ PlayerForm::OnTerminating(void)
                __pAlbumArtElements = null;
        }
 
-       __isRunByAppControl =  false;
+       if (__isRunByAppControl == true)
+       {
+               __pPlayerPresentationModel->SetRepeatMode(__prevRepeatStateRunByAppControl);
+               __isRunByAppControl = false;
+       }
 
        RemoveContextMenu();
        RemoveSharePicker();
@@ -588,7 +593,7 @@ PlayerForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
                                SetContextMenuItem(CONTEXT_MENU_ITEM_STYLE_SET_AS | CONTEXT_MENU_ITEM_STYLE_DETAILS | CONTEXT_MENU_ITEM_STYLE_SHARE_VIA
                                                                                                                                                                | CONTEXT_MENU_ITEM_STYLE_ADD_TO_PLAYLIST | CONTEXT_MENU_ITEM_STYLE_SETTINGS);
                        }
-                       else if (GetPlayerScreenState() == PLAYER_SCREEN_STATE_APP_CONTROL)
+                       else if (GetPlayerScreenState() == PLAYER_SCREEN_STATE_APP_CONTROL || GetPlayerScreenState() == PLAYER_SCREEN_STATE_INVALID_CONTENT_ID)
                        {
                                CreateContextMenuN(source);
                                SetContextMenuItem(CONTEXT_MENU_ITEM_STYLE_SET_AS | CONTEXT_MENU_ITEM_STYLE_DETAILS | CONTEXT_MENU_ITEM_STYLE_SHARE_VIA);
@@ -1174,6 +1179,7 @@ PlayerForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
                SetShuffleButtonImage(__pPlayerPresentationModel->IsShuffleEnable());// 0 - 1 (OFF, ON)
                TogglePlayPauseImage(__pPlayerPresentationModel->GetPlayerState());
 
+               __isRunByAppControl = false;
                if (!static_cast<String*>(pArgs->GetAt(0))->Equals(MUSIC, false))
                {
                        SetPlayerScreenState(PLAYER_SCREEN_STATE_APP_CONTROL);
@@ -1192,12 +1198,6 @@ PlayerForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
                        playerState = PLAYER_STATE_ERROR;
                }
 
-               Bitmap* p  = __pPlayerPresentationModel->GetPlayContentThumbnail();
-               if (p == null)
-               {
-                       AppLogDebug("null");
-               }
-
                SetContentInfo( __pPlayerPresentationModel->GetCurrentContentIndex());
                OnPlayTimeChanged(__pPlayerPresentationModel->GetCurrentDuration(), __pPlayerPresentationModel->GetPlayPosition());
                OnPlayStateChanged(playerState);
@@ -1210,6 +1210,12 @@ PlayerForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
                }
        }
 
+       if (__pContentsListViewPanel->IsEnabled() == true && __isRunByAppControl == false)
+       {
+               TableView* pContentsTableView = static_cast<TableView*>(__pContentsListViewPanel->GetControl(IDC_CONTENTS_TABLEVIEW));
+               pContentsTableView->UpdateTableView();
+       }
+
        Invalidate(true);
        AppLogDebug("EXIT");
 }
@@ -2008,7 +2014,7 @@ PlayerForm::SetPlayerScreenState(unsigned int playerScreenState)
                        {
                                __pContentsViewToggleButton->SetEnabled(false);
                                __pShuffleButton->SetEnabled(false);
-                               __pMoreContextButton->SetEnabled(false);
+//                             __pMoreContextButton->SetEnabled(false);
                        }
 
                        if (__isRunByAppControl == false)
@@ -2021,6 +2027,9 @@ PlayerForm::SetPlayerScreenState(unsigned int playerScreenState)
                {
                        __pContentsViewToggleButton->SetEnabled(false);
                        __pShuffleButton->SetEnabled(false);
+                       __pRepeatButton->SetEnabled(false);
+                       __prevRepeatStateRunByAppControl = __pPlayerPresentationModel->GetRepeatState();
+                       SetRepeatButtonImage(IDA_TYPE_REPEAT_A);
 
                        __isRunByAppControl = true;
                }
@@ -2031,7 +2040,7 @@ PlayerForm::SetPlayerScreenState(unsigned int playerScreenState)
                        __pContentsViewToggleButton->SetEnabled(false);
                        __pContentsViewToggleButton->Invalidate(true);
                        __pRepeatButton->SetEnabled(false);
-                       __pMoreContextButton->SetEnabled(false);
+//                     __pMoreContextButton->SetEnabled(false);
                }
                break;
 
index dbb143d..5d6e600 100644 (file)
@@ -1121,6 +1121,7 @@ PlayerPresentationModel::MoveNextContent(void)
                CallOnPlayContentChanged(__currentContentIndex);
                if (GetPlayerState() == PLAYER_STATE_PAUSED)
                {
+                       __lastPosition = 0;
                        __pPlayer->SeekTo(MIN_SLIDER_COUNT);
                        InitializeProgress();
                }
index 62da726..0582388 100644 (file)
@@ -19,6 +19,7 @@
  * @brief              This is the implementation file for NotificationTicker class.\r
  */\r
 \r
+#include <FUiScenes.h>\r
 #include "MpCommonUtil.h"\r
 #include "MpNotificationTicker.h"\r
 \r
@@ -28,11 +29,16 @@ using namespace Tizen::Graphics;
 using namespace Tizen::Ui;\r
 using namespace Tizen::Ui::Animations;\r
 using namespace Tizen::Ui::Controls;\r
+using namespace Tizen::Ui::Scenes;\r
 \r
 NotificationTicker::NotificationTicker(void)\r
        : __pNotificationTickerPanel(null)\r
        , __pTickerTextLabel(null)\r
-       , __pTickerTimeOutTimer(null)\r
+       , __pBgBitmap(null)\r
+       , __hideStateRectangle()\r
+       , __showStateRectangle()\r
+       , __showTransactionId(-1)\r
+       , __HideTransactionId(-1)\r
        , __timeOut(0)\r
        , __isDestory(false)\r
 {\r
@@ -43,19 +49,15 @@ NotificationTicker::NotificationTicker(void)
 NotificationTicker::~NotificationTicker(void)\r
 {\r
        AppLogDebug("ENTER");\r
-       if (__pTickerTimeOutTimer != null)\r
-       {\r
-               __pTickerTimeOutTimer->Cancel();\r
-               delete __pTickerTimeOutTimer;\r
-               __pTickerTimeOutTimer = null;\r
-       }\r
-\r
-       if (__pNotificationTickerPanel != null)\r
+       if (__isDestory == false)\r
        {\r
+               AnimationTransaction::SetTransactionEventListener(null);\r
                RemoveControl(__pNotificationTickerPanel);\r
-               __pNotificationTickerPanel = null;\r
 \r
-               __pTickerTextLabel = null;\r
+               if (__pBgBitmap != null)\r
+               {\r
+                       delete __pBgBitmap;\r
+               }\r
        }\r
        AppLogDebug("EXIT");\r
 }\r
@@ -75,15 +77,11 @@ NotificationTicker::Construct(void)
        TryCatch(r == E_SUCCESS, , "Construct failed(%s)", GetErrorMessage(r));\r
 \r
        __pTickerTextLabel = static_cast<Label*>(__pNotificationTickerPanel->GetControl(L"IDC_LABEL_NOTIFICATION_TEXT"));\r
-       __pTickerTimeOutTimer = new (std::nothrow) Timer();\r
-       r = __pTickerTimeOutTimer->Construct(*this);\r
-       TryCatch(r == E_SUCCESS, , "Construct failed(%s)", GetErrorMessage(r));\r
 \r
        AddControl(__pNotificationTickerPanel);\r
-       CommonUtil::SetLayoutFitToContainer(*this, *__pNotificationTickerPanel);\r
-\r
        SetShowState(false);\r
 \r
+       AnimationTransaction::SetTransactionEventListener(this);\r
        AppLogDebug("EXIT");\r
        return r;\r
 \r
@@ -91,19 +89,22 @@ CATCH:
        delete __pNotificationTickerPanel;\r
        __pNotificationTickerPanel = null;\r
 \r
-       delete __pTickerTimeOutTimer;\r
-       __pTickerTimeOutTimer = null;\r
-\r
        AppLogDebug("EXIT(%s)", GetErrorMessage(r));\r
        return r;\r
 }\r
 \r
 void\r
-NotificationTicker::SetBoundTicker(Tizen::Graphics::Point point, int width)\r
+NotificationTicker::SetBoundTicker(Tizen::Graphics::Rectangle rect)\r
 {\r
        AppLogDebug("ENTER");\r
-       SetPosition(point);\r
-       SetSize(width, GetHeight());\r
+       Point point = rect.GetTopLeft();\r
+       Dimension dimension(rect.width, rect.height);\r
+\r
+       __showStateRectangle.SetBounds(point, dimension);\r
+       SetBounds(__showStateRectangle);\r
+\r
+       point.y = - dimension.height;\r
+       __hideStateRectangle.SetBounds(point, dimension);\r
        AppLogDebug("EXIT");\r
 }\r
 \r
@@ -111,14 +112,25 @@ void
 NotificationTicker::ShowTicker(const Tizen::Base::String& text, int timeOut)\r
 {\r
        AppLogDebug("ENTER");\r
+       ForceStopAnimation();\r
+\r
        __pTickerTextLabel->SetText(text);\r
        __timeOut = timeOut;\r
-       if (GetShowState() == false)\r
+\r
+       SetShowState(true);\r
+       Show();\r
+       AppLogDebug("EXIT");\r
+}\r
+\r
+void\r
+NotificationTicker::ForceStopAnimation(void)\r
+{\r
+       AppLogDebug("ENTER");\r
+       AnimationTransaction::Discard();\r
+       if (GetShowState() == true)\r
        {\r
-//             SetShowState(true);\r
-               PlayControlAnimator(true);\r
+               SetShowState(false);\r
        }\r
-       Show();\r
        AppLogDebug("EXIT");\r
 }\r
 \r
@@ -135,8 +147,19 @@ void
 NotificationTicker::PlayControlAnimator(bool isShow)\r
 {\r
        AppLogDebug("ENTER");\r
-       AnimationTransaction::Begin();\r
-       GetControlAnimator()->SetShowState(isShow);\r
+       if (isShow == true)\r
+       {\r
+               AnimationTransaction::Begin(__showTransactionId);\r
+               RectangleAnimation tickerAnimation(__hideStateRectangle, __showStateRectangle, 1000, ANIMATION_INTERPOLATOR_LINEAR);\r
+               __pNotificationTickerPanel->GetControlAnimator()->StartUserAnimation(ANIMATION_TARGET_POSITION, tickerAnimation);\r
+       }\r
+       else\r
+       {\r
+               AnimationTransaction::Begin(__HideTransactionId);\r
+               RectangleAnimation tickerAnimation(__showStateRectangle, __hideStateRectangle, 1000, ANIMATION_INTERPOLATOR_LINEAR);\r
+               tickerAnimation.SetDelay(__timeOut);\r
+               __pNotificationTickerPanel->GetControlAnimator()->StartUserAnimation(ANIMATION_TARGET_POSITION, tickerAnimation);\r
+       }\r
        AnimationTransaction::Commit();\r
        AppLogDebug("EXIT");\r
 }\r
@@ -145,11 +168,7 @@ result
 NotificationTicker::OnInitializing(void)\r
 {\r
        AppLogDebug("ENTER");\r
-       if (__pTickerTimeOutTimer != null)\r
-       {\r
-               __pTickerTimeOutTimer->Cancel();\r
-               __pTickerTimeOutTimer->Start(__timeOut);\r
-       }\r
+       PlayControlAnimator(true);\r
        AppLogDebug("EXIT");\r
        return E_SUCCESS;\r
 }\r
@@ -158,32 +177,97 @@ result
 NotificationTicker::OnTerminating(void)\r
 {\r
        AppLogDebug("ENTER");\r
-       __timeOut = 0;\r
-       if (__pTickerTimeOutTimer != null)\r
-       {\r
-               __pTickerTimeOutTimer->Cancel();\r
-       }\r
-\r
        if (__isDestory == true)\r
        {\r
+               AnimationTransaction::SetTransactionEventListener(null);\r
                RemoveControl(__pNotificationTickerPanel);\r
-\r
                __pNotificationTickerPanel = null;\r
-               __pTickerTextLabel = null;\r
 \r
-               delete __pTickerTimeOutTimer;\r
-               __pTickerTimeOutTimer = null;\r
+               if (__pBgBitmap != null)\r
+               {\r
+                       delete __pBgBitmap;\r
+                       __pBgBitmap = null;\r
+               }\r
        }\r
-\r
        AppLogDebug("EXIT");\r
        return E_SUCCESS;\r
 }\r
 \r
 void\r
-NotificationTicker::OnTimerExpired(Tizen::Base::Runtime::Timer& timer)\r
+NotificationTicker::OnAnimationTransactionStopped(int transactionId)\r
+{\r
+       AppLogDebug("ENTER");\r
+       AppLogDebug("EXIT");\r
+}\r
+\r
+void\r
+NotificationTicker::OnAnimationTransactionFinished(int transactionId)\r
 {\r
        AppLogDebug("ENTER");\r
-//     SetShowState(false);\r
-       PlayControlAnimator(false);\r
+       if (transactionId == __showTransactionId)\r
+       {\r
+               PlayControlAnimator(false);\r
+               __showTransactionId = -1;\r
+       }\r
+       else if (transactionId == __HideTransactionId)\r
+       {\r
+               SetShowState(false);\r
+               __HideTransactionId = -1;\r
+       }\r
        AppLogDebug("EXIT");\r
+}\r
+\r
+result\r
+NotificationTicker::OnDraw(void)\r
+{\r
+       AppLogDebug("ENTER");\r
+       Canvas* pCanvas =  GetCanvasN();\r
+       if (pCanvas != null)\r
+       {\r
+               DrawBackground(*pCanvas);\r
+               delete pCanvas;\r
+       }\r
+\r
+       AppLogDebug("EXIT");\r
+       return Window::OnDraw();\r
+}\r
+\r
+void\r
+NotificationTicker::DrawBackground(Tizen::Graphics::Canvas& canvas)\r
+{\r
+       AppLogDebug("ENTER");\r
+       if (__pBgBitmap != null)\r
+       {\r
+               delete __pBgBitmap;\r
+       }\r
+\r
+       __pBgBitmap = GetCapturedBitmapN();\r
+       if (__pBgBitmap != null)\r
+       {\r
+               canvas.Clear();\r
+               canvas.DrawBitmap(GetBounds(), *__pBgBitmap, GetBounds());\r
+               delete __pBgBitmap;\r
+               __pBgBitmap = null;\r
+       }\r
+       AppLogDebug("EXIT");\r
+}\r
+\r
+Tizen::Graphics::Bitmap*\r
+NotificationTicker::GetCapturedBitmapN(void)\r
+{\r
+       AppLogDebug("ENTER");\r
+       SceneManager* pSceneManager = SceneManager::GetInstance();\r
+       AppAssert(pSceneManager);\r
+\r
+       Scene* pScene = pSceneManager->GetCurrentScene();\r
+       AppAssert(pScene);\r
+\r
+       Form* pForm = pScene->GetForm();\r
+       if (pForm == null)\r
+       {\r
+               AppLogDebug("EXIT");\r
+               return null;\r
+       }\r
+       AppLogDebug("EXIT");\r
+       return pForm->GetCapturedBitmapN();\r
 }
\ No newline at end of file