summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Lin <jolin@mozilla.com>2015-02-02 18:10:42 +0800
committerZhijun He <zhijunhe@google.com>2015-03-17 19:23:16 -0700
commit2563313c8f9cdbb0237a814e6d89b1932264d225 (patch)
treeb837bceadb86e60c1ecb75d47cc71aa49a7fb986
parentf8bc8cda5684fa2110c9c4e5d42d7c5efd495bc9 (diff)
downloadframeworks_av-2563313c8f9cdbb0237a814e6d89b1932264d225.zip
frameworks_av-2563313c8f9cdbb0237a814e6d89b1932264d225.tar.gz
frameworks_av-2563313c8f9cdbb0237a814e6d89b1932264d225.tar.bz2
camera2: fix various BpCameraDeviceUser methods to return correct result.
- submitRequest*(): res is the request ID and not always equals to NO_ERROR. - cancelRequest() and flush(): the result of reading last frame number should be put in resFrameNumber, not in res. Change-Id: Ic81c58f4ac14c05b3db4bdc5c99f48d00665d3fc Signed-off-by: John Lin <jolin@mozilla.com>
-rw-r--r--camera/camera2/ICameraDeviceUser.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/camera/camera2/ICameraDeviceUser.cpp b/camera/camera2/ICameraDeviceUser.cpp
index ff4a0c2..7d3807a 100644
--- a/camera/camera2/ICameraDeviceUser.cpp
+++ b/camera/camera2/ICameraDeviceUser.cpp
@@ -107,7 +107,7 @@ public:
}
}
- if ((res != NO_ERROR) || (resFrameNumber != NO_ERROR)) {
+ if ((res < NO_ERROR) || (resFrameNumber != NO_ERROR)) {
res = FAILED_TRANSACTION;
}
return res;
@@ -147,7 +147,7 @@ public:
resFrameNumber = reply.readInt64(lastFrameNumber);
}
}
- if ((res != NO_ERROR) || (resFrameNumber != NO_ERROR)) {
+ if ((res < NO_ERROR) || (resFrameNumber != NO_ERROR)) {
res = FAILED_TRANSACTION;
}
return res;
@@ -167,7 +167,7 @@ public:
status_t resFrameNumber = BAD_VALUE;
if (reply.readInt32() != 0) {
if (lastFrameNumber != NULL) {
- res = reply.readInt64(lastFrameNumber);
+ resFrameNumber = reply.readInt64(lastFrameNumber);
}
}
if ((res != NO_ERROR) || (resFrameNumber != NO_ERROR)) {
@@ -296,7 +296,7 @@ public:
status_t resFrameNumber = BAD_VALUE;
if (reply.readInt32() != 0) {
if (lastFrameNumber != NULL) {
- res = reply.readInt64(lastFrameNumber);
+ resFrameNumber = reply.readInt64(lastFrameNumber);
}
}
if ((res != NO_ERROR) || (resFrameNumber != NO_ERROR)) {