Use SoundPool instead of Ringtone.
The lock screen was using Ringtone for the lock/unlock sounds, which
meant two new MediaPlayers were created every time a sound needed to
be played. In addition, the Ringtone was assigned to a local variable,
which means it could go be garbage collected and finalized while it
was still playing.
For short sounds that need to be played repeatedly, SoundPool is a
better option anyway, so use that instead.
b/5382634
Change-Id: I8794cbb24604fa7c03032bd5e32ceab37a858054
1 file changed