Allow multiple releases to be called on MediaActionSound.

Bug: 6136088
Change-Id: I80ff09a90cd65d874ae016d450c4cc8c6a56d387
This commit is contained in:
Eino-Ville Talvala
2012-03-08 14:18:06 -08:00
parent cd40f4a062
commit a4fd93751d

View File

@@ -185,10 +185,14 @@ public class MediaActionSound {
};
/**
* Free up all audio resources used by this MediaActionSound instance
* Free up all audio resources used by this MediaActionSound instance. Do
* not call any other methods on a MediaActionSound instance after calling
* release().
*/
public void release() {
mSoundPool.release();
mSoundPool = null;
if (mSoundPool != null) {
mSoundPool.release();
mSoundPool = null;
}
}
}