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

Commit 8b801f18 authored by Ricardo Cerqueira's avatar Ricardo Cerqueira
Browse files

libcameraservice: Workaround for nvidia TTF bug

When leaving from a TTF scenario to a non-TTF (such as complete lack
of focus on camcorder or FFC), the focus areas are reset to 0
Setting a TTF region of size zero will cause the whole HAL to lock up,
so prevent it from happening...

Change-Id: I21886a2c8665a50aa6f9ff92a6aaf1f6c36ad61c
parent 0cddf15d
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -988,6 +988,14 @@ status_t CameraService::Client::setParameters(const String8& params) {

    CameraParameters p(params);

#ifdef BOARD_HAS_LGE_FFC
    /* Do not set nvidia focus area to 0 */
    if(p.get("nv-areas-to-focus")!= NULL &&
       !strncmp(p.get("nv-areas-to-focus"),"0",1)) {
        p.remove("nv-areas-to-focus");
    }
#endif

    return mHardware->setParameters(p);
}