display: turn off power when pressing power key if LCDAlwaysOn option is on 16/118216/1 accepted/tizen/common/20170316.161557 accepted/tizen/ivi/20170316.101823 accepted/tizen/mobile/20170316.101703 accepted/tizen/tv/20170316.101747 accepted/tizen/unified/20170316.101838 accepted/tizen/wearable/20170316.101809 submit/tizen/20170316.013421
authortaeyoung <ty317.kim@samsung.com>
Thu, 9 Mar 2017 08:00:29 +0000 (17:00 +0900)
committertaeyoung <ty317.kim@samsung.com>
Thu, 9 Mar 2017 08:00:29 +0000 (17:00 +0900)
- LCDAlwaysOn option of TV and IVI profile is enabled.
  In this case, the target needs to be turned off directly
  when power key is pressed.

Change-Id: I7f0b45f0f5f655b7905a9800e99c5f78fa05056c
Signed-off-by: taeyoung <ty317.kim@samsung.com>
src/display/key-filter.c

index ed38b1f..407ba3e 100644 (file)
@@ -145,7 +145,11 @@ static void longkey_pressed()
                return;
        }
 
-       opt = PWROFF_POPUP_ACT;
+
+       if (display_conf.lcd_always_on)
+               opt = POWEROFF_ACT;
+       else
+               opt = PWROFF_POPUP_ACT;
        power_execute(opt);
 }