Camera Secure Feature Added 85/89285/7 submit/tizen_mobile/20160925.140756
authorChandan <ch.kumar@samsung.com>
Fri, 23 Sep 2016 04:28:01 +0000 (09:58 +0530)
committerChandan Kumar <ch.kumar@samsung.com>
Sun, 25 Sep 2016 13:51:31 +0000 (06:51 -0700)
Change-Id: I9e72f7cb31a74da6e434964ba6e375a5666f38cd
Signed-off-by: Chandan <ch.kumar@samsung.com>
inc/ivug-ext-ug.h
res/edje/icons/image_viewer_camera_secured.png [new file with mode: 0644]
src/main/control/ivug-crop-circular.cpp
src/main/control/ivug-ext-ug.c
src/main/control/ivug-parameter.c
src/main/view/ivug-main-view-menu.cpp
src/main/view/ivug-main-view.cpp
src/main/view/ivug-photocam.cpp

index eb5b64c..7ec8be6 100755 (executable)
@@ -25,6 +25,7 @@
 #ifdef __cplusplus
 extern "C" {
 #endif
+bool ivug_ext_launch_gallery();
 
 bool ivug_ext_launch_videoplayer(const char *uri, bool isLockScreen);
 
diff --git a/res/edje/icons/image_viewer_camera_secured.png b/res/edje/icons/image_viewer_camera_secured.png
new file mode 100644 (file)
index 0000000..12032a1
Binary files /dev/null and b/res/edje/icons/image_viewer_camera_secured.png differ
index fb5e1d7..e6a3a00 100755 (executable)
@@ -906,7 +906,7 @@ void ivug_crop_ug_create_circular_ui(struct _Ivug_MainView *pMainView, char *ima
 
        char circle_path[1024];
        snprintf(circle_path, 1024, "%sedje/icons/icon_circle.png", app_get_resource_path());
-       MSG_IMAGEVIEW_ERROR("Circle path is %s", circle_path);
+       MSG_IMAGEVIEW_HIGH("Circle path is %s", circle_path);
 
        evas_object_image_file_set(global_crop->circle, circle_path,NULL);
        int err = evas_object_image_load_error_get(global_crop->circle);
index ec22196..dd46423 100755 (executable)
@@ -44,9 +44,45 @@ void ivug_ext_app_control_reply_cb(app_control_h request, app_control_h reply, a
        }
 }
 
+bool ivug_ext_launch_gallery()
+{
+       int ret = -1;
+       int destroy_ret = -1;
+
+       app_control_h handle;
+
+       ret = app_control_create(&handle);
+       if (ret != APP_CONTROL_ERROR_NONE) {
+               MSG_IMAGEVIEW_ERROR("app_control_create failed, 0x%08x", ret);
+               return false;
+       }
+
+       ret = app_control_set_app_id(handle, "org.tizen.gallery");
+       if (ret != APP_CONTROL_ERROR_NONE) {
+               MSG_IMAGEVIEW_ERROR("app_control_set_operation failed, 0x%08x", ret);
+               goto VIDEO_PLAYER_END;
+       }
+
+       ret = app_control_send_launch_request(handle, NULL, NULL);
+       if (ret != APP_CONTROL_ERROR_NONE) {
+               MSG_IMAGEVIEW_ERROR("app_control_send_launch_request failed, 0x%08x", ret);
+               notification_status_message_post(GET_STR(IDS_UNABLE_TO_OPEN_FILE));
+               goto VIDEO_PLAYER_END;
+       }
+
+VIDEO_PLAYER_END:
+       destroy_ret = app_control_destroy(handle);
+       if (destroy_ret != APP_CONTROL_ERROR_NONE) {
+               MSG_IMAGEVIEW_ERROR("app_control_destroy failed, 0x%08x", destroy_ret);
+               return false;
+       }
+
+       return (ret == APP_CONTROL_ERROR_NONE ? true : false);
+}
+
 bool ivug_ext_launch_videoplayer(const char *uri, bool isLockScreen)
 {
-       MSG_IMAGEVIEW_HIGH("%s. URI=%s", __func__, uri);
+       MSG_IMAGEVIEW_HIGH("URI = %s", uri);
 
        int ret = -1;
        int destroy_ret = -1;
index 9f3fa12..e5e18b4 100755 (executable)
@@ -527,12 +527,12 @@ ivug_param_create_from_bundle(app_control_h service, void *ugdata)
 //parse path
        char* szFilePath = NULL;
        bool isArray = false;
-       app_control_is_extra_data_array(service, "http://tizen.org/appcontrol/data/path", &isArray);
+       app_control_is_extra_data_array(service, APP_CONTROL_DATA_PATH, &isArray);
        if (isArray == true) {
                char **path_array = NULL;
                char *file_path = NULL;
                int array_length = 0;
-               app_control_get_extra_data_array(service, "http://tizen.org/appcontrol/data/path", &path_array, &array_length);
+               app_control_get_extra_data_array(service, APP_CONTROL_DATA_PATH, &path_array, &array_length);
                int i = 0;
 
                for (i=0; i<array_length; i++)
@@ -1084,7 +1084,6 @@ Filter_struct *ivug_param_create_filter(const ivug_parameter *param)
 
                filter_str->filepath = strdup(param->filepath);
                filter_str->file_list = param->multiple_list;
-
                return filter_str;
        }
 
index 2ca7b35..780e79f 100755 (executable)
@@ -797,8 +797,7 @@ void on_btn_more_clicked(void *data, Evas_Object *obj, void *event_info)
        Ivug_MainView *pMainView = (Ivug_MainView *)data;
        IV_ASSERT(pMainView != NULL);
 
-       Media_Item *mitem = ivug_medialist_get_current_item(pMainView->mList);
-       Media_Data *mdata = ivug_medialist_get_data(mitem);
+       if (pMainView->mode == IVUG_MODE_CAMERA_SIMPLE && pMainView->cur_mitem == NULL) return;
 
        MSG_MAIN_HIGH("More clicked. Mode=%d", pMainView->mode);
 
@@ -819,8 +818,6 @@ void on_btn_more_clicked(void *data, Evas_Object *obj, void *event_info)
                return;
        }
 
-       IV_ASSERT(mdata != NULL);
-
        if (pMainView->bShowMenu == true) {
                ivug_main_view_del_hide_timer(pMainView);
        }
index e36bece..724379f 100755 (executable)
@@ -602,7 +602,15 @@ void _update_main_view(Ivug_MainView *pMainView)
        IV_ASSERT(pMainView != NULL);
 
        Media_Item *mitem = ivug_medialist_get_current_item(pMainView->mList);
-       Media_Data *mdata = ivug_medialist_get_data(mitem);
+
+       Media_Data *mdata = NULL;
+
+       if (mitem) {
+               mdata = ivug_medialist_get_data(mitem);
+       } else {
+               MSG_MAIN_ERROR("mdata is NULL");
+               return;
+       }
 
        if (mdata == NULL) {
                MSG_MAIN_ERROR("mdata is NULL");
@@ -643,8 +651,19 @@ _on_slider_playvideo_icon_clicked(void *data, Evas_Object *obj, const char *sour
        }
 }
 
-void
-on_slider_clicked(void *data, Evas_Object *obj, void *event_info)
+static void
+_request_destroy_to_caller()
+{
+       app_control_h service;
+       app_control_create(&service);
+
+       app_control_add_extra_data(service, "request_destroy", "true");
+       app_control_reply_to_launch_request(service, gGetServiceHandle(), APP_CONTROL_RESULT_SUCCEEDED);
+
+       app_control_destroy(service);
+}
+
+static void on_slider_layout_clicked(void *data, Evas_Object *obj, const char *emission, const char *source)
 {
        IV_ASSERT(data != NULL);
 
@@ -659,17 +678,13 @@ on_slider_clicked(void *data, Evas_Object *obj, void *event_info)
                }
        }
 #endif
