QCamera2: Adds FPS range adjustment based on thermal events

- Four thermal levels are accepted currently. The first will
  reset the fps range to its original state configured by the client.
  The second halves the maximum FPS. The third will set the maximum
  FPS to the minimum and the fourth will switch the range to lowest
  supported by the camera.

Change-Id: I1eb3950b71cf0536daae66147d70f1c6702336fa
diff --git a/QCamera2/HAL/QCameraStateMachine.cpp b/QCamera2/HAL/QCameraStateMachine.cpp
index daa6c6e..8bc0ede 100644
--- a/QCamera2/HAL/QCameraStateMachine.cpp
+++ b/QCamera2/HAL/QCameraStateMachine.cpp
@@ -1061,7 +1061,9 @@
         }
         break;
     case QCAMERA_SM_EVT_THERMAL_NOTIFY:
-        //TODO: Adjust FPS.
+        {
+            rc = m_parent->updateThermalFPS((cam_fps_range_t *) payload);
+        }
         break;
     case QCAMERA_SM_EVT_JPEG_EVT_NOTIFY:
     case QCAMERA_SM_EVT_SNAPSHOT_DONE:
@@ -1604,7 +1606,9 @@
         }
         break;
     case QCAMERA_SM_EVT_THERMAL_NOTIFY:
-        //TODO: Adjust FPS
+        {
+            rc = m_parent->updateThermalFPS((cam_fps_range_t *) payload);
+        }
         break;
     case QCAMERA_SM_EVT_JPEG_EVT_NOTIFY:
     case QCAMERA_SM_EVT_SNAPSHOT_DONE:
@@ -1885,7 +1889,9 @@
         }
         break;
     case QCAMERA_SM_EVT_THERMAL_NOTIFY:
-        //TODO: Adjust FPS.
+        {
+            rc = m_parent->updateThermalFPS((cam_fps_range_t *) payload);
+        }
         break;
     default:
         ALOGE("%s: cannot handle evt(%d) in state(%d)", __func__, evt, m_state);
@@ -2180,7 +2186,9 @@
         }
         break;
     case QCAMERA_SM_EVT_THERMAL_NOTIFY:
-        //TODO: Adjust FPS
+        {
+            rc = m_parent->updateThermalFPS((cam_fps_range_t *) payload);
+        }
         break;
     default:
         ALOGE("%s: cannot handle evt(%d) in state(%d)", __func__, evt, m_state);