Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8ac14eb6 authored by ramindani's avatar ramindani
Browse files

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
parent a8312269
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -2627,12 +2627,13 @@ void Surface::ProducerListenerProxy::onBuffersDiscarded(const std::vector<int32_
    mSurfaceListener->onBuffersDiscarded(discardedBufs);
}

status_t Surface::setFrameRate(float /*frameRate*/, int8_t /*compatibility*/,
[[deprecated]] 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;
    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*/) {