Add plumbing for upcoming setFrameRate() api

Add plumbing from the app to surface flinger for the
ANativeWindow_setFrameRate() and ASurfaceTransaction_setFrameRate() api
calls we'll be adding soon.

We don't do anything in surface flinger with this data yet.

Bug: 143912624

Test: Added a new test, SetFrameRateTest.
Change-Id: I1cab87f3ce5afca4591a39d8e7a42cb1e86a368f
diff --git a/libs/gui/BufferQueueProducer.cpp b/libs/gui/BufferQueueProducer.cpp
index e6df757..6b11a54 100644
--- a/libs/gui/BufferQueueProducer.cpp
+++ b/libs/gui/BufferQueueProducer.cpp
@@ -1670,4 +1670,14 @@
     return NO_ERROR;
 }
 
+status_t BufferQueueProducer::setFrameRate(float frameRate) {
+    ATRACE_CALL();
+    BQ_LOGV("setFrameRate: %.0f", frameRate);
+
+    std::lock_guard<std::mutex> lock(mCore->mMutex);
+
+    mCore->mFrameRate = frameRate;
+    return NO_ERROR;
+}
+
 } // namespace android