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

Commit 90736768 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge changes Ifef817a0,Ia013f48a,I23db5a21

* changes:
  Fix doxygen syntax.
  Restore __ANDROID_API__ guards for core <android/*> APIs
  Add __INTRODUCED_IN to core <android/*.h> APIs.
parents a3ae0dbc 2310e409
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -30,8 +30,6 @@

__BEGIN_DECLS

#if __ANDROID_API__ >= 24

struct AChoreographer;
typedef struct AChoreographer AChoreographer;

@@ -45,25 +43,29 @@ typedef struct AChoreographer AChoreographer;
 */
typedef void (*AChoreographer_frameCallback)(long frameTimeNanos, void* data);

#if __ANDROID_API__ >= 24

/**
 * Get the AChoreographer instance for the current thread. This must be called
 * on an ALooper thread.
 */
AChoreographer* AChoreographer_getInstance();
AChoreographer* AChoreographer_getInstance() __INTRODUCED_IN(24);

/**
 * Post a callback to be run on the next frame. The data pointer provided will
 * be passed to the callback function when it's called.
 */
void AChoreographer_postFrameCallback(AChoreographer* choreographer,
                AChoreographer_frameCallback callback, void* data);
                AChoreographer_frameCallback callback, void* data) __INTRODUCED_IN(24);

/**
 * Post a callback to be run on the frame following the specified delay. The
 * data pointer provided will be passed to the callback function when it's
 * called.
 */
void AChoreographer_postFrameCallbackDelayed(AChoreographer* choreographer,
                AChoreographer_frameCallback callback, void* data, long delayMillis);
                AChoreographer_frameCallback callback, void* data,
                long delayMillis) __INTRODUCED_IN(24);

#endif /* __ANDROID_API__ >= 24 */

+12 −8
Original line number Diff line number Diff line
@@ -30,6 +30,10 @@

#include <android/asset_manager.h>

#if !defined(__INTRODUCED_IN)
#define __INTRODUCED_IN(__api_level) /* nothing */
#endif

