Revert fixed focus area in CAF mode

  Bug: 9306098

This doesn't set the faces as focus/exp areas yet, but resets the focus area to null
in CAF mode to let the HAL decide focus/exp area.

Cherrypick of Bryce CL into Carlsbad.

Change-Id: I38e31937f64ecdb23d6c79f96040c46652d1d7d0

Conflicts:
	src/com/android/camera/FocusOverlayManager.java
diff --git a/src/com/android/camera/FocusOverlayManager.java b/src/com/android/camera/FocusOverlayManager.java
index f382a2a..7973162 100644
--- a/src/com/android/camera/FocusOverlayManager.java
+++ b/src/com/android/camera/FocusOverlayManager.java
@@ -89,7 +89,6 @@
     private Handler mHandler;
     Listener mListener;
     private boolean mPreviousMoving;
-    private boolean mFocusDefault;
 
     private FocusUI mUI;
     private final Rect mPreviewRect = new Rect(0, 0, 0, 0);
@@ -141,7 +140,6 @@
         setParameters(parameters);
         mListener = listener;
         setMirror(mirror);
-        mFocusDefault = true;
         mUI = ui;
     }
 
@@ -291,7 +289,7 @@
             updateFocusUI();
             // If this is triggered by touch focus, cancel focus after a
             // while.
-            if (!mFocusDefault) {
+            if (mFocusArea != null) {
                 mHandler.sendEmptyMessageDelayed(RESET_TOUCH_FOCUS, RESET_TOUCH_FOCUS_DELAY);
             }
             if (shutterButtonPressed) {
@@ -362,12 +360,12 @@
                 UsageStatistics.ACTION_TOUCH_FOCUS, x + "," + y);
 
         // Let users be able to cancel previous touch focus.
-        if ((!mFocusDefault) && (mState == STATE_FOCUSING ||
+        if ((mFocusArea != null) && (mState == STATE_FOCUSING ||
                     mState == STATE_SUCCESS || mState == STATE_FAIL)) {
             cancelAutoFocus();
         }
         if (mPreviewRect.width() == 0 || mPreviewRect.height() == 0) return;
-        mFocusDefault = false;
+        // Initialize variables.
         // Initialize mFocusArea.
         if (mFocusAreaSupported) {
             initializeFocusAreas(x, y);
@@ -447,7 +445,7 @@
         if (mParameters == null) return Parameters.FOCUS_MODE_AUTO;
         List<String> supportedFocusModes = mParameters.getSupportedFocusModes();
 
-        if (mFocusAreaSupported && !mFocusDefault) {
+        if (mFocusAreaSupported && mFocusArea != null) {
             // Always use autofocus in tap-to-focus.
             mFocusMode = Parameters.FOCUS_MODE_AUTO;
         } else {
@@ -492,7 +490,7 @@
         // Show only focus indicator or face indicator.
 
         if (mState == STATE_IDLE) {
-            if (mFocusDefault) {
+            if (mFocusArea == null) {
                 mUI.clearFocus();
             } else {
                 // Users touch on the preview and the indicator represents the
@@ -520,14 +518,8 @@
         // Put focus indicator to the center. clear reset position
         mUI.clearFocus();
         // Initialize mFocusArea.
-        if (mFocusAreaSupported) {
-            initializeFocusAreas(mPreviewRect.centerX(), mPreviewRect.centerY());
-        }
-        // Reset metering area when no specific region is selected.
-        if (mMeteringAreaSupported) {
-            resetMeteringAreas();
-        }
-        mFocusDefault = true;
+        mFocusArea = null;
+        mMeteringArea = null;
     }
 
     private void calculateTapArea(int x, int y, float areaMultiple, Rect rect) {