summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChia-I Wu <olv@google.com>2017-09-08 22:31:32 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2017-09-08 22:31:32 +0000
commitf7e10c82b04e0f6a2a445609144612ac2f47c8a8 (patch)
treed6e3121690ddf13d41269ce2c74be8202af1dd39
parent9db7166d7cf1ef4b9b1a0a997fada57318851e74 (diff)
parentc0b2b0c457c45e09479029748e07e6d1b1c9d457 (diff)
downloadnative-f7e10c82b04e0f6a2a445609144612ac2f47c8a8.tar.gz
Merge "surfaceflinger: handle executeCommands transaction errors" into oc-mr1-dev
-rw-r--r--services/surfaceflinger/DisplayHardware/ComposerHal.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/services/surfaceflinger/DisplayHardware/ComposerHal.cpp b/services/surfaceflinger/DisplayHardware/ComposerHal.cpp
index ac739a2a05..cf01ad0d62 100644
--- a/services/surfaceflinger/DisplayHardware/ComposerHal.cpp
+++ b/services/surfaceflinger/DisplayHardware/ComposerHal.cpp
@@ -755,7 +755,7 @@ Error Composer::execute()
}
Error error = kDefaultError;
- mClient->executeCommands(commandLength, commandHandles,
+ auto ret = mClient->executeCommands(commandLength, commandHandles,
[&](const auto& tmpError, const auto& tmpOutChanged,
const auto& tmpOutLength, const auto& tmpOutHandles)
{
@@ -788,6 +788,11 @@ Error Composer::execute()
error = Error::NO_RESOURCES;
}
});
+ // executeCommands can fail because of out-of-fd and we do not want to
+ // abort() in that case
+ if (!ret.isOk()) {
+ ALOGE("executeCommands failed because of %s", ret.description().c_str());
+ }
if (error == Error::NONE) {
std::vector<CommandReader::CommandError> commandErrors =