diff options
author | Jon Medhurst <tixy@linaro.org> | 2012-04-02 14:18:41 +0100 |
---|---|---|
committer | Jon Medhurst <tixy@linaro.org> | 2012-04-02 17:25:50 +0100 |
commit | 755996f818a6f492543095086ed2a4753c83fb66 (patch) | |
tree | c354bb67512089fb8a17601a667dac7dfd0c9da4 | |
parent | aafbff849b03a7eea26f7c2360899f27d7ef6231 (diff) | |
download | base-755996f818a6f492543095086ed2a4753c83fb66.tar.gz |
surfaceflinger: Silence warnings for missing earlysuspend support.
Earlysuspend is gone from the Android 3.3 kernel but surfaceflinger
still expects it to exist. Apparently this is know about upstream and
fixed, but this hasn't been pushed out into 4.0.x
We don't know what the upstream fix is, so for now we will change
the code to fail silently if the frame-buffer earlysuspend files
are missing.
This fixes LP bug #906210
Change-Id: Id1e30981ac1c94cc59b31515d51e52fbed9e88d9
Signed-off-by: Jon Medhurst <tixy@linaro.org>
-rw-r--r-- | services/surfaceflinger/DisplayHardware/DisplayHardwareBase.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/services/surfaceflinger/DisplayHardware/DisplayHardwareBase.cpp b/services/surfaceflinger/DisplayHardware/DisplayHardwareBase.cpp index 3b7c09e80a83..0c7e66598b38 100644 --- a/services/surfaceflinger/DisplayHardware/DisplayHardwareBase.cpp +++ b/services/surfaceflinger/DisplayHardware/DisplayHardwareBase.cpp @@ -72,6 +72,8 @@ bool DisplayHardwareBase::DisplayEventThread::threadLoop() int fd; fd = open(kSleepFileName, O_RDONLY, 0); + if (fd == -1 && errno == ENOENT) + return true; // End silently if FB_EARLYSUSPEND appears to be missing, as on kernels >= 3.3 do { err = read(fd, &buf, 1); } while (err < 0 && errno == EINTR); |