NABI issue 48402 48210 46995 tizen 2.2_release submit/tizen/20131031.213147 submit/tizen_2.2/20130814.085408 submit/tizen_2.2/20130814.101400
authorravi.n2@samsung.com <ravi.n2@samsung.com>
Wed, 7 Aug 2013 12:06:22 +0000 (17:36 +0530)
committerravi.n2@samsung.com <ravi.n2@samsung.com>
Wed, 7 Aug 2013 12:06:22 +0000 (17:36 +0530)
Change-Id: I743e1995e072190f82f00af6133da8f0ef5e2744

inc/CmCameraPresentationModel.h
src/CmCamcorderForm.cpp
src/CmCameraInfoPanel.cpp
src/CmCameraPresentationModel.cpp

index 5a2dd18..36df6ca 100644 (file)
@@ -230,6 +230,7 @@ public:
        void SetRecorderEndReached(bool currentStatus);
        void SetTimerEnabled(bool timerEnabled);
        bool GetTimerEnabled(void);
+       void DeleteStoredThumbnail(void);
 
 private:
        CameraPresentationModel(void);
index 304ebc5..81a6e0b 100644 (file)
@@ -594,6 +594,7 @@ CamcorderForm::OnTerminating(void)
        if (__pRecordPauseBitmap)
        {
                delete __pRecordPauseBitmap;
+               __pRecordPauseBitmap = null;
        }
 
        if (__pSettingMenuString)
@@ -1158,6 +1159,10 @@ CamcorderForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
                }
 
                MakeSettingPopupTab(false);
+               HidePopup();
+               AppLogDebug("Camera state is %d",_pCameraPresentationModel->GetCameraState());
+               AppLogDebug("recorder state is %d",_pCameraPresentationModel->GetRecorderState());
+
                if (_isRecording == false)
                {
                        if (_pCameraPresentationModel->GetCameraState() != CAMERA_STATE_PREVIEW
@@ -6060,6 +6065,7 @@ CamcorderForm::SubListPopupStorageTypeMode(int index)
                {
                        AppLogDebug("Setting - Storage type = Phone");
                        storage = STORAGE_TYPE_PHONE;
+                       _pCameraPresentationModel->DeleteStoredThumbnail();
                        SetStorageType(storage);
                }
                break;
@@ -6069,6 +6075,8 @@ CamcorderForm::SubListPopupStorageTypeMode(int index)
                        AppLogDebug("Setting - Storage type = card");
                        storage = STORAGE_TYPE_MEMORYCARD;
 
+                       _pCameraPresentationModel->DeleteStoredThumbnail();
+
                        if (_pCameraPresentationModel->IsStorageCardMounted() == true)
                        {
                                SetStorageType(storage);
@@ -6379,7 +6387,7 @@ CamcorderForm::StartRecordTimer(void)
                __recordingMaxTime = 0;
 
                __pRecordTimer = new (std::nothrow) Timer();
-               __pRecordTimer->Construct(*this);
+               r = __pRecordTimer->Construct(*this);
 
                r = __pRecordTimer->StartAsRepeatable(CAMCORDER_TIMER_ONE_SEC);
                TryCatch(r == E_SUCCESS, , "Timer::StartAsRepeatable fail[%s]", GetErrorMessage(r));
@@ -8918,10 +8926,21 @@ CamcorderForm::SetRecordPauseBitmap(bool start)
        AppLogDebug("ENTER");
        if (start)
        {
+               if (__pRecordPauseBitmap != null)
+               {
+                       delete __pRecordPauseBitmap;
+                       __pRecordPauseBitmap = null;
+               }
+
                __pRecordPauseBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMCODER_RECORDING_SHUTTER_NORMAL);
        }
        else
        {
+               if (__pRecordPauseBitmap != null)
+               {
+                       delete __pRecordPauseBitmap;
+                       __pRecordPauseBitmap = null;
+               }
                __pRecordPauseBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMCODER_STANDBY_SHUTTER_NORMAL);
        }
        TryCatch(__pRecordPauseBitmap != null, , "__pRecordPauseBitmap is null");
index 84f9b29..8d79119 100644 (file)
@@ -1067,7 +1067,7 @@ CameraInfoPanel::DrawSettingMenuBackground(Canvas* pCanvas)
                else
                {
                        AppLogDebug("camcorder souce form");
-                       rectPanelBG = Rectangle(X_SETTING_MENU_BG_IMG_PORTRAIT, Y_SETTING_MENU_BG_IMG_PORTRAIT, W_SETTING_MENU_BG_IMG_PORTRAIT, H_SETTING_MENU_BG_IMG_PORTRAIT - H_SETTING_MENU_BG_IMG_MARGIN_PORTRAIT - 15);
+                       rectPanelBG = Rectangle(X_SETTING_MENU_BG_IMG_PORTRAIT, Y_SETTING_MENU_BG_IMG_PORTRAIT, W_SETTING_MENU_BG_IMG_PORTRAIT, H_SETTING_MENU_BG_IMG_PORTRAIT - H_SETTING_MENU_BG_IMG_MARGIN_PORTRAIT - 14);
                }
        }
        else
@@ -1216,7 +1216,7 @@ CameraInfoPanel::DrawGeneralSettingMenuBackground(Canvas* pCanvas)
                else
                {
                        AppLogDebug("Camcorder source form");
-                       rectPanelBG = Rectangle(X_SETTING_MENU_BG_IMG_PORTRAIT, Y_SETTING_MENU_BG_IMG_PORTRAIT, W_SETTING_MENU_BG_IMG_PORTRAIT, H_SETTING_MENU_BG_IMG_PORTRAIT - 15);
+                       rectPanelBG = Rectangle(X_SETTING_MENU_BG_IMG_PORTRAIT, Y_SETTING_MENU_BG_IMG_PORTRAIT, W_SETTING_MENU_BG_IMG_PORTRAIT, H_SETTING_MENU_BG_IMG_PORTRAIT - 13);
                }
        }
        else
index ea2159f..54b494c 100644 (file)
@@ -328,8 +328,11 @@ CameraPresentationModel::CreateThumbnail(int currentCameraMode)
 
                if (__pBitmap != null)
                {
-                       delete previousBitmap;
-                       previousBitmap = null;
+                       if (previousBitmap != null)
+                       {
+                               delete previousBitmap;
+                               previousBitmap = null;
+                       }
                }
                else
                {
@@ -3822,6 +3825,10 @@ CameraPresentationModel::OnDeviceStateChanged(Tizen::System::DeviceType deviceTy
 
                                                StorageCardStateChaged(false);
 
+                                       
+
+                                               DeleteStoredThumbnail();
+
                                                SetAppControlRequestType(APP_CONTROL_REQUEST_TYPE_FAILED);
 
                                                SetStorageCardChageState(STORAGE_CARD_CHAGE_STATE_MOUNT_TO_UNMOUNT);
@@ -4082,3 +4089,13 @@ CameraPresentationModel::GetTimerEnabled(void)
 {
        return __timerEnabled;
 }
+
+void
+CameraPresentationModel::DeleteStoredThumbnail(void)
+{
+       if (__pBitmap != null)
+       {
+               delete __pBitmap;
+               __pBitmap = null;
+       }
+}