Return NO_ERROR for setFrameRate

We were returning BAD_VALUE for this function and in old code because
of some dead code we though BAD_VALUE is correct but the result should be NO_ERROR

Note: This code is not used in the framework.

BUG: 229965137
Test: Test with the ExoPlayer demo app. and with
https: //b.corp.google.com/issues/229965137#comment11
Change-Id: I6c1eb31c71057be1c755b0ab0fe63850e40e99ca
diff --git a/libs/gui/Surface.cpp b/libs/gui/Surface.cpp
index 7a2615f..e8aac2f 100644
--- a/libs/gui/Surface.cpp
+++ b/libs/gui/Surface.cpp
@@ -2627,12 +2627,13 @@
     mSurfaceListener->onBuffersDiscarded(discardedBufs);
 }
 
-status_t Surface::setFrameRate(float /*frameRate*/, int8_t /*compatibility*/,
-                               int8_t /*changeFrameRateStrategy*/) {
-    ATRACE_CALL();
-    ALOGV("Surface::setFrameRate");
-    // ISurfaceComposer no longer supports setFrameRate
-    return BAD_VALUE;
+[[deprecated]] status_t Surface::setFrameRate(float /*frameRate*/, int8_t /*compatibility*/,
+                                              int8_t /*changeFrameRateStrategy*/) {
+    ALOGI("Surface::setFrameRate is deprecated, setFrameRate hint is dropped as destination is not "
+          "SurfaceFlinger");
+    // ISurfaceComposer no longer supports setFrameRate, we will return NO_ERROR when the api is
+    // called to avoid apps crashing, as BAD_VALUE can generate fatal exception in apps.
+    return NO_ERROR;
 }
 
 status_t Surface::setFrameTimelineInfo(const FrameTimelineInfo& /*frameTimelineInfo*/) {