diff options
author | Jeongmo Yang <jm80.yang@samsung.com> | 2012-09-08 21:28:38 +0900 |
---|---|---|
committer | Jeongmo Yang <jm80.yang@samsung.com> | 2012-09-08 21:28:38 +0900 |
commit | 86dff23cbf636a80c8fb397075cc41f750cee198 (patch) | |
tree | e95a9432935dd3b48193276f8b45b1c3c6dcdf78 /src | |
parent | d8f8e16a93ac607c6839795a75668e4ae8c854ab (diff) | |
download | libmm-camcorder-master.tar.gz libmm-camcorder-master.tar.bz2 libmm-camcorder-master.zip |
Lock pm state when start preview not to off the screenHEADsubmit/master/20120920.1510592.0_alphamaster2.0alpha
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/mm_camcorder_internal.c | 10 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 6631a03..abcaccb 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -45,6 +45,7 @@ libmmfcamcorder_la_CFLAGS = -I$(srcdir)/include \ $(SNDFILE_CFLAGS) \ $(CAMSRCJPEGENC_CFLAGS) \ $(VCONF_CFLAGS) \ + $(PMAPI_CFLAGS) \ $(AUDIOSESSIONMGR_CFLAGS) libmmfcamcorder_la_LIBADD = \ @@ -60,6 +61,7 @@ libmmfcamcorder_la_LIBADD = \ $(SNDFILE_LIBS) \ $(CAMSRCJPEGENC_LIBS) \ $(VCONF_LIBS) \ + $(PMAPI_LIBS) \ $(AUDIOSESSIONMGR_LIBS) libmmfcamcorder_la_CFLAGS += $(MMLOGSVR_CFLAGS) -DMMF_LOG_OWNER=0x010 -DMMF_DEBUG_PREFIX=\"MMF-CAMCORDER\" -D_INTERNAL_SESSION_MANAGER_ diff --git a/src/mm_camcorder_internal.c b/src/mm_camcorder_internal.c index 6300f8b..1cf1f61 100644 --- a/src/mm_camcorder_internal.c +++ b/src/mm_camcorder_internal.c @@ -40,6 +40,8 @@ #include <mm_session_private.h> #include <audio-session-manager.h> +#include <pmapi.h> + /*--------------------------------------------------------------------------------------- | GLOBAL VARIABLE DEFINITIONS for internal | ---------------------------------------------------------------------------------------*/ @@ -626,6 +628,10 @@ int _mmcamcorder_realize(MMHandleType handle) _mmcam_dbg_log("VCONFKEY_CAMERA_STATE prev %d -> cur %d", vconf_camera_state, VCONFKEY_CAMERA_STATE_OPEN); + + /* LOCK PM control */ + pm_lock_state(LCD_NORMAL, GOTO_STATE_NOW | HOLD_KEY_BLOCK, 0); + _mmcam_dbg_log("LOCK PM State"); } /* Set async state */ @@ -894,6 +900,10 @@ int _mmcamcorder_unrealize(MMHandleType handle) _mmcam_dbg_log("VCONFKEY_CAMERA_STATE prev %d -> cur %d", vconf_camera_state, VCONFKEY_CAMERA_STATE_NULL); + + /* UNLOCK PM State */ + pm_unlock_state(LCD_NORMAL, PM_RESET_TIMER); + _mmcam_dbg_log("UNLOCK PM State"); } _MMCAMCORDER_UNLOCK_CMD(hcamcorder); |