summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorEino-Ville Talvala <etalvala@google.com>2012-08-21 16:09:31 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-08-21 17:41:13 -0700
commit76dc8dacbb3e2a8c91cb526293270f9093cf8f8b (patch)
tree7d74c6729903711a4506d0cef8eadc252bccf5c6 /services
parentcd3ed11664d16939f1f5763a896d7fc75dd3642e (diff)
downloadframeworks_av-76dc8dacbb3e2a8c91cb526293270f9093cf8f8b.zip
frameworks_av-76dc8dacbb3e2a8c91cb526293270f9093cf8f8b.tar.gz
frameworks_av-76dc8dacbb3e2a8c91cb526293270f9093cf8f8b.tar.bz2
Camera2: Ignore NOT_FOUND errors for face detect mode on frame receipt.
Reduce log spamming due to incomplete implementations. Change-Id: I6eb9d657591bd5f1476dd8c96e4a00b8a03e2a5e
Diffstat (limited to 'services')
-rw-r--r--services/camera/libcameraservice/Camera2Client.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/services/camera/libcameraservice/Camera2Client.cpp b/services/camera/libcameraservice/Camera2Client.cpp
index c48aa22..66d8a50 100644
--- a/services/camera/libcameraservice/Camera2Client.cpp
+++ b/services/camera/libcameraservice/Camera2Client.cpp
@@ -2010,7 +2010,11 @@ status_t Camera2Client::processFrameFaceDetect(camera_metadata_t *frame) {
}
res = find_camera_metadata_entry(frame, ANDROID_STATS_FACE_DETECT_MODE,
&entry);
- if (res != OK) {
+ // TODO: Remove this check once things are more compliant. For now, assume that
+ // if we can't find the face detect mode, then it's probably not working.
+ if (res == NAME_NOT_FOUND) {
+ return OK;
+ } else if (res != OK) {
ALOGE("%s: Camera %d: Error reading face mode: %s (%d)",
__FUNCTION__, mCameraId, strerror(-res), res);
return res;