Allow multiple releases to be called on MediaActionSound.
Bug: 6136088 Change-Id: I80ff09a90cd65d874ae016d450c4cc8c6a56d387
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user