From ea0ac6abce073b155741c6e2c1388d4270896167 Mon Sep 17 00:00:00 2001 From: Youngjae Cho Date: Thu, 20 Feb 2020 17:40:45 +0900 Subject: [PATCH] Add strings for LCDON triggered from bezel/backkey Change-Id: I2dc3a91991ee318b5419822f8f161d648820715d Signed-off-by: Youngjae Cho --- plugins/iot/display/key-filter.c | 2 +- plugins/mobile/display/key-filter.c | 2 +- plugins/tv/display/key-filter.c | 2 +- plugins/wearable/display/core.c | 6 ++++++ plugins/wearable/display/key-filter.c | 2 +- src/core/devices.h | 19 ++++++++++--------- 6 files changed, 20 insertions(+), 13 deletions(-) diff --git a/plugins/iot/display/key-filter.c b/plugins/iot/display/key-filter.c index a046080..71ee649 100644 --- a/plugins/iot/display/key-filter.c +++ b/plugins/iot/display/key-filter.c @@ -445,7 +445,7 @@ static int process_back_key(struct input_event *pinput) int ignore = true; if (pinput->value == KEY_PRESSED) { - switch_on_lcd(LCD_ON_BY_POWER_KEY); + switch_on_lcd(LCD_ON_BY_BACK_KEY); _I("back key pressed"); ignore = false; } diff --git a/plugins/mobile/display/key-filter.c b/plugins/mobile/display/key-filter.c index 7af0516..0da1315 100644 --- a/plugins/mobile/display/key-filter.c +++ b/plugins/mobile/display/key-filter.c @@ -434,7 +434,7 @@ static int process_back_key(struct input_event *pinput) int ignore = true; if (pinput->value == KEY_PRESSED) { - switch_on_lcd(LCD_ON_BY_POWER_KEY); + switch_on_lcd(LCD_ON_BY_BACK_KEY); _I("back key pressed"); ignore = false; } diff --git a/plugins/tv/display/key-filter.c b/plugins/tv/display/key-filter.c index c631ae8..d67d3a6 100644 --- a/plugins/tv/display/key-filter.c +++ b/plugins/tv/display/key-filter.c @@ -445,7 +445,7 @@ static int process_back_key(struct input_event *pinput) int ignore = true; if (pinput->value == KEY_PRESSED) { - switch_on_lcd(LCD_ON_BY_POWER_KEY); + switch_on_lcd(LCD_ON_BY_BACK_KEY); _I("back key pressed"); ignore = false; } diff --git a/plugins/wearable/display/core.c b/plugins/wearable/display/core.c index 7a04a38..2e67c3d 100644 --- a/plugins/wearable/display/core.c +++ b/plugins/wearable/display/core.c @@ -77,8 +77,10 @@ #define GESTURE_STR "gesture" #define POWER_KEY_STR "powerkey" +#define BACK_KEY_STR "backkey" #define TOUCH_STR "touch" #define EVENT_STR "event" +#define BEZEL_STR "bezel" #define TIMEOUT_STR "timeout" #define PROXI_STR "proximity" #define PALM_STR "palm" @@ -379,10 +381,14 @@ static void broadcast_lcd_on(enum signal_type type, enum device_flags flags) str = GESTURE_STR; else if (flags & LCD_ON_BY_POWER_KEY) str = POWER_KEY_STR; + else if (flags & LCD_ON_BY_BACK_KEY) + str = BACK_KEY_STR; else if (flags & LCD_ON_BY_EVENT) str = EVENT_STR; else if (flags & LCD_ON_BY_TOUCH) str = TOUCH_STR; + else if (flags & LCD_ON_BY_BEZEL) + str = BEZEL_STR; else str = UNKNOWN_STR; diff --git a/plugins/wearable/display/key-filter.c b/plugins/wearable/display/key-filter.c index 1f4734c..920674d 100644 --- a/plugins/wearable/display/key-filter.c +++ b/plugins/wearable/display/key-filter.c @@ -434,7 +434,7 @@ static int process_back_key(struct input_event *pinput) int ignore = true; if (pinput->value == KEY_PRESSED) { - switch_on_lcd(LCD_ON_BY_POWER_KEY); + switch_on_lcd(LCD_ON_BY_BACK_KEY); _I("back key pressed"); ignore = false; } diff --git a/src/core/devices.h b/src/core/devices.h index 8a8f4cd..8e79009 100644 --- a/src/core/devices.h +++ b/src/core/devices.h @@ -33,15 +33,16 @@ enum device_flags { NORMAL_MODE = 0x00000001, AMBIENT_MODE = 0x00000002, FORCE_OFF_MODE = 0x00000004, - CORE_LOGIC_MODE = 0x00010000, - TOUCH_SCREEN_OFF_MODE = 0x00020000, - LCD_PANEL_OFF_MODE = 0x00040000, - LCD_PHASED_TRANSIT_MODE = 0x00080000, - LCD_ON_BY_GESTURE = 0x00100000, - LCD_ON_BY_POWER_KEY = 0x00200000, - LCD_ON_BY_EVENT = 0x00400000, - LCD_ON_BY_TOUCH = 0x00800000, - LCD_ON_BY_BEZEL = 0x01000000, + CORE_LOGIC_MODE = 0x00001000, + TOUCH_SCREEN_OFF_MODE = 0x00002000, + LCD_PANEL_OFF_MODE = 0x00004000, + LCD_PHASED_TRANSIT_MODE = 0x00008000, + LCD_ON_BY_GESTURE = 0x00010000, + LCD_ON_BY_POWER_KEY = 0x00020000, + LCD_ON_BY_BACK_KEY = 0x00040000, + LCD_ON_BY_EVENT = 0x00080000, + LCD_ON_BY_TOUCH = 0x00100000, + LCD_ON_BY_BEZEL = 0x00200000, LCD_OFF_BY_POWER_KEY = 0x02000000, LCD_OFF_BY_TIMEOUT = 0x04000000, LCD_OFF_BY_EVENT = 0x08000000, -- 2.7.4