Loading include/android/choreographer.h +2 −2 Original line number Diff line number Diff line Loading @@ -209,13 +209,13 @@ int64_t AChoreographerFrameCallbackData_getFrameTimelineVsyncId( /** * The time in nanoseconds which the frame at given index is expected to be presented. */ int64_t AChoreographerFrameCallbackData_getFrameTimelineExpectedPresentTime( int64_t AChoreographerFrameCallbackData_getFrameTimelineExpectedPresentTimeNanos( const AChoreographerFrameCallbackData* data, size_t index) __INTRODUCED_IN(33); /** * The time in nanoseconds which the frame at given index needs to be ready by. */ int64_t AChoreographerFrameCallbackData_getFrameTimelineDeadline( int64_t AChoreographerFrameCallbackData_getFrameTimelineDeadlineNanos( const AChoreographerFrameCallbackData* data, size_t index) __INTRODUCED_IN(33); __END_DECLS Loading include/android/multinetwork.h +55 −0 Original line number Diff line number Diff line Loading @@ -216,6 +216,61 @@ int android_res_nresult(int fd, */ void android_res_cancel(int nsend_fd) __INTRODUCED_IN(29); /* * Set the socket tag and owning UID for traffic statistics on the specified * socket. * * Subsequent calls always replace any existing parameters. The socket tag and * uid (if set) are kept when the socket is sent to another process using binder * IPCs or other mechanisms such as UNIX socket fd passing. Any app can accept * blame for future traffic performed on a socket originally created by another * app by calling this method with its own UID (or calling * android_tag_socket(int sockfd, int tag)). However, only apps holding the * android.Manifest.permission#UPDATE_DEVICE_STATS permission may assign blame * to another UIDs. If unset (default) the socket tag is 0, and the uid is the * socket creator's uid. * * Returns 0 on success, or a negative POSIX error code (see errno.h) on * failure. * * Available since API level 33. */ int android_tag_socket_with_uid(int sockfd, int tag, uid_t uid) __INTRODUCED_IN(33); /* * Set the socket tag for traffic statistics on the specified socket. * * This function tags the socket with the caller's UID (accepting blame for * future traffic performed on this socket) even if the socket was originally * opened by another UID or was previously tagged by another UID. Subsequent * calls always replace any existing parameters. The socket tag is kept when the * socket is sent to another process using binder IPCs or other mechanisms such * as UNIX socket fd passing. * * Returns 0 on success, or a negative POSIX error code (see errno.h) on * failure. * * Available since API level 33. */ int android_tag_socket(int sockfd, int tag) __INTRODUCED_IN(33); /* * Untag a network socket. * * Future traffic on this socket will no longer be associated with any * previously configured tag and uid. If the socket was created by another UID * or was previously tagged by another UID, calling this function will clear the * statistics parameters, and thus the UID blamed for traffic on the socket will * be the UID that originally created the socket, even if the socket was * subsequently tagged by a different UID. * * Returns 0 on success, or a negative POSIX error code (see errno.h) on * failure. * * Available since API level 33. */ int android_untag_socket(int sockfd) __INTRODUCED_IN(33); __END_DECLS #endif // ANDROID_MULTINETWORK_H Loading include/android/sensor.h +40 −0 Original line number Diff line number Diff line Loading @@ -256,6 +256,13 @@ enum { * The hinge angle sensor value is returned in degrees. */ ASENSOR_TYPE_HINGE_ANGLE = 36, /** * {@link ASENSOR_TYPE_HEAD_TRACKER} * reporting-mode: continuous * * Measures the orientation and rotational velocity of a user's head. */ ASENSOR_TYPE_HEAD_TRACKER = 37, }; /** Loading Loading @@ -440,6 +447,38 @@ typedef struct AAdditionalInfoEvent { }; } AAdditionalInfoEvent; typedef struct AHeadTrackerEvent { /** * The fields rx, ry, rz are an Euler vector (rotation vector, i.e. a vector * whose direction indicates the axis of rotation and magnitude indicates * the angle to rotate around that axis) representing the transform from * the (arbitrary, possibly slowly drifting) reference frame to the * head frame. Expressed in radians. Magnitude of the vector must be * in the range [0, pi], while the value of individual axes are * in the range [-pi, pi]. */ float rx; float ry; float rz; /** * The fields vx, vy, vz are an Euler vector (rotation vector) representing * the angular velocity of the head (relative to itself), in radians per * second. The direction of this vector indicates the axis of rotation, and * the magnitude indicates the rate of rotation. */ float vx; float vy; float vz; /** * This value changes each time the reference frame is suddenly and * significantly changed, for example if an orientation filter algorithm * used for determining the orientation has had its state reset. */ int32_t discontinuity_count; } AHeadTrackerEvent; /** * Information that describes a sensor event, refer to * <a href="/reference/android/hardware/SensorEvent">SensorEvent</a> for additional Loading Loading @@ -476,6 +515,7 @@ typedef struct ASensorEvent { AHeartRateEvent heart_rate; ADynamicSensorEvent dynamic_sensor_meta; AAdditionalInfoEvent additional_info; AHeadTrackerEvent head_tracker; }; union { uint64_t data[8]; Loading libs/nativedisplay/AChoreographer.cpp +6 −6 Original line number Diff line number Diff line Loading @@ -556,13 +556,13 @@ int64_t AChoreographerFrameCallbackData_routeGetFrameTimelineVsyncId( const AChoreographerFrameCallbackData* data, size_t index) { return AChoreographerFrameCallbackData_getFrameTimelineVsyncId(data, index); } int64_t AChoreographerFrameCallbackData_routeGetFrameTimelineExpectedPresentTime( int64_t AChoreographerFrameCallbackData_routeGetFrameTimelineExpectedPresentTimeNanos( const AChoreographerFrameCallbackData* data, size_t index) { return AChoreographerFrameCallbackData_getFrameTimelineExpectedPresentTime(data, index); return AChoreographerFrameCallbackData_getFrameTimelineExpectedPresentTimeNanos(data, index); } int64_t AChoreographerFrameCallbackData_routeGetFrameTimelineDeadline( int64_t AChoreographerFrameCallbackData_routeGetFrameTimelineDeadlineNanos( const AChoreographerFrameCallbackData* data, size_t index) { return AChoreographerFrameCallbackData_getFrameTimelineDeadline(data, index); return AChoreographerFrameCallbackData_getFrameTimelineDeadlineNanos(data, index); } int64_t AChoreographer_getFrameInterval(const AChoreographer* choreographer) { Loading Loading @@ -653,7 +653,7 @@ int64_t AChoreographerFrameCallbackData_getFrameTimelineVsyncId( LOG_ALWAYS_FATAL_IF(index >= frameCallbackData->frameTimelines.size(), "Index out of bounds"); return frameCallbackData->frameTimelines[index].id; } int64_t AChoreographerFrameCallbackData_getFrameTimelineExpectedPresentTime( int64_t AChoreographerFrameCallbackData_getFrameTimelineExpectedPresentTimeNanos( const AChoreographerFrameCallbackData* data, size_t index) { const ChoreographerFrameCallbackDataImpl* frameCallbackData = AChoreographerFrameCallbackData_to_ChoreographerFrameCallbackDataImpl(data); Loading @@ -662,7 +662,7 @@ int64_t AChoreographerFrameCallbackData_getFrameTimelineExpectedPresentTime( LOG_ALWAYS_FATAL_IF(index >= frameCallbackData->frameTimelines.size(), "Index out of bounds"); return frameCallbackData->frameTimelines[index].expectedPresentTime; } int64_t AChoreographerFrameCallbackData_getFrameTimelineDeadline( int64_t AChoreographerFrameCallbackData_getFrameTimelineDeadlineNanos( const AChoreographerFrameCallbackData* data, size_t index) { const ChoreographerFrameCallbackDataImpl* frameCallbackData = AChoreographerFrameCallbackData_to_ChoreographerFrameCallbackDataImpl(data); Loading libs/nativedisplay/include-private/private/android/choreographer.h +2 −2 Original line number Diff line number Diff line Loading @@ -67,9 +67,9 @@ size_t AChoreographerFrameCallbackData_routeGetPreferredFrameTimelineIndex( const AChoreographerFrameCallbackData* data); int64_t AChoreographerFrameCallbackData_routeGetFrameTimelineVsyncId( const AChoreographerFrameCallbackData* data, size_t index); int64_t AChoreographerFrameCallbackData_routeGetFrameTimelineExpectedPresentTime( int64_t AChoreographerFrameCallbackData_routeGetFrameTimelineExpectedPresentTimeNanos( const AChoreographerFrameCallbackData* data, size_t index); int64_t AChoreographerFrameCallbackData_routeGetFrameTimelineDeadline( int64_t AChoreographerFrameCallbackData_routeGetFrameTimelineDeadlineNanos( const AChoreographerFrameCallbackData* data, size_t index); } // namespace android Loading
include/android/choreographer.h +2 −2 Original line number Diff line number Diff line Loading @@ -209,13 +209,13 @@ int64_t AChoreographerFrameCallbackData_getFrameTimelineVsyncId( /** * The time in nanoseconds which the frame at given index is expected to be presented. */ int64_t AChoreographerFrameCallbackData_getFrameTimelineExpectedPresentTime( int64_t AChoreographerFrameCallbackData_getFrameTimelineExpectedPresentTimeNanos( const AChoreographerFrameCallbackData* data, size_t index) __INTRODUCED_IN(33); /** * The time in nanoseconds which the frame at given index needs to be ready by. */ int64_t AChoreographerFrameCallbackData_getFrameTimelineDeadline( int64_t AChoreographerFrameCallbackData_getFrameTimelineDeadlineNanos( const AChoreographerFrameCallbackData* data, size_t index) __INTRODUCED_IN(33); __END_DECLS Loading
include/android/multinetwork.h +55 −0 Original line number Diff line number Diff line Loading @@ -216,6 +216,61 @@ int android_res_nresult(int fd, */ void android_res_cancel(int nsend_fd) __INTRODUCED_IN(29); /* * Set the socket tag and owning UID for traffic statistics on the specified * socket. * * Subsequent calls always replace any existing parameters. The socket tag and * uid (if set) are kept when the socket is sent to another process using binder * IPCs or other mechanisms such as UNIX socket fd passing. Any app can accept * blame for future traffic performed on a socket originally created by another * app by calling this method with its own UID (or calling * android_tag_socket(int sockfd, int tag)). However, only apps holding the * android.Manifest.permission#UPDATE_DEVICE_STATS permission may assign blame * to another UIDs. If unset (default) the socket tag is 0, and the uid is the * socket creator's uid. * * Returns 0 on success, or a negative POSIX error code (see errno.h) on * failure. * * Available since API level 33. */ int android_tag_socket_with_uid(int sockfd, int tag, uid_t uid) __INTRODUCED_IN(33); /* * Set the socket tag for traffic statistics on the specified socket. * * This function tags the socket with the caller's UID (accepting blame for * future traffic performed on this socket) even if the socket was originally * opened by another UID or was previously tagged by another UID. Subsequent * calls always replace any existing parameters. The socket tag is kept when the * socket is sent to another process using binder IPCs or other mechanisms such * as UNIX socket fd passing. * * Returns 0 on success, or a negative POSIX error code (see errno.h) on * failure. * * Available since API level 33. */ int android_tag_socket(int sockfd, int tag) __INTRODUCED_IN(33); /* * Untag a network socket. * * Future traffic on this socket will no longer be associated with any * previously configured tag and uid. If the socket was created by another UID * or was previously tagged by another UID, calling this function will clear the * statistics parameters, and thus the UID blamed for traffic on the socket will * be the UID that originally created the socket, even if the socket was * subsequently tagged by a different UID. * * Returns 0 on success, or a negative POSIX error code (see errno.h) on * failure. * * Available since API level 33. */ int android_untag_socket(int sockfd) __INTRODUCED_IN(33); __END_DECLS #endif // ANDROID_MULTINETWORK_H Loading
include/android/sensor.h +40 −0 Original line number Diff line number Diff line Loading @@ -256,6 +256,13 @@ enum { * The hinge angle sensor value is returned in degrees. */ ASENSOR_TYPE_HINGE_ANGLE = 36, /** * {@link ASENSOR_TYPE_HEAD_TRACKER} * reporting-mode: continuous * * Measures the orientation and rotational velocity of a user's head. */ ASENSOR_TYPE_HEAD_TRACKER = 37, }; /** Loading Loading @@ -440,6 +447,38 @@ typedef struct AAdditionalInfoEvent { }; } AAdditionalInfoEvent; typedef struct AHeadTrackerEvent { /** * The fields rx, ry, rz are an Euler vector (rotation vector, i.e. a vector * whose direction indicates the axis of rotation and magnitude indicates * the angle to rotate around that axis) representing the transform from * the (arbitrary, possibly slowly drifting) reference frame to the * head frame. Expressed in radians. Magnitude of the vector must be * in the range [0, pi], while the value of individual axes are * in the range [-pi, pi]. */ float rx; float ry; float rz; /** * The fields vx, vy, vz are an Euler vector (rotation vector) representing * the angular velocity of the head (relative to itself), in radians per * second. The direction of this vector indicates the axis of rotation, and * the magnitude indicates the rate of rotation. */ float vx; float vy; float vz; /** * This value changes each time the reference frame is suddenly and * significantly changed, for example if an orientation filter algorithm * used for determining the orientation has had its state reset. */ int32_t discontinuity_count; } AHeadTrackerEvent; /** * Information that describes a sensor event, refer to * <a href="/reference/android/hardware/SensorEvent">SensorEvent</a> for additional Loading Loading @@ -476,6 +515,7 @@ typedef struct ASensorEvent { AHeartRateEvent heart_rate; ADynamicSensorEvent dynamic_sensor_meta; AAdditionalInfoEvent additional_info; AHeadTrackerEvent head_tracker; }; union { uint64_t data[8]; Loading
libs/nativedisplay/AChoreographer.cpp +6 −6 Original line number Diff line number Diff line Loading @@ -556,13 +556,13 @@ int64_t AChoreographerFrameCallbackData_routeGetFrameTimelineVsyncId( const AChoreographerFrameCallbackData* data, size_t index) { return AChoreographerFrameCallbackData_getFrameTimelineVsyncId(data, index); } int64_t AChoreographerFrameCallbackData_routeGetFrameTimelineExpectedPresentTime( int64_t AChoreographerFrameCallbackData_routeGetFrameTimelineExpectedPresentTimeNanos( const AChoreographerFrameCallbackData* data, size_t index) { return AChoreographerFrameCallbackData_getFrameTimelineExpectedPresentTime(data, index); return AChoreographerFrameCallbackData_getFrameTimelineExpectedPresentTimeNanos(data, index); } int64_t AChoreographerFrameCallbackData_routeGetFrameTimelineDeadline( int64_t AChoreographerFrameCallbackData_routeGetFrameTimelineDeadlineNanos( const AChoreographerFrameCallbackData* data, size_t index) { return AChoreographerFrameCallbackData_getFrameTimelineDeadline(data, index); return AChoreographerFrameCallbackData_getFrameTimelineDeadlineNanos(data, index); } int64_t AChoreographer_getFrameInterval(const AChoreographer* choreographer) { Loading Loading @@ -653,7 +653,7 @@ int64_t AChoreographerFrameCallbackData_getFrameTimelineVsyncId( LOG_ALWAYS_FATAL_IF(index >= frameCallbackData->frameTimelines.size(), "Index out of bounds"); return frameCallbackData->frameTimelines[index].id; } int64_t AChoreographerFrameCallbackData_getFrameTimelineExpectedPresentTime( int64_t AChoreographerFrameCallbackData_getFrameTimelineExpectedPresentTimeNanos( const AChoreographerFrameCallbackData* data, size_t index) { const ChoreographerFrameCallbackDataImpl* frameCallbackData = AChoreographerFrameCallbackData_to_ChoreographerFrameCallbackDataImpl(data); Loading @@ -662,7 +662,7 @@ int64_t AChoreographerFrameCallbackData_getFrameTimelineExpectedPresentTime( LOG_ALWAYS_FATAL_IF(index >= frameCallbackData->frameTimelines.size(), "Index out of bounds"); return frameCallbackData->frameTimelines[index].expectedPresentTime; } int64_t AChoreographerFrameCallbackData_getFrameTimelineDeadline( int64_t AChoreographerFrameCallbackData_getFrameTimelineDeadlineNanos( const AChoreographerFrameCallbackData* data, size_t index) { const ChoreographerFrameCallbackDataImpl* frameCallbackData = AChoreographerFrameCallbackData_to_ChoreographerFrameCallbackDataImpl(data); Loading
libs/nativedisplay/include-private/private/android/choreographer.h +2 −2 Original line number Diff line number Diff line Loading @@ -67,9 +67,9 @@ size_t AChoreographerFrameCallbackData_routeGetPreferredFrameTimelineIndex( const AChoreographerFrameCallbackData* data); int64_t AChoreographerFrameCallbackData_routeGetFrameTimelineVsyncId( const AChoreographerFrameCallbackData* data, size_t index); int64_t AChoreographerFrameCallbackData_routeGetFrameTimelineExpectedPresentTime( int64_t AChoreographerFrameCallbackData_routeGetFrameTimelineExpectedPresentTimeNanos( const AChoreographerFrameCallbackData* data, size_t index); int64_t AChoreographerFrameCallbackData_routeGetFrameTimelineDeadline( int64_t AChoreographerFrameCallbackData_routeGetFrameTimelineDeadlineNanos( const AChoreographerFrameCallbackData* data, size_t index); } // namespace android