summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com>2024-05-03 23:58:38 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2024-05-03 23:58:38 +0000
commitcf2f81a874c0936222e3d570efc06e77ed4f3a01 (patch)
tree6bba50383139e1e233d2f01ed020fff83a4e4687
parentc2b543c1362ebb792240d3dddc0bd421abe6a6b2 (diff)
parentc47ac844d5e887f86a9a9b7a8d10aa2c26b79447 (diff)
downloadnative-cf2f81a874c0936222e3d570efc06e77ed4f3a01.tar.gz
Merge "Add deprecation message." into main
-rw-r--r--include/android/choreographer.h4
-rw-r--r--include/android/looper.h5
-rw-r--r--include/android/sensor.h5
3 files changed, 8 insertions, 6 deletions
diff --git a/include/android/choreographer.h b/include/android/choreographer.h
index f999708f04..c4d1ca65be 100644
--- a/include/android/choreographer.h
+++ b/include/android/choreographer.h
@@ -123,7 +123,7 @@ AChoreographer* AChoreographer_getInstance() __INTRODUCED_IN(24);
*/
void AChoreographer_postFrameCallback(AChoreographer* choreographer,
AChoreographer_frameCallback callback, void* data)
- __INTRODUCED_IN(24) __DEPRECATED_IN(29);
+ __INTRODUCED_IN(24) __DEPRECATED_IN(29, "Use AChoreographer_postFrameCallback64 instead");
/**
* Deprecated: Use AChoreographer_postFrameCallbackDelayed64 instead.
@@ -131,7 +131,7 @@ void AChoreographer_postFrameCallback(AChoreographer* choreographer,
void AChoreographer_postFrameCallbackDelayed(AChoreographer* choreographer,
AChoreographer_frameCallback callback, void* data,
long delayMillis) __INTRODUCED_IN(24)
- __DEPRECATED_IN(29);
+ __DEPRECATED_IN(29, "Use AChoreographer_postFrameCallbackDelayed64 instead");
/**
* Post a callback to be run on the next frame. The data pointer provided will
diff --git a/include/android/looper.h b/include/android/looper.h
index e50730d5c1..6a02916fb3 100644
--- a/include/android/looper.h
+++ b/include/android/looper.h
@@ -35,7 +35,7 @@ extern "C" {
// This file may also be built on glibc or on Windows/MacOS libc's, so
// deprecated definitions are provided.
#if !defined(__REMOVED_IN)
-#define __REMOVED_IN(__api_level) __attribute__((__deprecated__))
+#define __REMOVED_IN(__api_level, msg) __attribute__((__deprecated__(msg)))
#endif
struct ALooper;
@@ -213,7 +213,8 @@ int ALooper_pollOnce(int timeoutMillis, int* outFd, int* outEvents, void** outDa
* Removed in API 34 as ALooper_pollAll can swallow ALooper_wake calls.
* Use ALooper_pollOnce instead.
*/
-int ALooper_pollAll(int timeoutMillis, int* outFd, int* outEvents, void** outData) __REMOVED_IN(1);
+int ALooper_pollAll(int timeoutMillis, int* outFd, int* outEvents, void** outData)
+ __REMOVED_IN(1, "ALooper_pollAll may ignore wakes. Use ALooper_pollOnce instead. See https://github.com/android/ndk/discussions/2020 for more information");
/**
* Wakes the poll asynchronously.
diff --git a/include/android/sensor.h b/include/android/sensor.h
index a618393e66..e3c1ccfc6c 100644
--- a/include/android/sensor.h
+++ b/include/android/sensor.h
@@ -60,7 +60,7 @@
#define __INTRODUCED_IN(__api_level) /* nothing */
#endif
#if !defined(__DEPRECATED_IN)
-#define __DEPRECATED_IN(__api_level) __attribute__((__deprecated__))
+#define __DEPRECATED_IN(__api_level, msg) __attribute__((__deprecated__(msg)))
#endif
#ifdef __cplusplus
@@ -748,7 +748,8 @@ typedef ASensorRef const* ASensorList;
* ASensorManager* sensorManager = ASensorManager_getInstance();
*
*/
-ASensorManager* ASensorManager_getInstance() __DEPRECATED_IN(26);
+ASensorManager* ASensorManager_getInstance()
+ __DEPRECATED_IN(26, "Use ASensorManager_getInstanceForPackage instead");
/**
* Get a reference to the sensor manager. ASensorManager is a singleton