Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ef052a9a authored by Igor Murashkin's avatar Igor Murashkin Committed by Android Git Automerger
Browse files

am 6feba7db: am d8c7ad1c: Camera: Don\'t complain repeatedly about missing...

am 6feba7db: am d8c7ad1c: Camera: Don\'t complain repeatedly about missing android.led.availableLeds

* commit '6feba7db':
  Camera: Don't complain repeatedly about missing android.led.availableLeds
parents ba9be9f4 6feba7db
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -953,10 +953,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);
@@ -1594,7 +1594,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];

+1 −1
Original line number Diff line number Diff line
@@ -214,7 +214,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 &paramString);