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

Commit c5f378e8 authored by Mikhail Naganov's avatar Mikhail Naganov Committed by Android Build Cherrypicker Worker
Browse files

Enlarge the width of AudioTimestampInternal.position

Change the AIDL type of the field to `long` because it must
be able to hold all values from AudioTimestamp::mPosition,
which has type `uint32_t`.

Bug: 287590875
Test: m
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:387360400c228be6323f0070a139c63163b86994)
Merged-In: Id0b4ab3325b5622fddae7320516f38b3e9efbe21
Change-Id: Id0b4ab3325b5622fddae7320516f38b3e9efbe21
parent 2342e7af
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -528,7 +528,7 @@ aidl2legacy_AudioTimestampInternal_AudioTimestamp(const media::AudioTimestampInt
ConversionResult<media::AudioTimestampInternal>
legacy2aidl_AudioTimestamp_AudioTimestampInternal(const AudioTimestamp& legacy) {
    media::AudioTimestampInternal aidl;
    aidl.position = VALUE_OR_RETURN(convertIntegral<int32_t>(legacy.mPosition));
    aidl.position = VALUE_OR_RETURN(convertIntegral<int64_t>(legacy.mPosition));
    aidl.sec = VALUE_OR_RETURN(convertIntegral<int64_t>(legacy.mTime.tv_sec));
    aidl.nsec = VALUE_OR_RETURN(convertIntegral<int32_t>(legacy.mTime.tv_nsec));
    return aidl;
+5 −2
Original line number Diff line number Diff line
@@ -22,8 +22,11 @@ package android.media;
 * {@hide}
 */
parcelable AudioTimestampInternal {
    /** A frame position in AudioTrack::getPosition() units. */
    int position;
    /**
     * A frame position in AudioTrack::getPosition() units. Use 'long' to accommodate
     * all values from 'uint32_t'.
     */
    long position;
    /** corresponding CLOCK_MONOTONIC when frame is expected to present. */
    long sec;
    int nsec;