From: Joohyun Kim Date: Thu, 13 Jun 2013 06:38:40 +0000 (+0900) Subject: Fix dimming issue on KeepScreenOnState function X-Git-Tag: submit/tizen_2.2/20130714.152805~107^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9381ddc9566746ad3fd8c58b3f5aa381bc7764e0;p=framework%2Fosp%2Fappfw.git Fix dimming issue on KeepScreenOnState function Change-Id: Ie0c687be358662e1fcf94182343555c9f508c318 Signed-off-by: Joohyun Kim --- diff --git a/src/system/FSys_PowerManagerImpl.cpp b/src/system/FSys_PowerManagerImpl.cpp index 42af887..5e6f5fb 100644 --- a/src/system/FSys_PowerManagerImpl.cpp +++ b/src/system/FSys_PowerManagerImpl.cpp @@ -381,7 +381,7 @@ result _PowerManagerImpl::KeepScreenOnState(bool keepOn, bool dimming) { int ret = -1; - unsigned int state = LCD_DIM; + unsigned int state = LCD_DIM, flag = GOTO_STATE_NOW; _PowerManagerImpl::Init(); SysLog(NID_SYS, "Power control option: keep %d, dimming %d", keepOn, dimming); @@ -390,12 +390,16 @@ _PowerManagerImpl::KeepScreenOnState(bool keepOn, bool dimming) if (dimming) { state = LCD_DIM; + if(power_get_state() == POWER_STATE_NORMAL) + { + flag = STAY_CUR_STATE; + } } else { state = LCD_NORMAL; } - ret = pm_lock_state(state, GOTO_STATE_NOW, 0); + ret = pm_lock_state(state, flag, 0); SysTryReturnResult(NID_SYS, ret == 0, E_SYSTEM, "[E_SYSTEM] It failed to lock the screen state"); _keepScreenOnState = true; }