Almost got Bluetooth syncing working, still have crash att app exit
This commit is contained in:
parent
bb24b03557
commit
84b679a7cc
7 changed files with 92 additions and 51 deletions
|
|
@ -287,11 +287,7 @@ public class MainActivity extends FragmentActivity implements OnSharedPreference
|
|||
@Override
|
||||
public void onBackPressed() {
|
||||
if (backButtonPressed) {
|
||||
if(executor != null){
|
||||
log.info("Terminating executor");
|
||||
executor.terminate();
|
||||
executor.reset();
|
||||
}
|
||||
// Close the App
|
||||
super.onBackPressed();
|
||||
return;
|
||||
}
|
||||
|
|
@ -306,7 +302,15 @@ public class MainActivity extends FragmentActivity implements OnSharedPreference
|
|||
}
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
if(executor != null){
|
||||
executor.terminate();
|
||||
executor.reset();
|
||||
executor = null;
|
||||
}
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
public static UeControlExecutor getExecutor() {
|
||||
return executor;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue