AI 147301: am: CL 147296 Reuse the JetPlayer singleton instance in the initialization of JetBoy instead of destroying it.

Original author: jmtrivi
  Merged from: //branches/cupcake/...

Automated import of CL 147301
This commit is contained in:
Jean-Michel Trivi
2009-04-22 13:16:35 -07:00
committed by The Android Open Source Project
parent a2dd1440e3
commit 25179be380

View File

@@ -416,14 +416,8 @@ public class JetBoyView extends SurfaceView implements SurfaceHolder.Callback {
*/
private void initializeJetPlayer() {
// JET info: this is what we do to undesirable instances: we release them!
if (mJet != null)
{
mJet.release();
mJet = null;
}
// JET info: let's create our JetPlayer instance using the factory
// JET info: let's create our JetPlayer instance using the factory.
// JET info: if we already had one, the same singleton is returned.
mJet = JetPlayer.getJetPlayer();
mJetPlaying = false;