-       if (pMainView->mode != IVUG_MODE_SELECT && pMainView->mode != IVUG_MODE_EMAIL) {
-               if (pMainView->bShowMenu) {
-                       ivug_main_view_hide_menu_bar(pMainView);
-               } else {
-                       ivug_main_view_show_menu_bar(pMainView);
-               }
-       }
 
+       if (pMainView->mode == IVUG_MODE_CAMERA_SIMPLE && pMainView->cur_mitem == NULL && pMainView->slide_move_timer == NULL) {
+               ivug_ext_launch_gallery();
+               _request_destroy_to_caller();
+       }
 }
 
-
 static Eina_Bool _ivug_long_press_timer_expired(void *data)
 {
        ivug_retv_if(!data, ECORE_CALLBACK_CANCEL);
@@ -1028,13 +1043,13 @@ ivug_main_view_create(Evas_Object* parent, ivug_parameter *param)
                elm_object_signal_callback_add(sn_layout, "play", "elm", _on_slider_playvideo_icon_clicked, pMainView);
 //             evas_object_smart_callback_add(sn_layout, "slider,playburst", _on_slider_playburst_icon_clicked, pMainView);
 
-//             evas_object_smart_callback_add(sn_layout, "slider,clicked", on_slider_clicked, pMainView);
                evas_object_smart_callback_add(sn_layout, "slider,longpress,start", _on_slider_long_press_start, pMainView);
                evas_object_smart_callback_add(sn_layout, "slider,longpress,end", _on_slider_long_press_end, pMainView);
 
                evas_object_event_callback_add(sn_layout, EVAS_CALLBACK_MOUSE_DOWN,  _on_slider_mouse_down, pMainView);
                evas_object_event_callback_add(sn_layout, EVAS_CALLBACK_MOUSE_MOVE,  _on_slider_mouse_moved, pMainView);
                evas_object_event_callback_add(sn_layout, EVAS_CALLBACK_MOUSE_UP,  _on_slider_mouse_up, pMainView);
+               elm_object_signal_callback_add(sn_layout, "mouse,clicked,1", "*", on_slider_layout_clicked, (void *)pMainView);
        }
 
        if ((pMainView->view_by != IVUG_VIEW_BY_FILE)
@@ -1180,6 +1195,7 @@ ivug_main_view_set_list(Ivug_MainView *pMainView, ivug_parameter *ivug_param)
                        pMainView->album_name = strdup(IDS_NO_NAME);
                }
        }
