Merge "Fix arguments capture in SoundEffectsHelper" into rvc-dev

This commit is contained in:
TreeHugger Robot
2020-07-14 20:46:32 +00:00
committed by Android (Google) Code Review

View File

@@ -436,11 +436,12 @@ class SoundEffectsHelper {
onUnloadSoundEffects(); onUnloadSoundEffects();
break; break;
case MSG_PLAY_EFFECT: case MSG_PLAY_EFFECT:
final int effect = msg.arg1, volume = msg.arg2;
onLoadSoundEffects(new OnEffectsLoadCompleteHandler() { onLoadSoundEffects(new OnEffectsLoadCompleteHandler() {
@Override @Override
public void run(boolean success) { public void run(boolean success) {
if (success) { if (success) {
onPlaySoundEffect(msg.arg1 /*effect*/, msg.arg2 /*volume*/); onPlaySoundEffect(effect, volume);
} }
} }
}); });