diff options
author | Igor Murashkin <iam@google.com> | 2013-04-30 13:06:15 -0700 |
---|---|---|
committer | Igor Murashkin <iam@google.com> | 2013-04-30 13:06:15 -0700 |
commit | 37b2602761cbfc20f8a36e27eb4cf1b3dfd04e6b (patch) | |
tree | 1c133c345ae9a4fb9fce5f977744d47cc3c928f0 /services | |
parent | 948700612e987b49185f7916befd38f39a2b0a3b (diff) | |
download | frameworks_av-37b2602761cbfc20f8a36e27eb4cf1b3dfd04e6b.zip frameworks_av-37b2602761cbfc20f8a36e27eb4cf1b3dfd04e6b.tar.gz frameworks_av-37b2602761cbfc20f8a36e27eb4cf1b3dfd04e6b.tar.bz2 |
Camera: Don't complain repeatedly about missing android.led.availableLeds
Bug: 8765726
Change-Id: I78f5f98315068aaad3a39d56698b9c8a18cc8f4a
Diffstat (limited to 'services')
-rw-r--r-- | services/camera/libcameraservice/camera2/Parameters.cpp | 8 | ||||
-rw-r--r-- | services/camera/libcameraservice/camera2/Parameters.h | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/services/camera/libcameraservice/camera2/Parameters.cpp b/services/camera/libcameraservice/camera2/Parameters.cpp index a304b35..d02f17e 100644 --- a/services/camera/libcameraservice/camera2/Parameters.cpp +++ b/services/camera/libcameraservice/camera2/Parameters.cpp @@ -952,10 +952,10 @@ status_t Parameters::buildQuirks() { } camera_metadata_ro_entry_t Parameters::staticInfo(uint32_t tag, - size_t minCount, size_t maxCount) const { + size_t minCount, size_t maxCount, bool required) const { camera_metadata_ro_entry_t entry = info->find(tag); - if (CC_UNLIKELY( entry.count == 0 )) { + if (CC_UNLIKELY( entry.count == 0 ) && required) { const char* tagSection = get_camera_metadata_section_name(tag); if (tagSection == NULL) tagSection = "<unknown>"; const char* tagName = get_camera_metadata_tag_name(tag); @@ -1593,7 +1593,9 @@ status_t Parameters::updateRequest(CameraMetadata *request) const { * - android.led.transmit = defaulted ON */ camera_metadata_ro_entry_t entry = staticInfo(ANDROID_LED_AVAILABLE_LEDS, - /*minimumCount*/0); + /*minimumCount*/0, + /*maximumCount*/0, + /*required*/false); for(size_t i = 0; i < entry.count; ++i) { uint8_t led = entry.data.u8[i]; diff --git a/services/camera/libcameraservice/camera2/Parameters.h b/services/camera/libcameraservice/camera2/Parameters.h index fe3ec1d..696ee2f 100644 --- a/services/camera/libcameraservice/camera2/Parameters.h +++ b/services/camera/libcameraservice/camera2/Parameters.h @@ -213,7 +213,7 @@ struct Parameters { // max/minCount means to do no bounds check in that direction. In case of // error, the entry data pointer is null and the count is 0. camera_metadata_ro_entry_t staticInfo(uint32_t tag, - size_t minCount=0, size_t maxCount=0) const; + size_t minCount=0, size_t maxCount=0, bool required=true) const; // Validate and update camera parameters based on new settings status_t set(const String8 ¶mString); |