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

Commit 31dfd6a4 authored by Gerry Fan's avatar Gerry Fan Committed by Android (Google) Code Review
Browse files

Merge "Fixing ndk reference doc link errors in a few headers: ...

Merge "Fixing ndk reference doc link errors in a few headers:   hardware_buffer.h, sensor.h, trace.h, window.h" into sc-dev
parents ba8e67a3 5d5faa47
Loading
Loading
Loading
Loading
+28 −13
Original line number Original line Diff line number Diff line
@@ -428,6 +428,10 @@ typedef struct ADynamicSensorEvent {
} ADynamicSensorEvent;
} ADynamicSensorEvent;


typedef struct AAdditionalInfoEvent {
typedef struct AAdditionalInfoEvent {
    /**
     * Event type, such as ASENSOR_ADDITIONAL_INFO_BEGIN, ASENSOR_ADDITIONAL_INFO_END and others.
     * Refer to {@link ASENSOR_TYPE_ADDITIONAL_INFO} for the expected reporting behavior.
     */
    int32_t type;
    int32_t type;
    int32_t serial;
    int32_t serial;
    union {
    union {
@@ -436,12 +440,22 @@ typedef struct AAdditionalInfoEvent {
    };
    };
} AAdditionalInfoEvent;
} AAdditionalInfoEvent;


/**
 * Information that describes a sensor event, refer to
 * <a href="/reference/android/hardware/SensorEvent">SensorEvent</a> for additional
 * documentation.
 */
/* NOTE: changes to this struct has to be backward compatible */
/* NOTE: changes to this struct has to be backward compatible */
typedef struct ASensorEvent {
typedef struct ASensorEvent {
    int32_t version; /* sizeof(struct ASensorEvent) */
    int32_t version; /* sizeof(struct ASensorEvent) */
    int32_t sensor;
    int32_t sensor;  /** The sensor that generates this event */
    int32_t type;
    int32_t type;    /** Sensor type for the event, such as {@link ASENSOR_TYPE_ACCELEROMETER}*/
    int32_t reserved0;
    int32_t reserved0; /** do not use */
    /**
     * The time in nanoseconds at which the event happened, and its behavior
     * is identical to <a href="/reference/android/hardware/SensorEvent#timestamp">
     * SensorEvent::timestamp</a> in Java API.
     */
    int64_t timestamp;
    int64_t timestamp;
    union {
    union {
        union {
        union {
@@ -653,9 +667,10 @@ int ASensorManager_createHardwareBufferDirectChannel(
/**
/**
 * Destroy a direct channel
 * Destroy a direct channel
 *
 *
 * Destroy a direct channel previously created using {@link ASensorManager_createDirectChannel}.
 * Destroy a direct channel previously created by using one of
 * The buffer used for creating direct channel does not get destroyed with
 * ASensorManager_create*DirectChannel() derivative functions.
 * {@link ASensorManager_destroy} and has to be close or released separately.
 * Note that the buffer used for creating the direct channel does not get destroyed with
 * ASensorManager_destroyDirectChannel and has to be closed or released separately.
 *
 *
 * Available since API level 26.
 * Available since API level 26.
 *
 *
@@ -701,7 +716,7 @@ void ASensorManager_destroyDirectChannel(ASensorManager* manager, int channelId)
 * \param channelId channel id (a positive integer) returned from
 * \param channelId channel id (a positive integer) returned from
 *                  {@link ASensorManager_createSharedMemoryDirectChannel} or
 *                  {@link ASensorManager_createSharedMemoryDirectChannel} or
 *                  {@link ASensorManager_createHardwareBufferDirectChannel}.
 *                  {@link ASensorManager_createHardwareBufferDirectChannel}.
 *
 * \param rate      one of predefined ASENSOR_DIRECT_RATE_... that is supported by the sensor.
 * \return positive token for success or negative error code.
 * \return positive token for success or negative error code.
 */
 */
int ASensorManager_configureDirectReport(ASensorManager* manager,
int ASensorManager_configureDirectReport(ASensorManager* manager,
@@ -718,7 +733,7 @@ int ASensorManager_configureDirectReport(ASensorManager* manager,
 * \param queue {@link ASensorEventQueue} for sensor event to be report to.
 * \param queue {@link ASensorEventQueue} for sensor event to be report to.
 * \param sensor {@link ASensor} to be enabled.
 * \param sensor {@link ASensor} to be enabled.
 * \param samplingPeriodUs sampling period of sensor in microseconds.
 * \param samplingPeriodUs sampling period of sensor in microseconds.
 * \param maxBatchReportLatencyus maximum time interval between two batch of sensor events are
 * \param maxBatchReportLatencyUs maximum time interval between two batches of sensor events are
 *                                delievered in microseconds. For sensor streaming, set to 0.
 *                                delievered in microseconds. For sensor streaming, set to 0.
 * \return 0 on success or a negative error code on failure.
 * \return 0 on success or a negative error code on failure.
 */
 */
@@ -778,7 +793,7 @@ int ASensorEventQueue_hasEvents(ASensorEventQueue* queue);
 * Retrieve next available events from the queue to a specified event array.
 * Retrieve next available events from the queue to a specified event array.
 *
 *
 * \param queue {@link ASensorEventQueue} to get events from
 * \param queue {@link ASensorEventQueue} to get events from
 * \param events pointer to an array of {@link ASensorEvents}.
 * \param events pointer to an array of {@link ASensorEvent}.
 * \param count max number of event that can be filled into array event.
 * \param count max number of event that can be filled into array event.
 * \return number of events returned on success; negative error code when
 * \return number of events returned on success; negative error code when
 *         no events are pending or an error has occurred.
 *         no events are pending or an error has occurred.
@@ -798,7 +813,7 @@ ssize_t ASensorEventQueue_getEvents(ASensorEventQueue* queue, ASensorEvent* even
 * Request that {@link ASENSOR_TYPE_ADDITIONAL_INFO} events to be delivered on
 * Request that {@link ASENSOR_TYPE_ADDITIONAL_INFO} events to be delivered on
 * the given {@link ASensorEventQueue}.
 * the given {@link ASensorEventQueue}.
 *
 *
 * Sensor data events are always delivered to the {@ASensorEventQueue}.
 * Sensor data events are always delivered to the {@link ASensorEventQueue}.
 *
 *
 * The {@link ASENSOR_TYPE_ADDITIONAL_INFO} events will be returned through
 * The {@link ASENSOR_TYPE_ADDITIONAL_INFO} events will be returned through
 * {@link ASensorEventQueue_getEvents}. The client is responsible for checking
 * {@link ASensorEventQueue_getEvents}. The client is responsible for checking
@@ -890,7 +905,7 @@ bool ASensor_isWakeUpSensor(ASensor const* sensor) __INTRODUCED_IN(21);
 *
 *
 * \param sensor  a {@link ASensor} to denote the sensor to be checked.
 * \param sensor  a {@link ASensor} to denote the sensor to be checked.
 * \param channelType  Channel type constant, either
 * \param channelType  Channel type constant, either
 *                     {@ASENSOR_DIRECT_CHANNEL_TYPE_SHARED_MEMORY}
 *                     {@link ASENSOR_DIRECT_CHANNEL_TYPE_SHARED_MEMORY}
 *                     or {@link ASENSOR_DIRECT_CHANNEL_TYPE_HARDWARE_BUFFER}.
 *                     or {@link ASENSOR_DIRECT_CHANNEL_TYPE_HARDWARE_BUFFER}.
 * \returns true if sensor supports the specified direct channel type.
 * \returns true if sensor supports the specified direct channel type.
 */
 */
@@ -920,8 +935,8 @@ int ASensor_getHighestDirectReportRateLevel(ASensor const* sensor) __INTRODUCED_
 * sensor that generated the event.
 * sensor that generated the event.
 *
 *
 * It is important to note that the value returned by {@link ASensor_getHandle} is not the same as
 * It is important to note that the value returned by {@link ASensor_getHandle} is not the same as
 * the value returned by the Java API {@link android.hardware.Sensor#getId} and no mapping exists
 * the value returned by the Java API <a href="/reference/android/hardware/Sensor#getId()">
 * between the values.
 * android.hardware.Sensor's getId()</a> and no mapping exists between the values.
 *
 *
 * Available since API level 29.
 * Available since API level 29.
 */
 */
+6 −4
Original line number Original line Diff line number Diff line
@@ -59,9 +59,10 @@ extern "C" {
 *
 *
 * Use close() to release the shared memory region.
 * Use close() to release the shared memory region.
 *
 *
 * Use {@link android.os.ParcelFileDescriptor} to pass the file descriptor to
 * Use <a href="/reference/android/os/ParcelFileDescriptor">android.os.ParcelFileDescriptor</a>
 * another process. File descriptors may also be sent to other processes over a Unix domain
 * to pass the file descriptor to another process. File descriptors may also be sent to other
 * socket with sendmsg and SCM_RIGHTS. See sendmsg(3) and cmsg(3) man pages for more information.
 * processes over a Unix domain socket with sendmsg and SCM_RIGHTS. See sendmsg(3) and
 * cmsg(3) man pages for more information.
 *
 *
 * If you intend to share this file descriptor with a child process after
 * If you intend to share this file descriptor with a child process after
 * calling exec(3), note that you will need to use fcntl(2) with FD_SETFD
 * calling exec(3), note that you will need to use fcntl(2) with FD_SETFD
@@ -71,7 +72,8 @@ extern "C" {
 *
 *
 * \param name an optional name.
 * \param name an optional name.
 * \param size size of the shared memory region
 * \param size size of the shared memory region
 * \return file descriptor that denotes the shared memory; -1 and sets errno on failure, or -EINVAL if the error is that size was 0.
 * \return file descriptor that denotes the shared memory;
 *         -1 and sets errno on failure, or -EINVAL if the error is that size was 0.
 */
 */
int ASharedMemory_create(const char *name, size_t size) __INTRODUCED_IN(26);
int ASharedMemory_create(const char *name, size_t size) __INTRODUCED_IN(26);


+6 −2
Original line number Original line Diff line number Diff line
@@ -60,6 +60,10 @@
extern "C" {
extern "C" {
#endif
#endif


/**
 * Thermal status used in function {@link AThermal_getCurrentThermalStatus} and
 * {@link AThermal_StatusCallback}.
 */
enum AThermalStatus {
enum AThermalStatus {
    /** Error in thermal status. */
    /** Error in thermal status. */
    ATHERMAL_STATUS_ERROR = -1,
    ATHERMAL_STATUS_ERROR = -1,
@@ -194,10 +198,10 @@ int AThermal_unregisterThermalStatusListener(AThermalManager *manager,
 *
 *
 * The value returned is a non-negative float that represents how much of the thermal envelope
 * The value returned is a non-negative float that represents how much of the thermal envelope
 * is in use (or is forecasted to be in use). A value of 1.0 indicates that the device is
 * is in use (or is forecasted to be in use). A value of 1.0 indicates that the device is
 * (or will be) throttled at {@link #THERMAL_STATUS_SEVERE}. Such throttling can affect the
 * (or will be) throttled at {@link #ATHERMAL_STATUS_SEVERE}. Such throttling can affect the
 * CPU, GPU, and other subsystems. Values may exceed 1.0, but there is no implied mapping
 * CPU, GPU, and other subsystems. Values may exceed 1.0, but there is no implied mapping
 * to specific thermal levels beyond that point. This means that values greater than 1.0
 * to specific thermal levels beyond that point. This means that values greater than 1.0
 * may correspond to {@link #THERMAL_STATUS_SEVERE}, but may also represent heavier throttling.
 * may correspond to {@link #ATHERMAL_STATUS_SEVERE}, but may also represent heavier throttling.
 *
 *
 * A value of 0.0 corresponds to a fixed distance from 1.0, but does not correspond to any
 * A value of 0.0 corresponds to a fixed distance from 1.0, but does not correspond to any
 * particular thermal status or temperature. Values on (0.0, 1.0] may be expected to scale
 * particular thermal status or temperature. Values on (0.0, 1.0] may be expected to scale
+1 −1
Original line number Original line Diff line number Diff line
@@ -91,7 +91,7 @@ void ATrace_beginAsyncSection(const char* sectionName, int32_t cookie) __INTRODU
 *
 *
 * Available since API level 29.
 * Available since API level 29.
 *
 *
 * \param methodName The method name to appear in the trace.
 * \param sectionName The method name to appear in the trace.
 * \param cookie Unique identifier for distinguishing simultaneous events
 * \param cookie Unique identifier for distinguishing simultaneous events
 */
 */
void ATrace_endAsyncSection(const char* sectionName, int32_t cookie) __INTRODUCED_IN(29);
void ATrace_endAsyncSection(const char* sectionName, int32_t cookie) __INTRODUCED_IN(29);
+3 −2
Original line number Original line Diff line number Diff line
@@ -103,8 +103,9 @@ enum {
     * bar) while this window is displayed.  This allows the window to
     * bar) while this window is displayed.  This allows the window to
     * use the entire display space for itself -- the status bar will
     * use the entire display space for itself -- the status bar will
     * be hidden when an app window with this flag set is on the top
     * be hidden when an app window with this flag set is on the top
     * layer. A fullscreen window will ignore a value of {@link
     * layer. A fullscreen window will ignore a value of
     * AWINDOW_SOFT_INPUT_ADJUST_RESIZE}; the window will stay
     * <a href="/reference/android/view/WindowManager.LayoutParams#SOFT_INPUT_ADJUST_RESIZE">
     * SOFT_INPUT_ADJUST_RESIZE</a>; the window will stay
     * fullscreen and will not resize.
     * fullscreen and will not resize.
     */
     */
    AWINDOW_FLAG_FULLSCREEN                 = 0x00000400,
    AWINDOW_FLAG_FULLSCREEN                 = 0x00000400,
Loading