summaryrefslogtreecommitdiffstats
path: root/camera
diff options
context:
space:
mode:
authorJohn Lin <jolin@mozilla.com>2015-02-02 18:10:42 +0800
committerJohn Lin <jolin@mozilla.com>2015-02-03 04:10:44 +0000
commit19fa0feaef631f92ab812cd1640252ade5fae1a2 (patch)
tree1c42641374d9ec3af44b3a79ddcd71d5e7b803cf /camera
parent434c80e54fb0dbf01941aa7560d5add5e69e0f1d (diff)
downloadframeworks_av-19fa0feaef631f92ab812cd1640252ade5fae1a2.zip
frameworks_av-19fa0feaef631f92ab812cd1640252ade5fae1a2.tar.gz
frameworks_av-19fa0feaef631f92ab812cd1640252ade5fae1a2.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>
Diffstat (limited to 'camera')
-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 35345d2..277b5db 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)) {