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
diff --git a/samples/JetBoy/src/com/example/android/jetboy/JetBoyView.java b/samples/JetBoy/src/com/example/android/jetboy/JetBoyView.java
index 3a49a87..1b17925 100755
--- a/samples/JetBoy/src/com/example/android/jetboy/JetBoyView.java
+++ b/samples/JetBoy/src/com/example/android/jetboy/JetBoyView.java
@@ -416,14 +416,8 @@
*/
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;