diff options
author | Jeff Brown <jeffbrown@google.com> | 2012-05-11 17:40:45 -0700 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2012-05-11 17:56:01 -0700 |
commit | 03f3747b2f364bce475aead57141bbc44b1637e7 (patch) | |
tree | 6c7b3892c56f00269d937cfc63bb23a8c3fa0600 /power | |
parent | 7465678e0d5711ebcd78ae47b3a76821534a23ea (diff) | |
download | hardware_libhardware_legacy-03f3747b2f364bce475aead57141bbc44b1637e7.zip hardware_libhardware_legacy-03f3747b2f364bce475aead57141bbc44b1637e7.tar.gz hardware_libhardware_legacy-03f3747b2f364bce475aead57141bbc44b1637e7.tar.bz2 |
Delete unused function.
set_last_user_activity_timeout() is no longer used or useful.
It opens a sysfs node that no longer exists that used to
be published by a daemon that is no longer even compiled
and that is about to be deleted. It used to be called
by the power manager with a huge value whose purpose was
essentially to disable the timeout feature altogether.
Long live dead code!
Bug: 6435382
Change-Id: If8f97a66f4e963a11e1c6b67ad97b41b2613043e
Diffstat (limited to 'power')
-rw-r--r-- | power/power.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/power/power.c b/power/power.c index c4fa370..a90cc6b 100644 --- a/power/power.c +++ b/power/power.c @@ -46,8 +46,6 @@ const char * const NEW_PATHS[] = { "/sys/power/wake_unlock", }; -const char * const AUTO_OFF_TIMEOUT_DEV = "/sys/android_power/auto_off_timeout"; - //XXX static pthread_once_t g_initialized = THREAD_ONCE_INIT; static int g_initialized = 0; static int g_fds[OUR_FD_COUNT]; @@ -125,22 +123,3 @@ release_wake_lock(const char* id) ssize_t len = write(g_fds[RELEASE_WAKE_LOCK], id, strlen(id)); return len >= 0; } - -int -set_last_user_activity_timeout(int64_t delay) -{ -// ALOGI("set_last_user_activity_timeout delay=%d\n", ((int)(delay))); - - int fd = open(AUTO_OFF_TIMEOUT_DEV, O_RDWR); - if (fd >= 0) { - char buf[32]; - ssize_t len; - len = snprintf(buf, sizeof(buf), "%d", ((int)(delay))); - buf[sizeof(buf) - 1] = '\0'; - len = write(fd, buf, len); - close(fd); - return 0; - } else { - return errno; - } -} |