+
        pMainView->mList = mlist;
 
        if (ivug_medialist_get_count(mlist) == 1) {
@@ -1486,6 +1502,8 @@ ivug_main_view_start(Ivug_MainView *pMainView, app_control_h service)
                        MSG_MAIN_HIGH("currentindex = %d count =%d", currentindex, count);
                }
 
+               if (pMainView->mode == IVUG_MODE_CAMERA_SIMPLE) count++;
+
                ivug_create_new_photocam_image(pMainView, &pMainView->photocam, "imageview_area");
                ivug_slider_new_set_photocam(pMainView->pSliderNew, pMainView->photocam);
 
@@ -1548,13 +1566,30 @@ ivug_main_view_start(Ivug_MainView *pMainView, app_control_h service)
 
                if (count != -1 && currentindex != -1 && currentindex + 1 < count) {
                        Media_Item *next_mitem = ivug_medialist_get_next(pMainView->mList, pMainView->cur_mitem);
-                       Media_Data *pData = ivug_medialist_get_data(next_mitem);
+                       Media_Data *pData = NULL;
+
+                       if (next_mitem) {
+                               pData = ivug_medialist_get_data(next_mitem);
+                       }
 
                        ivug_create_new_photocam_image(pMainView, &pMainView->photocam2, "imageview_area_temp2");
-                       if (pData->slide_type == SLIDE_TYPE_VIDEO) {
-                               elm_photocam_file_set(pMainView->photocam2, pData->thumbnail_path);
+
+                       if (pMainView->mode != IVUG_MODE_CAMERA_SIMPLE) {
+                               if (pData->slide_type == SLIDE_TYPE_VIDEO) {
+                                       elm_photocam_file_set(pMainView->photocam2, pData->thumbnail_path);
+                               } else {
+                                       e = elm_photocam_file_set(pMainView->photocam2, pData->filepath);
+
+                                       if (EVAS_LOAD_ERROR_NONE != e) {
+                                               MSG_HIGH("Loading default Thumbnail");
+                                               elm_photocam_file_set(pMainView->photocam2, default_thumbnail_edj_path);
+                                       }
+                               }
                        } else {
-                               e = elm_photocam_file_set(pMainView->photocam2, pData->filepath);
+                               char lock_icon[1024];
+                               snprintf(lock_icon, 1024, "%sedje/icons/image_viewer_camera_secured.png", app_get_resource_path());
+
+                               e = elm_photocam_file_set(pMainView->photocam2, lock_icon);
 
                                if (EVAS_LOAD_ERROR_NONE != e) {
                                        MSG_HIGH("Loading default Thumbnail");
index ce67dc1..f30dac0 100755 (executable)
 /*initialize the values on finger touch to the screen*/
 void _on_slider_mouse_down(void *data, Evas *e, Evas_Object *obj, void *event_info)
 {
-       on_slider_clicked(data, obj, event_info);
        IV_ASSERT(data != NULL);
        Ivug_MainView *pMainView = (Ivug_MainView *)data;
+
+       if (pMainView->mode != IVUG_MODE_SELECT && pMainView->mode != IVUG_MODE_EMAIL) {
+               if (pMainView->bShowMenu) {
+                       ivug_main_view_hide_menu_bar(pMainView);
+               } else {
+                       ivug_main_view_show_menu_bar(pMainView);
+               }
+       }
+
        Evas_Event_Mouse_Down *ev = (Evas_Event_Mouse_Down *) event_info;
        pMainView->prev_mouse_point = 0;
        pMainView->last_prev_mouse_point = ev->output.x;
@@ -63,7 +71,7 @@ void _on_slider_mouse_moved(void *data, Evas *e, Evas_Object *obj, void *event_i
        int currentindex = -1;
        if (pMainView->slide_state == true) {
                MSG_MAIN_HIGH("Sliding is happening");
-               return ;//Do not accept the flick event  if transition is not completed
+               return ;
        }
 
        Evas_Object *sn_layout = ivug_slider_new_get_layout(pMainView->pSliderNew);
@@ -72,9 +80,17 @@ void _on_slider_mouse_moved(void *data, Evas *e, Evas_Object *obj, void *event_i
                count = ivug_medialist_get_count(pMainView->mList);
                Media_Data *pData = ivug_medialist_get_data(pMainView->cur_mitem);
                currentindex =  pData->index;
+       } else if (pMainView->cur_mitem == NULL && pMainView->mode == IVUG_MODE_CAMERA_SIMPLE) {
+               count = ivug_medialist_get_count(pMainView->mList);
+               currentindex = count;
        }
 
-       if (pMainView->prev_mouse_point != 0 &&  currentindex != -1 && count != -1 && ivug_isslide_enabled(pMainView->pSliderNew) && pMainView->bmultitouchsliding == false) {
+       if (pMainView->mode == IVUG_MODE_CAMERA_SIMPLE) count++;
+
+       if (pMainView->prev_mouse_point != 0 &&  currentindex != -1 && count != -1
+                       && ivug_isslide_enabled(pMainView->pSliderNew)
+                       && pMainView->bmultitouchsliding == false) {
+
                if (pMainView->currentphotocam == PHOTOCAM_0) {
                        evas_object_geometry_get(pMainView->photocam0, &bx, &by, &bw, &bh);
                } else if (pMainView->currentphotocam == PHOTOCAM_1) {
@@ -145,10 +161,12 @@ void _on_slider_mouse_moved(void *data, Evas *e, Evas_Object *obj, void *event_i
                 * and again come back at original position
                 * then video play icon should appear
                 */
-               Media_Data *pData = ivug_medialist_get_data(pMainView->cur_mitem);
-               if ((pMainView->last_prev_mouse_point - ev->cur.output.x > -10) && (pMainView->is_play_Icon == false) && (currentindex + 1 == count) && (pData->slide_type == SLIDE_TYPE_VIDEO)) {
-                       edje_object_signal_emit(elm_layout_edje_get(sn_layout), "show,icon", "video_play_icon");
-                       pMainView->is_play_Icon = true;
+               if (pMainView->cur_mitem) {
+                       Media_Data *pData = ivug_medialist_get_data(pMainView->cur_mitem);
+                       if ((pMainView->last_prev_mouse_point - ev->cur.output.x > -10) && (pMainView->is_play_Icon == false) && (currentindex + 1 == count) && (pData->slide_type == SLIDE_TYPE_VIDEO)) {
+                               edje_object_signal_emit(elm_layout_edje_get(sn_layout), "show,icon", "video_play_icon");
+                               pMainView->is_play_Icon = true;
+                       }
                }
        }
 
@@ -209,7 +227,7 @@ void _on_slider_mouse_up(void *data, Evas *e, Evas_Object *obj, void *event_info
        MSG_MAIN_HIGH("mouse up (%d,%d)", ev->output.x, ev->output.y);
        if (pMainView->slide_state == true || ivug_isphotocam_reset(pMainView->pSliderNew)) {
                MSG_MAIN_HIGH("Sliding is happening");
-               return ;//Do not accept the flick event  if transition is not completed
+               return ;
        }
        int count = -1;
        int currentindex = -1;
@@ -221,11 +239,16 @@ void _on_slider_mouse_up(void *data, Evas *e, Evas_Object *obj, void *event_info
                        count = ivug_medialist_get_count(pMainView->mList);
                        Media_Data *pData = ivug_medialist_get_data(pMainView->cur_mitem);
                        currentindex =  pData->index;
-                       MSG_MAIN_HIGH(" _main_view_eventbox_flick_left_cb currentindex = %d count =%d ", currentindex, count);
+                       MSG_MAIN_HIGH("currentindex = %d count =%d ", currentindex, count);
+               } else if (pMainView->cur_mitem == NULL && pMainView->mode == IVUG_MODE_CAMERA_SIMPLE) {
+                       count = ivug_medialist_get_count(pMainView->mList);
+                       currentindex = count;
                }
 
                int diffX = pMainView->last_prev_mouse_point - ev->output.x ;
 
+               if (pMainView->mode == IVUG_MODE_CAMERA_SIMPLE) count++;
+
                if (diffX > 10) {
                        //left flick  code
 
@@ -243,10 +266,9 @@ void _on_slider_mouse_up(void *data, Evas *e, Evas_Object *obj, void *event_info
                                ivug_medialist_set_current_item(pMainView->mList, pMainView->cur_mitem);
 
                                // Update Main View.
-                               if (pMainView->bShowMenu == true) {
+                               if (pMainView->bShowMenu == true && pMainView->mode != IVUG_MODE_CAMERA_SIMPLE) {
                                        _update_main_view(pMainView);
                                }
-                               ivug_medialist_get_data(pMainView->cur_mitem);
 
                                if (pMainView->slide_move_timer) {
                                        ecore_timer_del(pMainView->slide_move_timer);
@@ -256,14 +278,16 @@ void _on_slider_mouse_up(void *data, Evas *e, Evas_Object *obj, void *event_info
                                pMainView->slide_move_timer = ecore_timer_add(PC_MOVE_INTERVAL_TIME, _ivug_left_move_interval, pMainView);
                                pMainView->slide_state = true;//set it to true until the tranition completes.
 #ifdef USE_THUMBLIST
-                               if (pMainView->thumbs) {
-                                       Media_Item *mItem = ivug_medialist_get_current_item(pMainView->mList);
-
-                                       Image_Object *img = NULL;
-                                       img = ivug_thumblist_find_item_by_data(pMainView->thumbs, mItem);               // Find thumb item of new image,.
-                                       if (img != NULL) {
-                                               pMainView->bSetThmByUser = true;
-                                               ivug_thumblist_select_item(pMainView->thumbs, img);
+                               if (pMainView->mode != IVUG_MODE_CAMERA_SIMPLE) {
+                                       if (pMainView->thumbs) {
+                                               Media_Item *mItem = ivug_medialist_get_current_item(pMainView->mList);
+
+                                               Image_Object *img = NULL;
+                                               img = ivug_thumblist_find_item_by_data(pMainView->thumbs, mItem);               // Find thumb item of new image,.
+                                               if (img != NULL) {
+                                                       pMainView->bSetThmByUser = true;
+                                                       ivug_thumblist_select_item(pMainView->thumbs, img);
+                                               }
                                        }
                                }
 #endif
@@ -280,7 +304,12 @@ void _on_slider_mouse_up(void *data, Evas *e, Evas_Object *obj, void *event_info
                                        pMainView->currentphotocam = PHOTOCAM_2;
                                }
 
-                               pMainView->cur_mitem = ivug_medialist_get_prev(pMainView->mList, pMainView->cur_mitem);
+                               if (pMainView->cur_mitem) {
+                                       pMainView->cur_mitem = ivug_medialist_get_prev(pMainView->mList, pMainView->cur_mitem);
+                               } else if (pMainView->mode == IVUG_MODE_CAMERA_SIMPLE) {
+                                       pMainView->cur_mitem = ivug_medialist_get_last(pMainView->mList);
+                               }
+
                                ivug_medialist_set_current_item(pMainView->mList, pMainView->cur_mitem);
 
                                // Update Main View.
@@ -288,8 +317,6 @@ void _on_slider_mouse_up(void *data, Evas *e, Evas_Object *obj, void *event_info
                                        _update_main_view(pMainView);
                                }
 
-                               ivug_medialist_get_data(pMainView->cur_mitem);
-
                                if (pMainView->slide_move_timer) {
                                        ecore_timer_del(pMainView->slide_move_timer);
                                        pMainView->slide_move_timer = NULL;
@@ -333,9 +360,14 @@ void _on_slider_mouse_up(void *data, Evas *e, Evas_Object *obj, void *event_info
 /* slide the image on flick left */
 Eina_Bool _ivug_left_move_interval(void *data)
 {
+       MSG_MAIN_HIGH("_ivug_left_move_interval");
        Ivug_MainView *pMainView = (Ivug_MainView *)data;
        bool movepossible = false;
-       update_check(pMainView);
+
+       if (pMainView->mode == IVUG_MODE_SELECT) {
+               update_check(pMainView);
+       }
+
        Evas_Object *sn_layout = ivug_slider_new_get_layout(pMainView->pSliderNew);
 
        ivug_disable_gesture(pMainView->pSliderNew);
@@ -357,17 +389,19 @@ Eina_Bool _ivug_left_move_interval(void *data)
        if (!movepossible) {
                MSG_MAIN_HIGH("left_transit_done signal triggered");
                edje_object_signal_emit(elm_layout_edje_get(sn_layout), "left_transit_done", "imageview_area");
-               Media_Item *next_mitem = ivug_medialist_get_next(pMainView->mList, pMainView->cur_mitem);
+               if (pMainView->cur_mitem) {
+                       Media_Item *next_mitem = ivug_medialist_get_next(pMainView->mList, pMainView->cur_mitem);
 
-               if (next_mitem) {
-                       Media_Data *pData = ivug_medialist_get_data(next_mitem);
+                       if (next_mitem) {
+                               Media_Data *pData = ivug_medialist_get_data(next_mitem);
 
-                       if (pData->slide_type == SLIDE_TYPE_IMAGE) {
-                               edje_object_signal_emit(elm_layout_edje_get(sn_layout), "hide,icon", "video_play_icon");
-                               pMainView->is_play_Icon = false;
-                       } else {
-                               edje_object_signal_emit(elm_layout_edje_get(sn_layout), "show,icon", "video_play_icon");
-                               pMainView->is_play_Icon = true;
+                               if (pData->slide_type == SLIDE_TYPE_IMAGE) {
+                                       edje_object_signal_emit(elm_layout_edje_get(sn_layout), "hide,icon", "video_play_icon");
+                                       pMainView->is_play_Icon = false;
+                               } else {
+                                       edje_object_signal_emit(elm_layout_edje_get(sn_layout), "show,icon", "video_play_icon");
+                                       pMainView->is_play_Icon = true;
+                               }
                        }
                }
                pMainView->slide_move_timer = NULL;
@@ -384,7 +418,11 @@ Eina_Bool _ivug_right_move_interval(void *data)
        MSG_MAIN_HIGH("_ivug_right_move_interval");
        Ivug_MainView *pMainView = (Ivug_MainView *)data;
        bool movepossible = false;
-       update_check(pMainView);
+
+       if (pMainView->mode == IVUG_MODE_SELECT) {
+               update_check(pMainView);
+       }
+
        Evas_Object *sn_layout = ivug_slider_new_get_layout(pMainView->pSliderNew);
 
        ivug_disable_gesture(pMainView->pSliderNew);
@@ -406,7 +444,13 @@ Eina_Bool _ivug_right_move_interval(void *data)
        if (!movepossible) {
                MSG_MAIN_HIGH("right_transit_done signal triggered");
                edje_object_signal_emit(elm_layout_edje_get(sn_layout), "right_transit_done", "imageview_area");
-               Media_Item *prev_mitem = ivug_medialist_get_prev(pMainView->mList, pMainView->cur_mitem);
+               Media_Item *prev_mitem = NULL;
+
+               if (pMainView->cur_mitem) {
+                       prev_mitem = ivug_medialist_get_prev(pMainView->mList, pMainView->cur_mitem);
+               } else {
+                       prev_mitem = ivug_medialist_get_last(pMainView->mList);
+               }
 
                if (prev_mitem) {
                        Media_Data *pmData = ivug_medialist_get_data(prev_mitem);
@@ -656,6 +700,7 @@ void ivug_set_prev_next_photocam_images(void *data, Evas_Object **prev_pc, Evas_
        Evas_Object *sn_layout = ivug_slider_new_get_layout(pMainView->pSliderNew);
        Evas_Load_Error err = EVAS_LOAD_ERROR_NONE;
 
+       if (!pMainView->cur_mitem) return;
        Media_Item *prev_mitem = ivug_medialist_get_prev(pMainView->mList, pMainView->cur_mitem);
 
        char *edj_file = DEFAULT_THUMBNAIL_PATH;
@@ -707,6 +752,22 @@ void ivug_set_prev_next_photocam_images(void *data, Evas_Object **prev_pc, Evas_
                }
                evas_object_show(*next_pc);
                edje_object_signal_emit(elm_layout_edje_get(sn_layout), "set_right", next_iva);
+       } else if (pMainView->mode == IVUG_MODE_CAMERA_SIMPLE) {
+               if ((*next_pc) == NULL) {
+                       ivug_create_new_photocam_image(pMainView, next_pc, next_iva);
+               }
+
+               char lock_icon[1024];
+               snprintf(lock_icon, 1024, "%sedje/icons/image_viewer_camera_secured.png", app_get_resource_path());
+
+               err = elm_photocam_file_set(*next_pc, lock_icon);
+
+               if (EVAS_LOAD_ERROR_NONE != err) {
+                       MSG_HIGH("Loading default Thumbnail");
+                       elm_photocam_file_set(*next_pc, edj_file);
+               }
+               evas_object_show(*next_pc);
+               edje_object_signal_emit(elm_layout_edje_get(sn_layout), "set_right", next_iva);
        }
        free(edj_file);
 }