Locate right place for the DEVICE_NOTIFIER_LCD_OFF_COMPLETE 14/229714/2
authorYoungjae Cho <y0.cho@samsung.com>
Fri, 3 Apr 2020 04:23:18 +0000 (13:23 +0900)
committerHyotaek Shim <hyotaek.shim@samsung.com>
Fri, 3 Apr 2020 04:28:18 +0000 (04:28 +0000)
Change-Id: Iac31485f0cad441902dc05424b0d4bc8e234e5bd
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
plugins/wearable/display/core.c

index 4d9612d..0615901 100644 (file)
@@ -452,10 +452,12 @@ void broadcast_lcd_off_late(enum device_flags flags)
 {
        static enum device_flags late_flags;
 
-       if (flags & LCD_OFF_LATE_MODE)
+       if (flags & LCD_OFF_LATE_MODE) {
                broadcast_lcd_off(SIGNAL_POST, late_flags);
-       else
+               device_notify(DEVICE_NOTIFIER_LCD_OFF_COMPLETE, NULL);
+       } else {
                late_flags = flags;
+       }
 }
 
 static unsigned long get_lcd_on_flags(void)
@@ -622,12 +624,12 @@ inline void lcd_off_procedure(enum device_flags flag)
        DD_LIST_FOREACH(lcdon_ops, l, ops)
                ops->stop(flags);
 
-       if (flags & AMBIENT_MODE)
+       if (flags & AMBIENT_MODE) {
                broadcast_lcd_off_late(flags);
-       else
+       } else {
                broadcast_lcd_off(SIGNAL_POST, flags);
-
-       device_notify(DEVICE_NOTIFIER_LCD_OFF_COMPLETE, NULL);
+               device_notify(DEVICE_NOTIFIER_LCD_OFF_COMPLETE, NULL);
+       }
 }
 
 void set_stay_touchscreen_off(int val)