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

Commit 36595687 authored by Dan Albert's avatar Dan Albert
Browse files

Correct "introduced" version for inline API.

Inlines don't actually have an "introduced" API level since they're
not a part of the system image. Typically they should haven't any
`__INTRODUCED_IN()` annotation (the one that was here unhelpfully
prevents app developers from calling this otherwise available API
until API 34), but in this case the API forwards to an out-of-line API
which was added in API 31, so we mirror that as recommended by
https://developer.android.com/ndk/guides/using-newer-apis#avoiding_repetition_of_api_guards.

Bug: None
Test: treehugger
Change-Id: I80edc4cf2f0f46c14f057fd3c1f4a222646bd15a
parent 1750d7f8
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -366,14 +366,13 @@ int32_t ANativeWindow_setFrameRateWithChangeStrategy(ANativeWindow* window, floa
 *
 * See ANativeWindow_setFrameRateWithChangeStrategy().
 *
 * Available since API level 34.
 * Available since API level 31.
 *
 * \param window pointer to an ANativeWindow object.
 *
 * \return 0 for success, -EINVAL if the window value is invalid.
 */
inline int32_t ANativeWindow_clearFrameRate(ANativeWindow* window)
        __INTRODUCED_IN(__ANDROID_API_U__) {
inline int32_t ANativeWindow_clearFrameRate(ANativeWindow* window) __INTRODUCED_IN(31) {
    return ANativeWindow_setFrameRateWithChangeStrategy(window, 0,
            ANATIVEWINDOW_FRAME_RATE_COMPATIBILITY_DEFAULT,
            ANATIVEWINDOW_CHANGE_FRAME_RATE_ONLY_IF_SEAMLESS);