display: Change get_var_display_config return type to const
[platform/core/system/deviced.git] / plugins / wearable / display / key-filter.c
1 /*
2  * deviced
3  *
4  * Copyright (c) 2012 - 2013 Samsung Electronics Co., Ltd.
5  *
6  * Licensed under the Apache License, Version 2.0 (the License);
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  *     http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18
19
20 #include <stdio.h>
21 #include <unistd.h>
22 #include <stdlib.h>
23 #include <stdbool.h>
24 #include <assert.h>
25 #include <vconf.h>
26 #include <sys/types.h>
27 #include <libsyscommon/libgdbus.h>
28 #include <linux/input.h>
29
30 #include "ambient-mode.h"
31 #include "util.h"
32 #include "core.h"
33 #include "poll.h"
34 #include "display-actor.h"
35 #include "display-ops.h"
36 #include "shared/common.h"
37 #include "shared/devices.h"
38 #include "shared/device-notifier.h"
39 #include "shared/common.h"
40 #include "shared/plugin.h"
41 #include "shared/apps.h"
42 #include "power/power-off.h"
43 #include "power/power-suspend.h"
44 #include "led/touch-key.h"
45 #include "display/display-lock.h"
46
47 #ifndef KEY_SCREENLOCK
48 #define KEY_SCREENLOCK          0x98
49 #endif
50 #ifndef SW_GLOVE
51 #define SW_GLOVE                0x16
52 #endif
53
54 #define PREDEF_LEAVESLEEP       "leavesleep"
55 #define POWEROFF_ACT                    "poweroff"
56 #define USEC_PER_SEC                    1000000
57 #define USEC_PER_MSEC                   1000
58 #define CSC_CONFIG_MODE_RUNNING 1
59
60 #define CAPTURE_COMBINATION_INTERVAL            0.5     /* 0.5 second */
61 #define TORCH_COMBINATION_INTERVAL                      0.1 /* 0.1 second */
62 #define DEFAULT_COMBINATION_INTERVAL            0.1 /* 0.1 second */
63
64 #define LONGKEY_PRESSED_TIME    4       /* 4 second */
65
66 #define KEY_MAX_DELAY_TIME              700     /* ms */
67
68 #define SIGNAL_CHANGE_HARDKEY           "ChangeHardkey"
69 #define SIGNAL_LCDON_BY_POWERKEY        "LCDOnByPowerkey"
70 #define SIGNAL_LCDOFF_BY_POWERKEY       "LCDOffByPowerkey"
71
72 #define NORMAL_POWER                    0
73 #define KEY_TEST_MODE_POWER             2
74
75 #define GLOVE_MODE      1
76
77 enum key_combination_flags {
78         KEY_COMBINATION_STOP            = 0,
79         KEY_COMBINATION_POWERKEY        = BIT(0),
80         KEY_COMBINATION_MENUKEY         = BIT(1),
81         KEY_COMBINATION_VOLUMEUP        = BIT(2),
82         KEY_COMBINATION_VOLUMEDOWN      = BIT(3),
83 };
84
85 enum combination_process {
86         COMBINATION_STOP        = KEY_COMBINATION_STOP,
87         COMBINATION_SCREENCAPTURE       = KEY_COMBINATION_POWERKEY | KEY_COMBINATION_MENUKEY,
88         COMBINATION_TORCH       = KEY_COMBINATION_POWERKEY | KEY_COMBINATION_VOLUMEUP,
89         COMBINATION_QUICKTALK   = KEY_COMBINATION_POWERKEY | KEY_COMBINATION_VOLUMEDOWN,
90 };
91
92 static struct display_plugin *disp_plgn;
93 static struct _backlight_ops *backlight_ops;
94 static struct timeval pressed_time;
95 static guint longkey_timeout_id = 0;
96 static guint longkey_restore_id = 0;
97 static guint displayon_by_powerkey_timeout_id = 0;
98 static int cancel_lcdoff;
99 static int key_combination = KEY_COMBINATION_STOP;
100 static double combination_pressed_time;
101 static bool touch_pressed = false;
102 static int skip_lcd_off = false;
103 static int skip_combination = false;
104 static int bezel_wakeup = true;
105 static int booting_check = true;
106
107 static inline int current_state_in_on(void)
108 {
109         return ((get_pm_cur_state() == S_LCDDIM) || (get_pm_cur_state()  == S_NORMAL));
110 }
111
112 static inline void restore_custom_brightness(void)
113 {
114         if ((get_pm_cur_state() == S_LCDDIM) &&
115             backlight_ops->get_custom_status())
116                 backlight_ops->custom_update();
117 }
118
119 static void longkey_pressed(void)
120 {
121         unsigned int caps;
122
123         _I("Power key long pressed!");
124         cancel_lcdoff = 1;
125
126         caps = display_get_caps(DISPLAY_ACTOR_POWER_KEY);
127
128         if (display_has_caps(caps, DISPLAY_CAPA_LCDON)) {
129                 /* change state - LCD on */
130                 if (disp_plgn->pm_change_internal)
131                         disp_plgn->pm_change_internal(INTERNAL_LOCK_POWERKEY, LCD_NORMAL);
132                 poll_callback(INPUT_POLL_EVENT, NULL);
133         }
134
135         if (!display_has_caps(caps, DISPLAY_CAPA_LCDOFF)) {
136                 _D("No poweroff capability!");
137                 return;
138         }
139 }
140
141 static gboolean longkey_restore_cb(void *data)
142 {
143         device_notify(DEVICE_NOTIFIER_LONGKEY_RESTORE, (void *)NULL);
144         longkey_restore_id = 0;
145
146         return G_SOURCE_REMOVE;
147 }
148
149 static gboolean longkey_pressed_cb(void *data)
150 {
151         longkey_pressed();
152         longkey_timeout_id = 0;
153
154         return G_SOURCE_REMOVE;
155 }
156
157 static unsigned long timediff_usec(struct timeval t1, struct timeval t2)
158 {
159         unsigned long udiff;
160
161         udiff = (t2.tv_sec - t1.tv_sec) * USEC_PER_SEC;
162         udiff += (t2.tv_usec - t1.tv_usec);
163
164         return udiff;
165 }
166
167 static inline void check_key_pair(int code, int new, int *old)
168 {
169         if (new == *old)
170                 _E("key pair is not matched! (%d, %d)", code, new);
171         else
172                 *old = new;
173 }
174
175 static inline void broadcast_lcdon_by_powerkey(void)
176 {
177         gdbus_signal_emit(NULL,
178                                         DEVICED_PATH_DISPLAY,
179                                         DEVICED_INTERFACE_DISPLAY,
180                                         SIGNAL_LCDON_BY_POWERKEY,
181                                         NULL);
182 }
183
184 static inline void broadcast_lcdoff_by_powerkey(void)
185 {
186         gdbus_signal_emit(NULL,
187                                         DEVICED_PATH_DISPLAY,
188                                         DEVICED_INTERFACE_DISPLAY,
189                                         SIGNAL_LCDOFF_BY_POWERKEY,
190                                         NULL);
191 }
192
193 static inline bool switch_on_lcd(enum device_flags flags)
194 {
195         int ret;
196
197         ret = is_lcdon_blocked();
198         if (ret != LCDON_BLOCK_NONE) {
199                 _W("LCDON is blocked, %d.", ret);
200                 return false;
201         }
202
203         if (current_state_in_on())
204                 return false;
205
206         if (backlight_ops->get_lcd_power() == DPMS_ON) {
207                 if (ambient_get_state() == false)
208                         return false;
209         }
210
211         if (flags & LCD_ON_BY_POWER_KEY)
212                 broadcast_lcdon_by_powerkey();
213         else if (flags & LCD_ON_BY_TOUCH)
214                 _I("Display on by Touch_wakeup event");
215
216         lcd_on_direct(flags);
217
218         return true;
219 }
220
221 static inline void switch_off_lcd(void)
222 {
223         if (!current_state_in_on())
224                 return;
225
226         if (backlight_ops->get_lcd_power() == DPMS_OFF)
227                 return;
228
229         broadcast_lcdoff_by_powerkey();
230
231         lcd_off_procedure(LCD_OFF_BY_POWER_KEY);
232 }
233
234 static void check_key_combination(struct input_event *pinput)
235 {
236         double press_time, diff_time;
237         press_time = (pinput->time).tv_sec + USEC_TO_SEC((pinput->time).tv_usec);
238         diff_time = press_time - combination_pressed_time;
239
240         switch (key_combination) {
241         case COMBINATION_SCREENCAPTURE:
242                 if (diff_time <= CAPTURE_COMBINATION_INTERVAL) {
243                         _I("Combination key : SCREENCAPTURE mode");
244                         skip_combination = true;
245                 }
246                 break;
247         case COMBINATION_TORCH:
248                 if (diff_time <= TORCH_COMBINATION_INTERVAL) {
249                         /* When torch combination, display control should be not change. */
250                         if (displayon_by_powerkey_timeout_id) {
251                                 g_source_remove(displayon_by_powerkey_timeout_id);
252                                 displayon_by_powerkey_timeout_id = 0;
253                         }
254                         _I("Combination key : TORCH mode");
255                         skip_combination = true;
256                 } else
257                         key_combination = COMBINATION_STOP;
258                 break;
259         case COMBINATION_QUICKTALK:
260                 if (diff_time <= DEFAULT_COMBINATION_INTERVAL) {
261                         _I("Combination key : QUICK-TALK mode");
262                         skip_combination = true;
263                         if (longkey_timeout_id) {
264                                 g_source_remove(longkey_timeout_id);
265                                 longkey_timeout_id = 0;
266                         }
267                 }
268                 break;
269         default:
270                 combination_pressed_time = press_time;
271                 return;
272         }
273
274 }
275
276 static void start_key_combination(struct input_event *pinput)
277 {
278         switch (pinput->code) {
279         case KEY_POWER:
280                 key_combination |= KEY_COMBINATION_POWERKEY;
281                 break;
282         case KEY_MENU:
283                 key_combination |= KEY_COMBINATION_MENUKEY;
284                 break;
285         case KEY_VOLUMEUP:
286                 key_combination |= KEY_COMBINATION_VOLUMEUP;
287                 break;
288         case KEY_VOLUMEDOWN:
289                 key_combination |= KEY_COMBINATION_VOLUMEDOWN;
290                 break;
291         default:
292                 return;
293         }
294
295         check_key_combination(pinput);
296 }
297
298 static void stop_key_combination(struct input_event *pinput)
299 {
300         if (pinput == NULL) {
301                 key_combination = KEY_COMBINATION_STOP;
302                 return;
303         }
304
305         switch (pinput->code) {
306         case KEY_POWER:
307                 key_combination &= ~KEY_COMBINATION_POWERKEY;
308                 break;
309         case KEY_MENU:
310                 key_combination &= ~KEY_COMBINATION_MENUKEY;
311                 break;
312         case KEY_VOLUMEUP:
313                 key_combination &= ~KEY_COMBINATION_VOLUMEUP;
314                 break;
315         case KEY_VOLUMEDOWN:
316                 key_combination &= ~KEY_COMBINATION_VOLUMEDOWN;
317                 break;
318         default:
319                 _E("This code(%d) is not combination type.", pinput->code);
320                 break;
321         }
322 }
323
324 static void process_combination_key(struct input_event *pinput)
325 {
326         if (pinput->value == KEY_PRESSED)
327                 start_key_combination(pinput);
328         else if (pinput->value == KEY_RELEASED)
329                 stop_key_combination(pinput);
330 }
331
332 static int process_menu_key(struct input_event *pinput)
333 {
334         int caps;
335
336         caps = display_get_caps(DISPLAY_ACTOR_MENU_KEY);
337
338         if (!display_has_caps(caps, DISPLAY_CAPA_LCDON)) {
339                 if (current_state_in_on())
340                         return false;
341                 _D("No lcd-on capability!");
342                 return true;
343         } else if (pinput->value == KEY_PRESSED)
344                 switch_on_lcd(LCD_ON_BY_POWER_KEY);
345
346         return false;
347 }
348
349 static int decide_lcdoff(void)
350 {
351         /* It's not needed if it's already LCD off state */
352         if (!current_state_in_on() &&
353             backlight_ops->get_lcd_power() != DPMS_ON)
354                 return false;
355
356         /*
357          * This flag is set at the moment
358          * that LCD is turned on by power key
359          * LCD has not to turned off in the situation.
360          */
361         if (skip_lcd_off)
362                 return false;
363
364         /* LCD is not turned off when powerkey is pressed,not released */
365         if (key_combination == KEY_COMBINATION_POWERKEY)
366                 return false;
367
368         /* LCD-off is blocked at the moment poweroff popup shows */
369         if (cancel_lcdoff)
370                 return false;
371
372         /* LCD-off is blocked when powerkey and volmedown key are pressed */
373         if (skip_combination)
374                 return false;
375
376         /* At booting time, display must do not turn off */
377         if (booting_check)
378                 return false;
379
380         return true;
381 }
382
383 static int lcdoff_powerkey(void)
384 {
385         int ignore = true;
386
387         if (decide_lcdoff() == true) {
388                 check_processes(S_NORMAL);
389                 check_processes(S_LCDDIM);
390
391                 if (!check_holdkey_block(S_NORMAL) &&
392                     !check_holdkey_block(S_LCDDIM)) {
393                         if (display_info.update_auto_brightness)
394                                 display_info.update_auto_brightness(false);
395                         switch_off_lcd();
396                         delete_condition(S_NORMAL);
397                         delete_condition(S_LCDDIM);
398                         update_lcdoff_source(VCONFKEY_PM_LCDOFF_BY_POWERKEY);
399                         if (disp_plgn->pm_change_internal)
400                                 disp_plgn->pm_change_internal(INTERNAL_LOCK_POWERKEY, LCD_OFF);
401                 }
402         } else {
403                 ignore = false;
404                 skip_combination = false;
405         }
406         cancel_lcdoff = 0;
407
408         return ignore;
409 }
410
411 static int process_back_key(struct input_event *pinput)
412 {
413         int ignore = true;
414
415         if (pinput->value == KEY_PRESSED) {
416                 switch_on_lcd(LCD_ON_BY_BACK_KEY);
417                 _I("back key pressed");
418                 ignore = false;
419         }
420
421         return ignore;
422 }
423
424 static int process_power_key(struct input_event *pinput)
425 {
426         int ignore = true;
427         static int value = KEY_RELEASED;
428         unsigned int caps;
429         const struct display_config *display_conf = get_var_display_config();
430         if (!display_conf) {
431                 _E("Failed to get display configuration variable.");
432                 return ignore;
433         }
434
435         caps = display_get_caps(DISPLAY_ACTOR_POWER_KEY);
436
437         switch (pinput->value) {
438         case KEY_RELEASED:
439                 check_key_pair(pinput->code, pinput->value, &value);
440
441                 if (!display_conf->powerkey_doublepress) {
442                         if (display_has_caps(caps, DISPLAY_CAPA_LCDOFF))
443                                 lcdoff_powerkey();
444                         else
445                                 _D("No lcdoff capability!");
446                 } else if (skip_lcd_off)
447                         ignore = false;
448
449                 if (!display_has_caps(caps, DISPLAY_CAPA_LCDON))
450                         ignore = true;
451
452                 if (longkey_timeout_id > 0) {
453                         g_source_remove(longkey_timeout_id);
454                         longkey_timeout_id = 0;
455                 }
456
457                 if (longkey_restore_id > 0) {
458                         g_source_remove(longkey_restore_id);
459                         longkey_restore_id = 0;
460                 }
461
462                 break;
463         case KEY_PRESSED:
464                 if (display_has_caps(caps, DISPLAY_CAPA_LCDON)) {
465                         skip_lcd_off = switch_on_lcd(LCD_ON_BY_POWER_KEY);
466                 } else {
467                         _D("No lcdon capability!");
468                         skip_lcd_off = false;
469                 }
470                 check_key_pair(pinput->code, pinput->value, &value);
471                 _I("power key pressed");
472                 pressed_time.tv_sec = (pinput->time).tv_sec;
473                 pressed_time.tv_usec = (pinput->time).tv_usec;
474                 if (key_combination == KEY_COMBINATION_POWERKEY) {
475                         /* add long key timer */
476                         longkey_timeout_id = g_timeout_add(
477                                     display_conf->longpress_interval,
478                                     longkey_pressed_cb, NULL);
479                         /* add long key restore timer */
480                         longkey_restore_id = g_timeout_add_seconds(
481                                     LONGKEY_PRESSED_TIME,
482                                     longkey_restore_cb, NULL);
483                 }
484                 cancel_lcdoff = 0;
485
486                 break;
487         case KEY_BEING_PRESSED:
488                 if (timediff_usec(pressed_time, pinput->time) >
489                     (display_conf->longpress_interval * USEC_PER_MSEC))
490                         longkey_pressed();
491                 break;
492         }
493         return ignore;
494 }
495
496 static int process_screenlock_key(struct input_event *pinput)
497 {
498         if (pinput->value != KEY_RELEASED) {
499                 stop_key_combination(NULL);
500                 return true;
501         }
502
503         if (!current_state_in_on())
504                 return false;
505
506         check_processes(S_NORMAL);
507         check_processes(S_LCDDIM);
508
509         if (!check_holdkey_block(S_NORMAL) && !check_holdkey_block(S_LCDDIM)) {
510                 delete_condition(S_NORMAL);
511                 delete_condition(S_LCDDIM);
512                 update_lcdoff_source(VCONFKEY_PM_LCDOFF_BY_POWERKEY);
513
514                 /* LCD off forcly */
515                 if (disp_plgn->pm_change_internal)
516                         disp_plgn->pm_change_internal(-1, LCD_OFF);
517         }
518
519         return true;
520 }
521
522 static void update_vital_state(struct input_event *pinput)
523 {
524         int type;
525
526         /* Change vital state to  VITAL_EXIT only if vital mode is active */
527         if (!vital_mode())
528                 return;
529
530         /* Touch or Menu Key Release Event */
531         if (pinput->type == EV_ABS || (pinput->type == EV_KEY &&
532             pinput->value == KEY_RELEASED && pinput->code == KEY_MENU)) {
533                 /* Enable all services upon receiving user input, else maintain same state */
534                 type = VITAL_EXIT;
535                 device_notify(DEVICE_NOTIFIER_VITAL_STATE, &type);
536         }
537 }
538
539 static int check_key(struct input_event *pinput, int fd)
540 {
541         int ignore = true;
542
543         process_combination_key(pinput);
544         switch (pinput->code) {
545         case KEY_MENU:
546                 ignore = process_menu_key(pinput);
547                 break;
548         case KEY_POWER:
549                 ignore = process_power_key(pinput);
550                 if (current_state_in_on())
551                         ignore = false;
552                 break;
553         case KEY_SCREENLOCK:
554                 ignore = process_screenlock_key(pinput);
555                 break;
556         case KEY_BACK:
557                 ignore = process_back_key(pinput);
558                 stop_key_combination(NULL);
559                 if (current_state_in_on())
560                         ignore = false;
561                 break;
562         case KEY_PHONE:
563                 stop_key_combination(NULL);
564                 if (current_state_in_on())
565                         ignore = false;
566                 break;
567         case KEY_VOLUMEUP:
568         case KEY_VOLUMEDOWN:
569                 if (current_state_in_on())
570                         ignore = false;
571                 break;
572         case KEY_CAMERA:
573         case KEY_EXIT:
574         case KEY_CONFIG:
575         case KEY_MEDIA:
576         case KEY_MUTE:
577         case KEY_PLAYPAUSE:
578         case KEY_PLAYCD:
579         case KEY_PAUSECD:
580         case KEY_STOPCD:
581         case KEY_NEXTSONG:
582         case KEY_PREVIOUSSONG:
583         case KEY_REWIND:
584         case KEY_FASTFORWARD:
585                 stop_key_combination(NULL);
586                 if (current_state_in_on())
587                         ignore = false;
588                 break;
589         case 0x1DB:
590         case 0x1DC:
591         case 0x1DD:
592         case 0x1DE:
593                 stop_key_combination(NULL);
594                 break;
595         default:
596                 stop_key_combination(NULL);
597                 ignore = false;
598         }
599 #ifdef ENABLE_PM_LOG
600         if (pinput->value == KEY_PRESSED)
601                 pm_history_save(PM_LOG_KEY_PRESS, pinput->code);
602         else if (pinput->value == KEY_RELEASED)
603                 pm_history_save(PM_LOG_KEY_RELEASE, pinput->code);
604 #endif
605         return ignore;
606 }
607
608 static int check_key_filter(void *data, int fd)
609 {
610         struct input_event *pinput = data;
611         int ignore = true;
612         static int old_fd, code, value;
613
614         assert(pinput);
615
616         switch (pinput->type) {
617         case EV_KEY:
618                 if (pinput->code == BTN_TOUCH &&
619                         pinput->value == KEY_RELEASED)
620                         touch_pressed = false;
621                 /*
622                  * Normally, touch press/release events don't occur
623                  * in lcd off state. But touch release events can occur
624                  * in the state abnormally. Then touch events are ignored
625                  * when lcd is off state.
626                  */
627                 if (pinput->code == BTN_TOUCH && !current_state_in_on())
628                         break;
629                 if (pinput->code == code && pinput->value == value) {
630                         _E("Same key(%d, %d) is polled [%d,%d]",
631                                 code, value, old_fd, fd);
632                 }
633                 old_fd = fd;
634                 code = pinput->code;
635                 value = pinput->value;
636
637                 update_vital_state(pinput);
638                 ignore = check_key(pinput, fd);
639                 restore_custom_brightness();
640
641                 break;
642         case EV_REL:
643                 if ((get_pm_cur_state() == S_LCDOFF) && bezel_wakeup) {
644                         switch_on_lcd(LCD_ON_BY_BEZEL);
645                         ignore = false;
646                 } else if (get_pm_cur_state() != S_LCDOFF)
647                         ignore = false;
648                 break;
649         case EV_ABS:
650                 update_vital_state(pinput);
651                 if (pinput->value == KEY_PRESSED) {
652                         switch_on_lcd(LCD_ON_BY_TOUCH);
653                         ignore = false;
654                 }
655
656                 if (current_state_in_on())
657                         ignore = false;
658
659                 restore_custom_brightness();
660
661                 if (pinput->value == KEY_PRESSED)
662                         touch_pressed = true;
663                 else if (pinput->value == KEY_RELEASED)
664                         touch_pressed = false;
665                 break;
666         case EV_SW:
667                 break;
668         }
669
670         if (ignore)
671                 return 1;
672
673         return 0;
674 }
675
676 static int delayed_init_done(void *data)
677 {
678         booting_check = 0;
679
680         return 0;
681 }
682
683 static int bezel_wakeup_cb(void *data)
684 {
685         bezel_wakeup = (int)((intptr_t)data);
686
687         return 0;
688 }
689
690 /*
691  * Default capability
692  * powerkey := LCDON | LCDOFF | POWEROFF
693  * homekey  := LCDON
694  */
695 static struct display_actor_ops display_powerkey_actor = {
696         .id     = DISPLAY_ACTOR_POWER_KEY,
697         .caps   = DISPLAY_CAPA_LCDON |
698                   DISPLAY_CAPA_LCDOFF |
699                   DISPLAY_CAPA_POWEROFF,
700 };
701
702 static struct display_actor_ops display_menukey_actor = {
703         .id     = DISPLAY_ACTOR_MENU_KEY,
704         .caps   = DISPLAY_CAPA_LCDON,
705 };
706
707 static void keyfilter_init(void)
708 {
709         display_add_actor(&display_powerkey_actor);
710         display_add_actor(&display_menukey_actor);
711
712         register_notifier(DEVICE_NOTIFIER_DELAYED_INIT, delayed_init_done);
713         register_notifier(DEVICE_NOTIFIER_BEZEL_WAKEUP, bezel_wakeup_cb);
714 }
715
716 static const struct display_keyfilter_ops normal_keyfilter_ops = {
717         .init                   = keyfilter_init,
718         .check                  = check_key_filter,
719         .set_powerkey_ignore    = NULL,
720         .powerkey_lcdoff        = NULL,
721         .backlight_enable       = NULL,
722 };
723
724 const struct display_keyfilter_ops *keyfilter_ops = &normal_keyfilter_ops;
725
726 static void __CONSTRUCTOR__ initialize(void)
727 {
728         disp_plgn = get_var_display_plugin();
729         if (!disp_plgn)
730                 _E("Failed to get display plugin variable.");
731
732         backlight_ops = get_var_backlight_ops();
733         if (!backlight_ops)
734                 _E("Failed to get backlight operator variable.");
735 }