Skip to content

Commit

Permalink
Fix a crash on file open after exit
Browse files Browse the repository at this point in the history
  • Loading branch information
Wohlstand committed Feb 21, 2019
1 parent 47a138a commit d35cf11
Showing 1 changed file with 1 addition and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ public class Player extends AppCompatActivity {

private SharedPreferences m_setup = null;

private String m_lastFile = "";
private String m_lastPath = Environment.getExternalStorageDirectory().getPath();
private String m_lastBankPath = "";

Expand Down Expand Up @@ -536,17 +535,6 @@ public void onClick(View view) {
}
Log.d(LOG_TAG, "Quit: Collect garbage");
System.gc();

Log.d(LOG_TAG, "Quit: New Handler");
Handler handler = new Handler();
Log.d(LOG_TAG, "Quit: Wait until call Exit");
handler.postDelayed(new Runnable(){
@Override
public void run(){
Log.d(LOG_TAG, "Quit: Do Exit NOW!");
System.exit(0);
}
}, 3000);
}
});

Expand Down Expand Up @@ -810,6 +798,7 @@ private void processMusicFile(String fileName, String lastPath)
boolean wasPlay = m_service.isPlaying();
if(m_service.isPlaying())
m_service.playerStop();
String m_lastFile;
if(!m_service.isReady())
{
if (!m_service.initPlayer())
Expand Down

0 comments on commit d35cf11

Please sign in to comment.