Fix SoundPool.unload() return value
Bug: 21209627
Change-Id: Ifd5c5f349894744c192cad10c5c875882566ec53
diff --git a/media/jni/soundpool/SoundPool.cpp b/media/jni/soundpool/SoundPool.cpp
index 6c1bd97..8038cdf 100644
--- a/media/jni/soundpool/SoundPool.cpp
+++ b/media/jni/soundpool/SoundPool.cpp
@@ -229,7 +229,7 @@
{
ALOGV("unload: sampleID=%d", sampleID);
Mutex::Autolock lock(&mLock);
- return mSamples.removeItem(sampleID);
+ return mSamples.removeItem(sampleID) >= 0; // removeItem() returns index or BAD_VALUE
}
int SoundPool::play(int sampleID, float leftVolume, float rightVolume,