AI 147296: Reuse the JetPlayer singleton instance in the initialization of JetBoy instead of destroying it.
BUG=1804737 Automated import of CL 147296
This commit is contained in:
committed by
The Android Open Source Project
parent
ecf1391bc3
commit
ab7e461226
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user