AI 147304: am: CL 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/...
  Original author: android-build

Automated import of CL 147304
This commit is contained in:
Jean-Michel Trivi
2009-04-21 18:56:24 -07:00
committed by The Android Open Source Project
parent 5552f05bbe
commit c66b5fac62

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;