Skip to content
Permalink
Browse files

lights: hold a partial wakelock

btw this is all a temporary hack until Huawei's crap is reversed
  • Loading branch information
Dazzozo committed Jan 5, 2013
1 parent 05b4acd commit 21610d5d62665910acb552deb617020a295a3348
Showing with 4 additions and 1 deletion.
  1. +1 −1 lights/Android.mk
  2. +3 −0 lights/lights.c
@@ -25,7 +25,7 @@ LOCAL_SRC_FILES := lights.c
LOCAL_PRELINK_MODULE := false
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw

LOCAL_SHARED_LIBRARIES := liblog
LOCAL_SHARED_LIBRARIES := libhardware_legacy liblog

LOCAL_MODULE := lights.u8815

@@ -31,6 +31,7 @@
#include <sys/types.h>

#include <hardware/lights.h>
#include <hardware_legacy/power.h>

/******************************************************************************/

@@ -156,6 +157,7 @@ void
usleep(offMS * 1000);
}
}
release_wake_lock("blink");
return 0;
}

@@ -213,6 +215,7 @@ set_speaker_light_locked(struct light_device_t* dev,
}

if(blink) {
acquire_wake_lock(PARTIAL_WAKE_LOCK, "blink");
pthread_create(&t_led_blink, NULL, led_blink, NULL);
} else {
write_int(RED_LED_FILE, red);

0 comments on commit 21610d5

Please sign in to comment.
You can’t perform that action at this time.