summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Medhurst <tixy@linaro.org>2012-04-02 14:18:41 +0100
committerMathieu J. Poirier <mathieu.poirier@linaro.org>2012-04-13 08:16:37 -0600
commit2f1e2bc4487333e4c9de1dea3456d917e06c3021 (patch)
treed3b85141dbc403e8b569f59043653d8b1fb9ec75
parente26f4921731f71b29ef0fe38d8d35cff6c5addce (diff)
downloadbase-linaro_android_4.0.3_snowball_mm.tar.gz
surfaceflinger: Silence warnings for missing earlysuspend support.linaro_android_4.0.3_snowball_mm
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.cpp2
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);