summaryrefslogtreecommitdiffstats
path: root/media/jni
diff options
context:
space:
mode:
authorAndy Hung <hunga@google.com>2015-05-15 18:39:09 -0700
committerAndy Hung <hunga@google.com>2015-05-15 18:43:03 -0700
commita6238ef3891bbbdb1c42d3e7954c4cd55527cef6 (patch)
treeacb92a0ce2d1f1b3144759c5b8cf86508ee69049 /media/jni
parent0125d76fa37d26a29f06371ff349546e21cd3f4d (diff)
downloadframeworks_base-a6238ef3891bbbdb1c42d3e7954c4cd55527cef6.zip
frameworks_base-a6238ef3891bbbdb1c42d3e7954c4cd55527cef6.tar.gz
frameworks_base-a6238ef3891bbbdb1c42d3e7954c4cd55527cef6.tar.bz2
Fix SoundPool.unload() return value
Bug: 21209627 Change-Id: Ifd5c5f349894744c192cad10c5c875882566ec53
Diffstat (limited to 'media/jni')
-rw-r--r--media/jni/soundpool/SoundPool.cpp2
1 files changed, 1 insertions, 1 deletions
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 @@ bool SoundPool::unload(int sampleID)
{
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,