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/LayerState.cpp b/libs/gui/LayerState.cpp
index 8b448ff..39b4d4b 100644
--- a/libs/gui/LayerState.cpp
+++ b/libs/gui/LayerState.cpp
@@ -110,9 +110,8 @@
         }
     }
     output.writeFloat(shadowRadius);
-
     output.writeInt32(frameRateSelectionPriority);
-
+    output.writeFloat(frameRate);
     return NO_ERROR;
 }
 
@@ -191,9 +190,8 @@
         listeners.emplace_back(listener, callbackIds);
     }
     shadowRadius = input.readFloat();
-
     frameRateSelectionPriority = input.readInt32();
-
+    frameRate = input.readFloat();
     return NO_ERROR;
 }
 
@@ -420,6 +418,10 @@
         what |= eFrameRateSelectionPriority;
         frameRateSelectionPriority = other.frameRateSelectionPriority;
     }
+    if (other.what & eFrameRateChanged) {
+        what |= eFrameRateChanged;
+        frameRate = other.frameRate;
+    }
     if ((other.what & what) != other.what) {
         ALOGE("Unmerged SurfaceComposer Transaction properties. LayerState::merge needs updating? "
               "other.what=0x%" PRIu64 " what=0x%" PRIu64,