mirror of
https://codeberg.org/OpenTracksApp/OpenTracks.git
synced 2026-10-04 18:43:07 +02:00
bind and unbind recording service in onStart and onStop
This commit is contained in:
@@ -51,15 +51,6 @@ public abstract class AbstractMyTracksActivity extends FragmentActivity {
|
||||
*/
|
||||
protected abstract int getLayoutResId();
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
if (item.getItemId() != android.R.id.home) {
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
onHomeSelected();
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true to hide the title. Be default, do not hide the title.
|
||||
*/
|
||||
@@ -73,4 +64,13 @@ public abstract class AbstractMyTracksActivity extends FragmentActivity {
|
||||
protected void onHomeSelected() {
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
if (item.getItemId() != android.R.id.home) {
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
onHomeSelected();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user