From 209c7b0fad9604d1dde1b74d9f9d577b923469fd Mon Sep 17 00:00:00 2001 From: Dima Zavin Date: Fri, 12 Oct 2012 15:13:52 -0700 Subject: [PATCH] charger: allow devices to skip the initial display blank The theory behind the blank was that the kernel would not re-initilize the display on boot (and leave it to whatever the bootloader configured it to) until after the first blank request. On some devices, the bootloader does not turn the screen on, but it's done by the kernel and thus. This makes the extra blank at start unnecessary. Bug: 7319529 Change-Id: I9ad9856186df6e9e23ebbe86e83b641423e16dcb Signed-off-by: Dima Zavin --- charger/Android.mk | 4 ++++ charger/charger.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/charger/Android.mk b/charger/Android.mk index de9b1843f..fe0c91d93 100644 --- a/charger/Android.mk +++ b/charger/Android.mk @@ -8,6 +8,10 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES := \ charger.c +ifeq ($(strip $(BOARD_CHARGER_DISABLE_INIT_BLANK)),true) +LOCAL_CFLAGS := -DCHARGER_DISABLE_INIT_BLANK +endif + LOCAL_MODULE := charger LOCAL_MODULE_TAGS := optional LOCAL_FORCE_STATIC_EXECUTABLE := true diff --git a/charger/charger.c b/charger/charger.c index 76be076df..c5e4ec276 100644 --- a/charger/charger.c +++ b/charger/charger.c @@ -975,7 +975,9 @@ int main(int argc, char **argv) ev_sync_key_state(set_key_callback, charger); +#ifndef CHARGER_DISABLE_INIT_BLANK gr_fb_blank(true); +#endif charger->next_screen_transition = now - 1; charger->next_key_check = -1;