_CHECK(m->pLayoutMgr->AddLayout(m->pFbPhotoLayout))
_CHECK(m->pLayoutMgr->AddLayout(m->pFbVideoLayout))
_CHECK(m->pLayoutMgr->AddLayout(m->pFbMusicLayout))
- _CHECK(CUsbConnectionListener::Create())
- _CHECK(CMediaContentDbUpdateListener::Create())
-
+ _COMMAND{
+ if(!CUsbConnectionListener::Create())
+ _ERR("Fail to create CUsbConnectionListener()");
+ if(!CMediaContentDbUpdateListener::Create())
+ _ERR("Fail to create CMediaContentDbUpdateListener()");
+ }
_WHEN_SUCCESS{}
- _CHECK_FAIL{ CMediaContentDbUpdateListener::Destroy(); }
- _CHECK_FAIL{ CUsbConnectionListener::Destroy(); }
_CHECK_FAIL{ m->pLayoutMgr->RemoveLayout(m->pFbMusicLayout); }
_CHECK_FAIL{ m->pLayoutMgr->RemoveLayout(m->pFbVideoLayout); }
_CHECK_FAIL{ m->pLayoutMgr->RemoveLayout(m->pFbPhotoLayout); }
ASSERT(m);
CBaseView::Destroy();
- CMediaContentDbUpdateListener::Destroy();
- CUsbConnectionListener::Destroy();
+
+ if(CMediaContentDbUpdateListener::FlagCreate())
+ CMediaContentDbUpdateListener::Destroy();
+ if(CUsbConnectionListener::FlagCreate())
+ CUsbConnectionListener::Destroy();
m->pLayoutMgr->RemoveLayout(m->pFbMusicLayout);
m->pFbMusicLayout->Destroy();
int size = ARRAY_SIZE(sourcetext);
CUsbConnectionListener usb;
- usb.Create();
- if (!usb.FlagConnected())
+ if(usb.Create()) {
+ if (!usb.FlagConnected())
+ size--;
+ usb.Destroy();
+ }
+ else
size--;
- usb.Destroy();
t_SetList(sourcetext, size, (int)CInfo::SourceType(),
CCtxPopup::TOPBTN_SOURCE, srcbtnids,