am d8bf3dc0: CameraHal: Do full AF sweep during lost AF status

* commit 'd8bf3dc07ef357eb0761cfdacab458f2358907aa':
  CameraHal: Do full AF sweep during lost AF status
diff --git a/camera/OMXCameraAdapter/OMXCameraAdapter.cpp b/camera/OMXCameraAdapter/OMXCameraAdapter.cpp
index a41327c..b3fcf67 100755
--- a/camera/OMXCameraAdapter/OMXCameraAdapter.cpp
+++ b/camera/OMXCameraAdapter/OMXCameraAdapter.cpp
@@ -2968,6 +2968,7 @@
                 {
                 ancillaryData = (OMX_TI_ANCILLARYDATATYPE*) extraData->data;
                 snapshotFrame = ancillaryData->nDCCStatus;
+                mPending3Asettings |= SetFocus;
                 }
             }
 
diff --git a/camera/OMXCameraAdapter/OMXFocus.cpp b/camera/OMXCameraAdapter/OMXFocus.cpp
index 50e2c21..be1dfc5 100644
--- a/camera/OMXCameraAdapter/OMXFocus.cpp
+++ b/camera/OMXCameraAdapter/OMXFocus.cpp
@@ -148,9 +148,10 @@
         }
     }
 
-    if ( (focusControl.eFocusControl == OMX_IMAGE_FocusControlAuto
-            && (focusStatus.eFocusStatus == OMX_FocusStatusRequest
-             || focusStatus.eFocusStatus == OMX_FocusStatusUnableToReach) ) ||
+    if ( (focusControl.eFocusControl == OMX_IMAGE_FocusControlAuto &&
+         ( focusStatus.eFocusStatus == OMX_FocusStatusRequest ||
+           focusStatus.eFocusStatus == OMX_FocusStatusUnableToReach ||
+           focusStatus.eFocusStatus == OMX_FocusStatusLost ) ) ||
             (mParameters3A.Focus !=  (OMX_IMAGE_FOCUSCONTROLTYPE)OMX_IMAGE_FocusControlAuto) )
         {
         OMX_INIT_STRUCT_PTR (&bOMX, OMX_CONFIG_BOOLEANTYPE);
@@ -163,11 +164,11 @@
 
         // force AF, Ducati will take care of whether CAF
         // or AF will be performed, depending on light conditions
-        if ( focusControl.eFocusControl == OMX_IMAGE_FocusControlAuto
-		&& focusStatus.eFocusStatus == OMX_FocusStatusUnableToReach )
-			{
-			focusControl.eFocusControl = OMX_IMAGE_FocusControlAutoLock;
-			}
+        if ( focusControl.eFocusControl == OMX_IMAGE_FocusControlAuto &&
+             ( focusStatus.eFocusStatus == OMX_FocusStatusUnableToReach ||
+               focusStatus.eFocusStatus == OMX_FocusStatusLost ) ) {
+            focusControl.eFocusControl = OMX_IMAGE_FocusControlAutoLock;
+        }
 
         if ( focusControl.eFocusControl != OMX_IMAGE_FocusControlAuto )
             {