diff options
-rw-r--r-- | include/android/bitmap.h | 8 | ||||
-rw-r--r-- | include/android/choreographer.h | 11 | ||||
-rw-r--r-- | include/android/configuration.h | 4 | ||||
-rw-r--r-- | include/android/font.h | 4 | ||||
-rw-r--r-- | include/android/font_matcher.h | 4 | ||||
-rw-r--r-- | include/android/imagedecoder.h | 32 | ||||
-rw-r--r-- | include/android/multinetwork.h | 8 | ||||
-rw-r--r-- | include/android/native_window_jni.h | 2 | ||||
-rw-r--r-- | include/android/sensor.h | 27 | ||||
-rw-r--r-- | include/android/sharedmem.h | 4 | ||||
-rw-r--r-- | include/android/sharedmem_jni.h | 4 | ||||
-rw-r--r-- | include/android/surface_control.h | 11 | ||||
-rw-r--r-- | include/android/surface_texture.h | 4 | ||||
-rw-r--r-- | include/android/surface_texture_jni.h | 4 | ||||
-rw-r--r-- | include/android/system_fonts.h | 4 | ||||
-rw-r--r-- | include/android/trace.h | 8 | ||||
-rw-r--r-- | libs/nativewindow/include/android/hardware_buffer.h | 11 | ||||
-rw-r--r-- | libs/nativewindow/include/android/native_window.h | 18 |
18 files changed, 9 insertions, 159 deletions
diff --git a/include/android/bitmap.h b/include/android/bitmap.h index d7f25e1858..2362c9e491 100644 --- a/include/android/bitmap.h +++ b/include/android/bitmap.h @@ -132,8 +132,6 @@ typedef struct { int AndroidBitmap_getInfo(JNIEnv* env, jobject jbitmap, AndroidBitmapInfo* info); -#if __ANDROID_API__ >= 30 - /** * Given a java bitmap object, return its {@link ADataSpace}. * @@ -145,8 +143,6 @@ int AndroidBitmap_getInfo(JNIEnv* env, jobject jbitmap, */ int32_t AndroidBitmap_getDataSpace(JNIEnv* env, jobject jbitmap) __INTRODUCED_IN(30); -#endif // __ANDROID_API__ >= 30 - /** * Given a java bitmap object, attempt to lock the pixel address. * Locking will ensure that the memory for the pixels will not move @@ -216,8 +212,6 @@ typedef bool (*AndroidBitmap_CompressWriteFunc)(void* userContext, const void* data, size_t size) __INTRODUCED_IN(30); -#if __ANDROID_API__ >= 30 - /** * Compress |pixels| as described by |info|. * @@ -269,8 +263,6 @@ typedef struct AHardwareBuffer AHardwareBuffer; int AndroidBitmap_getHardwareBuffer(JNIEnv* env, jobject bitmap, AHardwareBuffer** outBuffer) __INTRODUCED_IN(30); -#endif // __ANDROID_API__ >= 30 - #ifdef __cplusplus } #endif diff --git a/include/android/choreographer.h b/include/android/choreographer.h index e9f559cd8e..8039bb0d79 100644 --- a/include/android/choreographer.h +++ b/include/android/choreographer.h @@ -61,8 +61,6 @@ typedef void (*AChoreographer_frameCallback64)(int64_t frameTimeNanos, void* dat */ typedef void (*AChoreographer_refreshRateCallback)(int64_t vsyncPeriodNanos, void* data); -#if __ANDROID_API__ >= 24 - /** * Get the AChoreographer instance for the current thread. This must be called * on an ALooper thread. @@ -86,10 +84,6 @@ void AChoreographer_postFrameCallbackDelayed(AChoreographer* choreographer, long delayMillis) __INTRODUCED_IN(24) __DEPRECATED_IN(29); -#endif /* __ANDROID_API__ >= 24 */ - -#if __ANDROID_API__ >= 29 - /** * Power a callback to be run on the next frame. The data pointer provided will * be passed to the callback function when it's called. @@ -111,10 +105,6 @@ void AChoreographer_postFrameCallbackDelayed64(AChoreographer* choreographer, AChoreographer_frameCallback64 callback, void* data, uint32_t delayMillis) __INTRODUCED_IN(29); -#endif /* __ANDROID_API__ >= 29 */ - -#if __ANDROID_API__ >= 30 - /** * Registers a callback to be run when the display refresh rate changes. The * data pointer provided will be passed to the callback function when it's @@ -160,7 +150,6 @@ void AChoreographer_registerRefreshRateCallback(AChoreographer* choreographer, void AChoreographer_unregisterRefreshRateCallback(AChoreographer* choreographer, AChoreographer_refreshRateCallback, void* data) __INTRODUCED_IN(30); -#endif /* __ANDROID_API__ >= 30 */ __END_DECLS diff --git a/include/android/configuration.h b/include/android/configuration.h index ccf3e59066..88019ae054 100644 --- a/include/android/configuration.h +++ b/include/android/configuration.h @@ -645,14 +645,12 @@ int32_t AConfiguration_getScreenLong(AConfiguration* config); */ void AConfiguration_setScreenLong(AConfiguration* config, int32_t screenLong); -#if __ANDROID_API__ >= 30 /** * Return the current ACONFIGURATION_SCREENROUND_* set in the configuration. * * Available since API level 30. */ int32_t AConfiguration_getScreenRound(AConfiguration* config) __INTRODUCED_IN(30); -#endif /** * Set the current screen round in the configuration. @@ -712,7 +710,6 @@ int32_t AConfiguration_getSmallestScreenWidthDp(AConfiguration* config); */ void AConfiguration_setSmallestScreenWidthDp(AConfiguration* config, int32_t value); -#if __ANDROID_API__ >= 17 /** * Return the configuration's layout direction, or * ACONFIGURATION_LAYOUTDIR_ANY if not set. @@ -727,7 +724,6 @@ int32_t AConfiguration_getLayoutDirection(AConfiguration* config) __INTRODUCED_I * Available since API level 17. */ void AConfiguration_setLayoutDirection(AConfiguration* config, int32_t value) __INTRODUCED_IN(17); -#endif /* __ANDROID_API__ >= 17 */ /** * Perform a diff between two configurations. Returns a bit mask of diff --git a/include/android/font.h b/include/android/font.h index 1618096d69..a172618829 100644 --- a/include/android/font.h +++ b/include/android/font.h @@ -51,8 +51,6 @@ __BEGIN_DECLS -#if __ANDROID_API__ >= 29 - enum { /** The minimum value fot the font weight value. */ AFONT_WEIGHT_MIN = 0, @@ -297,8 +295,6 @@ uint32_t AFont_getAxisTag(const AFont* _Nonnull font, uint32_t axisIndex) float AFont_getAxisValue(const AFont* _Nonnull font, uint32_t axisIndex) __INTRODUCED_IN(29); -#endif // __ANDROID_API__ >= 29 - __END_DECLS #endif // ANDROID_FONT_H diff --git a/include/android/font_matcher.h b/include/android/font_matcher.h index d4bd892bf6..49e478c2f3 100644 --- a/include/android/font_matcher.h +++ b/include/android/font_matcher.h @@ -97,8 +97,6 @@ __BEGIN_DECLS -#if __ANDROID_API__ >= 29 - enum { /** A family variant value for the system default variant. */ AFAMILY_VARIANT_DEFAULT = 0, @@ -217,8 +215,6 @@ AFont* _Nonnull AFontMatcher_match( const uint32_t textLength, uint32_t* _Nullable runLengthOut) __INTRODUCED_IN(29); -#endif // __ANDROID_API__ >= 29 - __END_DECLS #endif // ANDROID_FONT_MATCHER_H diff --git a/include/android/imagedecoder.h b/include/android/imagedecoder.h index c7a8939766..819a6a4c1f 100644 --- a/include/android/imagedecoder.h +++ b/include/android/imagedecoder.h @@ -139,8 +139,6 @@ enum { ANDROID_IMAGE_DECODER_INVALID_STATE = -11, }; -#if __ANDROID_API__ >= 31 - /** * Return a constant string value representing the error code. * @@ -155,8 +153,6 @@ enum { */ const char* _Nullable AImageDecoder_resultToString(int)__INTRODUCED_IN(31); -#endif // __ANDROID_API__ >= 31 - struct AImageDecoder; /** @@ -179,8 +175,6 @@ struct AImageDecoder; */ typedef struct AImageDecoder AImageDecoder; -#if __ANDROID_API__ >= 30 - /** * Create a new {@link AImageDecoder} from an {@link AAsset}. * @@ -469,8 +463,6 @@ int AImageDecoder_computeSampledSize(const AImageDecoder* _Nonnull decoder, int */ int AImageDecoder_setCrop(AImageDecoder* _Nonnull decoder, ARect crop) __INTRODUCED_IN(30); -#endif // __ANDROID_API__ >= 30 - struct AImageDecoderHeaderInfo; /** * Opaque handle for representing information about the encoded image. @@ -483,8 +475,6 @@ struct AImageDecoderHeaderInfo; */ typedef struct AImageDecoderHeaderInfo AImageDecoderHeaderInfo; -#if __ANDROID_API__ >= 30 - /** * Return an opaque handle for reading header info. * @@ -672,10 +662,6 @@ int AImageDecoder_decodeImage(AImageDecoder* _Nonnull decoder, void* _Nonnull pixels, size_t stride, size_t size) __INTRODUCED_IN(30); -#endif // __ANDROID_API__ >= 30 - -#if __ANDROID_API__ >= 31 - /** * Return true iff the image is animated - i.e. has multiple frames. * @@ -690,8 +676,6 @@ int AImageDecoder_decodeImage(AImageDecoder* _Nonnull decoder, bool AImageDecoder_isAnimated(AImageDecoder* _Nonnull decoder) __INTRODUCED_IN(31); -#endif // __ANDROID_API__ >= 31 - enum { /* * Reported by {@link AImageDecoder_getRepeatCount} if the @@ -702,8 +686,6 @@ enum { ANDROID_IMAGE_DECODER_INFINITE = INT32_MAX, }; -#if __ANDROID_API__ >= 31 - /** * Report how many times the animation should repeat. * @@ -793,8 +775,6 @@ int AImageDecoder_advanceFrame(AImageDecoder* _Nonnull decoder) int AImageDecoder_rewind(AImageDecoder* _Nonnull decoder) __INTRODUCED_IN(31); -#endif // __ANDROID_API__ >= 31 - struct AImageDecoderFrameInfo; /** @@ -810,8 +790,6 @@ struct AImageDecoderFrameInfo; */ typedef struct AImageDecoderFrameInfo AImageDecoderFrameInfo; -#if __ANDROID_API__ >= 31 - /** * Create an uninitialized AImageDecoderFrameInfo. * @@ -922,8 +900,6 @@ ARect AImageDecoderFrameInfo_getFrameRect( bool AImageDecoderFrameInfo_hasAlphaWithinBounds( const AImageDecoderFrameInfo* _Nonnull info) __INTRODUCED_IN(31); -#endif // __ANDROID_API__ >= 31 - /** * How a frame is “disposed” before showing the next one. * @@ -947,8 +923,6 @@ enum { ANDROID_IMAGE_DECODER_DISPOSE_OP_PREVIOUS = 3, }; -#if __ANDROID_API__ >= 31 - /** * Return how this frame is “disposed” before showing the next one. * @@ -969,8 +943,6 @@ enum { int32_t AImageDecoderFrameInfo_getDisposeOp( const AImageDecoderFrameInfo* _Nonnull info) __INTRODUCED_IN(31); -#endif // __ANDROID_API__ >= 31 - /** * How a frame is blended with the previous frame. * @@ -989,8 +961,6 @@ enum { ANDROID_IMAGE_DECODER_BLEND_OP_SRC_OVER = 2, }; -#if __ANDROID_API__ >= 31 - /** * Return how this frame is blended with the previous frame. * @@ -1047,8 +1017,6 @@ void AImageDecoder_setInternallyHandleDisposePrevious( __INTRODUCED_IN(31); -#endif // __ANDROID_API__ >= 31 - #ifdef __cplusplus } #endif diff --git a/include/android/multinetwork.h b/include/android/multinetwork.h index c6d1c94c0a..424299d664 100644 --- a/include/android/multinetwork.h +++ b/include/android/multinetwork.h @@ -60,8 +60,6 @@ typedef uint64_t net_handle_t; * on failure with an appropriate errno value set. */ -#if __ANDROID_API__ >= 23 - /** * Set the network to be used by the given socket file descriptor. * @@ -111,10 +109,6 @@ int android_getaddrinfofornetwork(net_handle_t network, const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res) __INTRODUCED_IN(23); -#endif /* __ANDROID_API__ >= 23 */ - -#if __ANDROID_API__ >= 29 - /** * Possible values of the flags argument to android_res_nsend and android_res_nquery. * Values are ORed together. @@ -187,8 +181,6 @@ int android_res_nresult(int fd, */ void android_res_cancel(int nsend_fd) __INTRODUCED_IN(29); -#endif /* __ANDROID_API__ >= 29 */ - __END_DECLS #endif // ANDROID_MULTINETWORK_H diff --git a/include/android/native_window_jni.h b/include/android/native_window_jni.h index 3a77ffe86b..071ec798b4 100644 --- a/include/android/native_window_jni.h +++ b/include/android/native_window_jni.h @@ -44,7 +44,6 @@ extern "C" { */ ANativeWindow* ANativeWindow_fromSurface(JNIEnv* env, jobject surface); -#if __ANDROID_API__ >= 26 /** * Return a Java Surface object derived from the ANativeWindow, for interacting * with it through Java code. The returned Java object acquires a reference on @@ -55,7 +54,6 @@ ANativeWindow* ANativeWindow_fromSurface(JNIEnv* env, jobject surface); * Available since API level 26. */ jobject ANativeWindow_toSurface(JNIEnv* env, ANativeWindow* window) __INTRODUCED_IN(26); -#endif #ifdef __cplusplus }; diff --git a/include/android/sensor.h b/include/android/sensor.h index eb407794d1..6447844b06 100644 --- a/include/android/sensor.h +++ b/include/android/sensor.h @@ -52,6 +52,13 @@ #include <math.h> #include <stdint.h> +#if !defined(__INTRODUCED_IN) +#define __INTRODUCED_IN(__api_level) /* nothing */ +#endif +#if !defined(__DEPRECATED_IN) +#define __DEPRECATED_IN(__api_level) __attribute__((__deprecated__)) +#endif + #ifdef __cplusplus extern "C" { #endif @@ -553,13 +560,8 @@ typedef ASensorRef const* ASensorList; * ASensorManager* sensorManager = ASensorManager_getInstance(); * */ -#if __ANDROID_API__ >= 26 -__attribute__ ((deprecated)) ASensorManager* ASensorManager_getInstance(); -#else -ASensorManager* ASensorManager_getInstance(); -#endif +ASensorManager* ASensorManager_getInstance() __DEPRECATED_IN(26); -#if __ANDROID_API__ >= 26 /** * Get a reference to the sensor manager. ASensorManager is a singleton * per package as different packages may have access to different sensors. @@ -571,7 +573,6 @@ ASensorManager* ASensorManager_getInstance(); * Available since API level 26. */ ASensorManager* ASensorManager_getInstanceForPackage(const char* packageName) __INTRODUCED_IN(26); -#endif /** * Returns the list of available sensors. @@ -584,7 +585,6 @@ int ASensorManager_getSensorList(ASensorManager* manager, ASensorList* list); */ ASensor const* ASensorManager_getDefaultSensor(ASensorManager* manager, int type); -#if __ANDROID_API__ >= 21 /** * Returns the default sensor with the given type and wakeUp properties or NULL if no sensor * of this type and wakeUp properties exists. @@ -592,7 +592,6 @@ ASensor const* ASensorManager_getDefaultSensor(ASensorManager* manager, int type * Available since API level 21. */ ASensor const* ASensorManager_getDefaultSensorEx(ASensorManager* manager, int type, bool wakeUp) __INTRODUCED_IN(21); -#endif /** * Creates a new sensor event queue and associate it with a looper. @@ -609,7 +608,6 @@ ASensorEventQueue* ASensorManager_createEventQueue(ASensorManager* manager, */ int ASensorManager_destroyEventQueue(ASensorManager* manager, ASensorEventQueue* queue); -#if __ANDROID_API__ >= 26 /** * Create direct channel based on shared memory * @@ -706,7 +704,6 @@ void ASensorManager_destroyDirectChannel(ASensorManager* manager, int channelId) */ int ASensorManager_configureDirectReport(ASensorManager* manager, ASensor const* sensor, int channelId, int rate) __INTRODUCED_IN(26); -#endif /* __ANDROID_API__ >= 26 */ /*****************************************************************************/ @@ -795,7 +792,6 @@ int ASensorEventQueue_hasEvents(ASensorEventQueue* queue); */ ssize_t ASensorEventQueue_getEvents(ASensorEventQueue* queue, ASensorEvent* events, size_t count); -#if __ANDROID_API__ >= 29 /** * Request that {@link ASENSOR_TYPE_ADDITIONAL_INFO} events to be delivered on * the given {@link ASensorEventQueue}. @@ -819,7 +815,6 @@ ssize_t ASensorEventQueue_getEvents(ASensorEventQueue* queue, ASensorEvent* even * \return 0 on success or a negative error code on failure */ int ASensorEventQueue_requestAdditionalInfoEvents(ASensorEventQueue* queue, bool enable) __INTRODUCED_IN(29); -#endif /* __ANDROID_API__ >= 29 */ /*****************************************************************************/ @@ -850,7 +845,6 @@ float ASensor_getResolution(ASensor const* sensor); */ int ASensor_getMinDelay(ASensor const* sensor); -#if __ANDROID_API__ >= 21 /** * Returns the maximum size of batches for this sensor. Batches will often be * smaller, as the hardware fifo might be used for other sensors. @@ -886,9 +880,7 @@ int ASensor_getReportingMode(ASensor const* sensor) __INTRODUCED_IN(21); * Available since API level 21. */ bool ASensor_isWakeUpSensor(ASensor const* sensor) __INTRODUCED_IN(21); -#endif /* __ANDROID_API__ >= 21 */ -#if __ANDROID_API__ >= 26 /** * Test if sensor supports a certain type of direct channel. * @@ -914,9 +906,7 @@ bool ASensor_isDirectChannelTypeSupported(ASensor const* sensor, int channelType * does not support direct report. */ int ASensor_getHighestDirectReportRateLevel(ASensor const* sensor) __INTRODUCED_IN(26); -#endif /* __ANDROID_API__ >= 26 */ -#if __ANDROID_API__ >= 29 /** * Returns the sensor's handle. * @@ -934,7 +924,6 @@ int ASensor_getHighestDirectReportRateLevel(ASensor const* sensor) __INTRODUCED_ * Available since API level 29. */ int ASensor_getHandle(ASensor const* sensor) __INTRODUCED_IN(29); -#endif /* __ANDROID_API__ >= 29 */ #ifdef __cplusplus }; diff --git a/include/android/sharedmem.h b/include/android/sharedmem.h index 5f74682b40..7994aa9914 100644 --- a/include/android/sharedmem.h +++ b/include/android/sharedmem.h @@ -50,8 +50,6 @@ extern "C" { #endif -#if __ANDROID_API__ >= 26 - /** * Create a shared memory region. * @@ -121,8 +119,6 @@ size_t ASharedMemory_getSize(int fd) __INTRODUCED_IN(26); */ int ASharedMemory_setProt(int fd, int prot) __INTRODUCED_IN(26); -#endif // __ANDROID_API__ >= 26 - #ifdef __cplusplus }; #endif diff --git a/include/android/sharedmem_jni.h b/include/android/sharedmem_jni.h index 13e56e6f09..bbac785a33 100644 --- a/include/android/sharedmem_jni.h +++ b/include/android/sharedmem_jni.h @@ -52,8 +52,6 @@ extern "C" { #endif -#if __ANDROID_API__ >= 27 - /** * Returns a dup'd FD from the given Java android.os.SharedMemory object. The returned file * descriptor has all the same properties & capabilities as the FD returned from @@ -72,8 +70,6 @@ extern "C" { */ int ASharedMemory_dupFromJava(JNIEnv* env, jobject sharedMemory) __INTRODUCED_IN(27); -#endif // __ANDROID_API__ >= 27 - #ifdef __cplusplus }; #endif diff --git a/include/android/surface_control.h b/include/android/surface_control.h index 7a7424833b..98fd875968 100644 --- a/include/android/surface_control.h +++ b/include/android/surface_control.h @@ -35,8 +35,6 @@ __BEGIN_DECLS -#if __ANDROID_API__ >= 29 - struct ASurfaceControl; /** @@ -409,10 +407,6 @@ void ASurfaceTransaction_setHdrMetadata_cta861_3(ASurfaceTransaction* transactio struct AHdrMetadata_cta861_3* metadata) __INTRODUCED_IN(29); -#endif // __ANDROID_API__ >= 29 - -#if __ANDROID_API__ >= 30 - /** * Same as ASurfaceTransaction_setFrameRateWithSeamlessness(transaction, surface_control, * frameRate, compatibility, true). @@ -425,10 +419,6 @@ void ASurfaceTransaction_setFrameRate(ASurfaceTransaction* transaction, ASurfaceControl* surface_control, float frameRate, int8_t compatibility) __INTRODUCED_IN(30); -#endif // __ANDROID_API__ >= 30 - -#if __ANDROID_API__ >= 31 - /** * Sets the intended frame rate for \a surface_control. * @@ -462,7 +452,6 @@ void ASurfaceTransaction_setFrameRateWithSeamlessness(ASurfaceTransaction* trans int8_t compatibility, bool shouldBeSeamless) __INTRODUCED_IN(31); -#endif // __ANDROID_API__ >= 31 __END_DECLS #endif // ANDROID_SURFACE_CONTROL_H diff --git a/include/android/surface_texture.h b/include/android/surface_texture.h index dde7eaa0b6..b227b324f8 100644 --- a/include/android/surface_texture.h +++ b/include/android/surface_texture.h @@ -59,8 +59,6 @@ struct ASurfaceTexture; */ typedef struct ASurfaceTexture ASurfaceTexture; -#if __ANDROID_API__ >= 28 - /** * Release the reference to the native ASurfaceTexture acquired with * ASurfaceTexture_fromSurfaceTexture(). @@ -175,8 +173,6 @@ void ASurfaceTexture_getTransformMatrix(ASurfaceTexture* st, float mtx[16]) __IN */ int64_t ASurfaceTexture_getTimestamp(ASurfaceTexture* st) __INTRODUCED_IN(28); -#endif /* __ANDROID_API__ >= 28 */ - __END_DECLS #endif /* ANDROID_NATIVE_SURFACE_TEXTURE_H */ diff --git a/include/android/surface_texture_jni.h b/include/android/surface_texture_jni.h index 2266d541f6..e40686d96c 100644 --- a/include/android/surface_texture_jni.h +++ b/include/android/surface_texture_jni.h @@ -32,8 +32,6 @@ __BEGIN_DECLS -#if __ANDROID_API__ >= 28 - /** * Get a reference to the native ASurfaceTexture from the corresponding java object. * @@ -52,8 +50,6 @@ __BEGIN_DECLS */ ASurfaceTexture* ASurfaceTexture_fromSurfaceTexture(JNIEnv* env, jobject surfacetexture) __INTRODUCED_IN(28); -#endif - __END_DECLS #endif /* ANDROID_NATIVE_SURFACE_TEXTURE_JNI_H */ diff --git a/include/android/system_fonts.h b/include/android/system_fonts.h index 6fd7d2c0ab..b0bbb954a9 100644 --- a/include/android/system_fonts.h +++ b/include/android/system_fonts.h @@ -87,8 +87,6 @@ __BEGIN_DECLS -#if __ANDROID_API__ >= 29 - /** * ASystemFontIterator provides access to the system font configuration. * @@ -128,8 +126,6 @@ void ASystemFontIterator_close(ASystemFontIterator* _Nullable iterator) __INTROD */ AFont* _Nullable ASystemFontIterator_next(ASystemFontIterator* _Nonnull iterator) __INTRODUCED_IN(29); -#endif // __ANDROID_API__ >= 29 - __END_DECLS #endif // ANDROID_SYSTEM_FONTS_H diff --git a/include/android/trace.h b/include/android/trace.h index dbad6f6f21..dcefffb20d 100644 --- a/include/android/trace.h +++ b/include/android/trace.h @@ -40,8 +40,6 @@ extern "C" { #endif -#if __ANDROID_API__ >= 23 - /** * Returns true if tracing is enabled. Use this to avoid expensive computation only necessary * when tracing is enabled. @@ -72,10 +70,6 @@ void ATrace_beginSection(const char* sectionName) __INTRODUCED_IN(23); */ void ATrace_endSection() __INTRODUCED_IN(23); -#endif /* __ANDROID_API__ >= 23 */ - -#if __ANDROID_API__ >= 29 - /** * Writes a trace message to indicate that a given section of code has * begun. Must be followed by a call to {@link ATrace_endAsyncSection} with the same @@ -112,8 +106,6 @@ void ATrace_endAsyncSection(const char* sectionName, int32_t cookie) __INTRODUCE */ void ATrace_setCounter(const char* counterName, int64_t counterValue) __INTRODUCED_IN(29); -#endif /* __ANDROID_API__ >= 29 */ - #ifdef __cplusplus } #endif diff --git a/libs/nativewindow/include/android/hardware_buffer.h b/libs/nativewindow/include/android/hardware_buffer.h index 4fcca9e1d3..6ecb83ae0d 100644 --- a/libs/nativewindow/include/android/hardware_buffer.h +++ b/libs/nativewindow/include/android/hardware_buffer.h @@ -334,8 +334,6 @@ typedef struct AHardwareBuffer AHardwareBuffer; // clang-format on -#if __ANDROID_API__ >= 26 - /** * Allocates a buffer that matches the passed AHardwareBuffer_Desc. * @@ -478,10 +476,6 @@ int AHardwareBuffer_recvHandleFromUnixSocket(int socketFd, AHardwareBuffer* _Nullable* _Nonnull outBuffer) __INTRODUCED_IN(26); -#endif // __ANDROID_API__ >= 26 - -#if __ANDROID_API__ >= 29 - /** * Lock a potentially multi-planar AHardwareBuffer for direct CPU access. * @@ -551,9 +545,6 @@ int AHardwareBuffer_lockAndGetInfo(AHardwareBuffer* _Nonnull buffer, uint64_t us int32_t* _Nonnull outBytesPerPixel, int32_t* _Nonnull outBytesPerStride) __INTRODUCED_IN(29); -#endif // __ANDROID_API__ >= 29 - -#if __ANDROID_API__ >= 31 /** * Get the system wide unique id for an AHardwareBuffer. @@ -566,8 +557,6 @@ int AHardwareBuffer_lockAndGetInfo(AHardwareBuffer* _Nonnull buffer, uint64_t us int AHardwareBuffer_getId(const AHardwareBuffer* _Nonnull buffer, uint64_t* _Nonnull outId) __INTRODUCED_IN(31); -#endif // __ANDROID_API__ >= 31 - __END_DECLS #endif // ANDROID_HARDWARE_BUFFER_H diff --git a/libs/nativewindow/include/android/native_window.h b/libs/nativewindow/include/android/native_window.h index deea59b9fb..285f2fb7fe 100644 --- a/libs/nativewindow/include/android/native_window.h +++ b/libs/nativewindow/include/android/native_window.h @@ -186,8 +186,6 @@ int32_t ANativeWindow_lock(ANativeWindow* window, ANativeWindow_Buffer* outBuffe */ int32_t ANativeWindow_unlockAndPost(ANativeWindow* window); -#if __ANDROID_API__ >= 26 - /** * Set a transform that will be applied to future buffers posted to the window. * @@ -198,10 +196,6 @@ int32_t ANativeWindow_unlockAndPost(ANativeWindow* window); */ int32_t ANativeWindow_setBuffersTransform(ANativeWindow* window, int32_t transform) __INTRODUCED_IN(26); -#endif // __ANDROID_API__ >= 26 - -#if __ANDROID_API__ >= 28 - /** * All buffers queued after this call will be associated with the dataSpace * parameter specified. @@ -230,10 +224,6 @@ int32_t ANativeWindow_setBuffersDataSpace(ANativeWindow* window, int32_t dataSpa */ int32_t ANativeWindow_getBuffersDataSpace(ANativeWindow* window) __INTRODUCED_IN(28); -#endif // __ANDROID_API__ >= 28 - -#if __ANDROID_API__ >= 30 - /** Compatibility value for ANativeWindow_setFrameRate. */ enum ANativeWindow_FrameRateCompatibility { /** @@ -275,11 +265,7 @@ int32_t ANativeWindow_setFrameRate(ANativeWindow* window, float frameRate, int8_ * * Available since API level 30. */ -void ANativeWindow_tryAllocateBuffers(ANativeWindow* window); - -#endif // __ANDROID_API__ >= 30 - -#if __ANDROID_API__ >= 31 +void ANativeWindow_tryAllocateBuffers(ANativeWindow* window) __INTRODUCED_IN(30); /** * Sets the intended frame rate for this window. @@ -322,8 +308,6 @@ void ANativeWindow_tryAllocateBuffers(ANativeWindow* window); int32_t ANativeWindow_setFrameRateWithSeamlessness(ANativeWindow* window, float frameRate, int8_t compatibility, bool shouldBeSeamless) __INTRODUCED_IN(31); -#endif // __ANDROID_API__ >= 31 - #ifdef __cplusplus }; #endif |