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

Commit 09e865b6 authored by Andy Hung's avatar Andy Hung
Browse files

SoundPool: fix fcntl argument

Fixes flakiness introduced by commit 77eb2bda

Test: android.media.cts.SoundPoolAacTest
Test: android.media.cts.SoundPoolHapticTest
Test: android.media.cts.SoundPoolMidiTest
Test: android.media.cts.SoundPoolOggTest
Test: android.media.cts.AudioManagerTest#testSoundEffects
Bug: 157924783
Change-Id: I8371c93337852424e2b47a17e5a19a1caaf2600f
parent 73606857
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ constexpr size_t kDefaultHeapSize = 1024 * 1024; // 1MB (compatible with low m

Sound::Sound(int32_t soundID, int fd, int64_t offset, int64_t length)
    : mSoundID(soundID)
    , mFd(fcntl(fd, F_DUPFD_CLOEXEC)) // like dup(fd) but closes on exec to prevent leaks.
    , mFd(fcntl(fd, F_DUPFD_CLOEXEC, (int)0 /* arg */)) // dup(fd) + close on exec to prevent leaks.
    , mOffset(offset)
    , mLength(length)
{