class MiniPlayer
: public Tizen::Ui::Controls::Panel
+ , public Tizen::Base::Runtime::ITimerEventListener
, public Tizen::Ui::IActionEventListener
, public Tizen::Ui::IKeyEventListener
, public Tizen::Ui::ITouchEventListener
void MiniPlayerDeactivate(void);
protected:
+ virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
virtual void OnPlayStateChanged(Tizen::Media::PlayerState playerState);
virtual void OnPlayContentChanged(int currentContentIndex);
virtual void OnPlayTimeChanged(const Tizen::Base::String& currentDuration, int currentPosition);
void DrawBackground(Tizen::Graphics::Canvas& canvas);
private:
+ Tizen::Base::Runtime::Timer* __pMsgTimer;
Tizen::Ui::Controls::Button* __pMinPlayerPlayToggleButton;
Tizen::Ui::Controls::Button* __pMinPlayerNextButton;
Tizen::Ui::Controls::Button* __pMinPlayerPrevButton;
<Label id="IDC_LABEL_CONTENT_TITLE_NAME" parent="IDL_CONTENT_NOTHUMBNAIL_EDITOR_ITEM_PANEL_FONT_SIZE_GIANT">\r
<property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="#000000" textSize="106.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>\r
<layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="true" height="124.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="105.0" marginRight="0.0" marginTop="22.0" mode="Portrait" rightRelation="" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="409.0" x="105.0" y="40.5"/>\r
- <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="true" height="124.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="105.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDC_LABEL_CONTENT_ADDITIONAL_INFO" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="969.0" x="105.0" y="40.5"/>\r
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="true" height="124.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_CONTENT_NOTHUMBNAIL_EDITOR_ITEM_PANEL_FONT_SIZE_GIANT" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="105.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDC_LABEL_CONTENT_ADDITIONAL_INFO" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="969.0" x="105.0" y="40.5"/>\r
</Label>\r
</ScenePanel>\r
AppLogDebug("ENTER");\r
__checkedItemCount = INIT_VALUE;\r
\r
- RemovePlayListPicker();\r
- RemoveSharePicker();\r
+// RemovePlayListPicker();\r
+// RemoveSharePicker();\r
\r
UpdateContentList();\r
UpdateContentEditScreenState();\r
using namespace Tizen::App;
using namespace Tizen::Base;
+using namespace Tizen::Base::Runtime;
using namespace Tizen::Graphics;
using namespace Tizen::Media;
using namespace Tizen::Ui;
static const wchar_t* IDB_MINIPLAYER_BACKGROUND = L"T02_mini_player_bg.png";
MiniPlayer::MiniPlayer(void)
- : __pMinPlayerPlayToggleButton(null)
+ : __pMsgTimer(null)
+ , __pMinPlayerPlayToggleButton(null)
, __pMinPlayerNextButton(null)
, __pMinPlayerPrevButton(null)
, __pThumbnailLabel(null)
MiniPlayer::~MiniPlayer(void)
{
AppLogDebug("ENTER");
+ if (__pMsgTimer)
+ {
+ __pMsgTimer->Cancel();
+ delete __pMsgTimer;
+ }
AppLogDebug("EXIT");
}
__pProgressBar->SetRange(INIT_VALUE, PROGRESS_MAX_VALUE);
Invalidate(true);
-
+ __pMsgTimer = new (std::nothrow) Timer();
+ __pMsgTimer->Construct(*this);
AppLogDebug("EXIT");
return E_SUCCESS;
}
}
void
+MiniPlayer::OnTimerExpired(Timer& timer)
+{
+ if (timer.Equals(*__pMsgTimer))
+ {
+ MessageBox messageBox;
+ int modalResult = 0;
+ messageBox.Construct(L"Error", ResourceManager::GetString(L"IDS_MUSIC_POP_UNABLE_TO_PLAY_ERROR_OCCURRED"), MSGBOX_STYLE_NONE, 3000);
+ messageBox.ShowAndWait(modalResult);
+ }
+}
+
+void
MiniPlayer::OnPlayStateChanged(Tizen::Media::PlayerState playerState)
{
AppLogDebug("ENTER");
if (playerState == PLAYER_STATE_ERROR)
{
- MessageBox messageBox;
- int modalResult = 0;
-
+ __pMsgTimer->Cancel();
SetContentInfo(__pPresentationModel->GetCurrentContentIndex());
__pMinPlayerPlayToggleButton->SetEnabled(false);
__pProgressBar->SetEnabled(false);
- messageBox.Construct(L"Error", ResourceManager::GetString(L"IDS_MUSIC_POP_UNABLE_TO_PLAY_ERROR_OCCURRED"), MSGBOX_STYLE_NONE, 3000);
- messageBox.ShowAndWait(modalResult);
+ __pMsgTimer->Start(MESSAGE_BOX_DELAY);
}
-
}
AppLogDebug("EXIT");
case IDA_BUTTON_CONTENTS_LIST_VIEW:
{
+ TableView* pContentsTableView = static_cast<TableView*>(__pContentsListViewPanel->GetControl(IDC_CONTENTS_TABLEVIEW));
+
+ if (pContentsTableView != null)
+ {
+ pContentsTableView->UpdateTableView();
+ }
+
__pContentsAlbumViewPanel->SetShowState(false);
__pContentsViewToggleButton->SetActionId(IDA_BUTTON_CONTENTS_ALBUM_VIEW);
__pContentsListViewPanel->SetShowState(true);
}
break;
- case KEY_ENTER:
- if (source.Equals(*__pForwardButton) || source.Equals(*__pRewindButton))
- {
- __isLongPressed = false;
- }
- break;
+// case KEY_ENTER:
+// if (__isLongPressed && (source.Equals(*__pForwardButton) || source.Equals(*__pRewindButton)))
+// {
+// __isLongPressed = false;
+// }
+// break;
default:
break;
if (__isLongPressed == true)
{
__pPlayerPresentationModel->StopForwardRewind();
+ __isLongPressed = false;
}
else
{
if (__isLongPressed == true)
{
__pPlayerPresentationModel->StopForwardRewind();
+ __isLongPressed = false;
}
else
{
}
else
{
- TableView* pContentsTableView = null;
PlayerState playerState = __pPlayerPresentationModel->GetPlayerState();
if (playerState != PLAYER_STATE_PAUSED
}
SetFileNotExistState(__pPlayerPresentationModel->IsFileExist(__pPlayerPresentationModel->GetCurrentContentIndex()));
- pContentsTableView = static_cast<TableView*>(__pContentsListViewPanel->GetControl(IDC_CONTENTS_TABLEVIEW));
- if (pContentsTableView != null)
- {
- pContentsTableView->UpdateTableView();
- }
}
Invalidate(true);
}
__pMsgShowTimer->Cancel();
- __pMsgShowTimer->Start(10);
+ __pMsgShowTimer->Start(MESSAGE_BOX_DELAY);
if (pApp != null && pApp->GetRequestId() != null)
{
String* pCurrentPlayConent = __pPlayerPresentationModel->GetPlayContentPath();
String* pContentPath = __pPlayerPresentationModel->GetContentPath(__pPlayerPresentationModel->GetCurrentContentIndex());
- if (!pContentPath->Equals(*pCurrentPlayConent,true) || !__pPlayerPresentationModel->IsDuringCall())
+ if (!pContentPath->Equals(*pCurrentPlayConent,true) || __pPlayerPresentationModel->IsDuringCall())
{
- SetContentInfo(currentContentIndex);
RemoveOptionMenu();
RemoveSetAsPicker();
RemoveSharePicker();
RemovePlayListPicker();
- SetFileNotExistState(__pPlayerPresentationModel->IsFileExist(currentContentIndex));
}
+ SetContentInfo(currentContentIndex);
+ SetFileNotExistState(__pPlayerPresentationModel->IsFileExist(currentContentIndex));
+
if ( __pPlayerPresentationModel->IsDuringCall())
{
SetPlayerScreenState(PLAYER_SCREEN_STATE_DURING_CALL);
ContentInformation* pContentInfo = new (std::nothrow) ContentInformation();
TryReturn(pContentInfo != null, null, "pContentInfo is null.");
- if ( __pCurrentAudioContentInfo != null && contentIndex == __currentContentIndex)
- {
- pAudioContentInfo = __pCurrentAudioContentInfo;
- }
- else
+// if ( __pCurrentAudioContentInfo != null && contentIndex == __currentContentIndex)
+// {
+// pAudioContentInfo = __pCurrentAudioContentInfo;
+// }
+// else
{
Tizen::Base::String* contentPath = static_cast<String*>(__pPlayContentList->GetAt(contentIndex));
if (contentPath == null || File::IsFileExist(*contentPath) == false)
}
if (__pPlayStateTimer != null)
{
+ __pPlayStateTimer->Cancel();
r = __pPlayStateTimer->Start(PROGRESS_TIMER_DURATION);
TryCatch(r == E_SUCCESS, , "__pPlayStateTimer start failed\n(%s)", GetErrorMessage(r));
}
r = __pFastRewindTimer->Cancel();
TryLog(r == E_SUCCESS, "[%s] __pFastRewindTimer cancel failed", GetErrorMessage(r));
}
-
+ __pPlayStateTimer->Cancel();
r = __pPlayStateTimer->Start(PROGRESS_BAR_DURATION_TIMER);
__xTimesValue = INIT_X_VALUE;
__seekCompleted = true;
{
AppLogDebug("ENTER");
PlayList* pPlaylist = PlayListManager::GetInstance()->GetPlayListN(playlist);
+ TryReturn(pPlaylist != null, ContentId(),"No such playlist");
IList* pSearchList = pPlaylist->GetContentInfoListN();
if (pSearchList == null)
{
- return null;
+ delete pPlaylist;
+ return ContentId();
}
ContentInfo* pContentInfo = static_cast<ContentInfo*>(pSearchList->GetAt(0));
AudioContentInfo* pAudioContentInfo = static_cast<AudioContentInfo*>(pContentInfo);
+
if (pAudioContentInfo == null)
{
pSearchList->RemoveAll(true);
SetLastResult(E_FAILURE);
return ContentId();
}
+
ContentId contentId = pAudioContentInfo->GetContentId();
pSearchList->RemoveAll(true);
delete pSearchList;
//timer values
const int COUNT_MESSAGE_BOX_TIMEOUT = 3000;
-const int MESSAGE_BOX_DELAY = 50;
+const int MESSAGE_BOX_DELAY = 20;