#ifdef __cplusplus
extern "C" {
#endif
@@ -676,34 +680,34 @@ void AConfiguration_setUiModeNight(AConfiguration* config, int32_t uiModeNight);
 * Return the current configuration screen width in dp units, or
 * ACONFIGURATION_SCREEN_WIDTH_DP_ANY if not set.
 */
int32_t AConfiguration_getScreenWidthDp(AConfiguration* config);
int32_t AConfiguration_getScreenWidthDp(AConfiguration* config) __INTRODUCED_IN(13);

/**
 * Set the configuration's current screen width in dp units.
 */
void AConfiguration_setScreenWidthDp(AConfiguration* config, int32_t value);
void AConfiguration_setScreenWidthDp(AConfiguration* config, int32_t value) __INTRODUCED_IN(13);

/**
 * Return the current configuration screen height in dp units, or
 * ACONFIGURATION_SCREEN_HEIGHT_DP_ANY if not set.
 */
int32_t AConfiguration_getScreenHeightDp(AConfiguration* config);
int32_t AConfiguration_getScreenHeightDp(AConfiguration* config) __INTRODUCED_IN(13);

/**
 * Set the configuration's current screen width in dp units.
 */
void AConfiguration_setScreenHeightDp(AConfiguration* config, int32_t value);
void AConfiguration_setScreenHeightDp(AConfiguration* config, int32_t value) __INTRODUCED_IN(13);

/**
 * Return the configuration's smallest screen width in dp units, or
 * ACONFIGURATION_SMALLEST_SCREEN_WIDTH_DP_ANY if not set.
 */
int32_t AConfiguration_getSmallestScreenWidthDp(AConfiguration* config);
int32_t AConfiguration_getSmallestScreenWidthDp(AConfiguration* config) __INTRODUCED_IN(13);

/**
 * Set the configuration's smallest screen width in dp units.
 */
void AConfiguration_setSmallestScreenWidthDp(AConfiguration* config, int32_t value);
void AConfiguration_setSmallestScreenWidthDp(AConfiguration* config, int32_t value) __INTRODUCED_IN(13);
#endif /* __ANDROID_API__ >= 13 */

#if __ANDROID_API__ >= 17
@@ -711,12 +715,12 @@ void AConfiguration_setSmallestScreenWidthDp(AConfiguration* config, int32_t val
 * Return the configuration's layout direction, or
 * ACONFIGURATION_LAYOUTDIR_ANY if not set.
 */
int32_t AConfiguration_getLayoutDirection(AConfiguration* config);
int32_t AConfiguration_getLayoutDirection(AConfiguration* config) __INTRODUCED_IN(17);

/**
 * Set the configuration's layout direction.
 */
void AConfiguration_setLayoutDirection(AConfiguration* config, int32_t value);
void AConfiguration_setLayoutDirection(AConfiguration* config, int32_t value) __INTRODUCED_IN(17);
#endif /* __ANDROID_API__ >= 17 */

/**
+8 −4
Original line number Diff line number Diff line
@@ -56,6 +56,10 @@
#include <android/keycodes.h>
#include <android/looper.h>

#if !defined(__INTRODUCED_IN)
#define __INTRODUCED_IN(__api_level) /* nothing */
#endif

#ifdef __cplusplus
extern "C" {
#endif
@@ -984,7 +988,7 @@ int32_t AMotionEvent_getMetaState(const AInputEvent* motion_event);

#if __ANDROID_API__ >= 14
/** Get the button state of all buttons that are pressed. */
int32_t AMotionEvent_getButtonState(const AInputEvent* motion_event);
int32_t AMotionEvent_getButtonState(const AInputEvent* motion_event) __INTRODUCED_IN(14);
#endif

/**
@@ -1056,7 +1060,7 @@ int32_t AMotionEvent_getPointerId(const AInputEvent* motion_event, size_t pointe
 * The tool type indicates the type of tool used to make contact such as a
 * finger or stylus, if known.
 */
int32_t AMotionEvent_getToolType(const AInputEvent* motion_event, size_t pointer_index);
int32_t AMotionEvent_getToolType(const AInputEvent* motion_event, size_t pointer_index) __INTRODUCED_IN(14);
#endif

/**
@@ -1150,7 +1154,7 @@ float AMotionEvent_getOrientation(const AInputEvent* motion_event, size_t pointe
#if __ANDROID_API__ >= 13
/** Get the value of the request axis for the given pointer index. */
float AMotionEvent_getAxisValue(const AInputEvent* motion_event,
        int32_t axis, size_t pointer_index);
        int32_t axis, size_t pointer_index) __INTRODUCED_IN(13);
#endif

/**
@@ -1288,7 +1292,7 @@ float AMotionEvent_getHistoricalOrientation(const AInputEvent* motion_event, siz
 * that occurred between this event and the previous motion event.
 */
float AMotionEvent_getHistoricalAxisValue(const AInputEvent* motion_event,
        int32_t axis, size_t pointer_index, size_t history_index);
        int32_t axis, size_t pointer_index, size_t history_index) __INTRODUCED_IN(13);
#endif


+5 −5
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ typedef uint64_t net_handle_t;
 * on failure with an appropriate errno value set.
 */

#if __ANDROID_API__ >= 24
#if __ANDROID_API__ >= 23

/**
 * Set the network to be used by the given socket file descriptor.
@@ -70,7 +70,7 @@ typedef uint64_t net_handle_t;
 * This is the equivalent of: [android.net.Network#bindSocket()](https://developer.android.com/reference/android/net/Network.html#bindSocket(java.net.Socket))
 *
 */
int android_setsocknetwork(net_handle_t network, int fd);
int android_setsocknetwork(net_handle_t network, int fd) __INTRODUCED_IN(23);


/**
@@ -87,7 +87,7 @@ int android_setsocknetwork(net_handle_t network, int fd);
 * This is the equivalent of: [android.net.ConnectivityManager#setProcessDefaultNetwork()](https://developer.android.com/reference/android/net/ConnectivityManager.html#setProcessDefaultNetwork(android.net.Network))
 *
 */
int android_setprocnetwork(net_handle_t network);
int android_setprocnetwork(net_handle_t network) __INTRODUCED_IN(23);


/**
@@ -106,9 +106,9 @@ int android_setprocnetwork(net_handle_t network);
 */
int android_getaddrinfofornetwork(net_handle_t network,
        const char *node, const char *service,
        const struct addrinfo *hints, struct addrinfo **res);
        const struct addrinfo *hints, struct addrinfo **res) __INTRODUCED_IN(23);

#endif /* __ANDROID_API__ >= 24 */
#endif /* __ANDROID_API__ >= 23 */

__END_DECLS

+1 −1
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ ANativeWindow* ANativeWindow_fromSurface(JNIEnv* env, jobject surface);
 * and will automatically release the reference when the Java object gets garbage
 * collected.
 */
jobject ANativeWindow_toSurface(JNIEnv* env, ANativeWindow* window);
jobject ANativeWindow_toSurface(JNIEnv* env, ANativeWindow* window) __INTRODUCED_IN(26);
#endif

#ifdef __cplusplus
Loading