bug fixed: stop button did not stop tracking under certain conditions
This commit is contained in:
parent
25e5ad9c88
commit
2873cc6672
5 changed files with 11 additions and 5 deletions
|
@ -8,8 +8,8 @@ android {
|
|||
applicationId "org.y20k.trackbook"
|
||||
minSdkVersion 22
|
||||
targetSdkVersion 24
|
||||
versionCode 1
|
||||
versionName "0.9.0 (The Great Gig in the Sky)"
|
||||
versionCode 2
|
||||
versionName "0.9.1 (The Great Gig in the Sky)"
|
||||
vectorDrawables.useSupportLibrary = true
|
||||
}
|
||||
buildTypes {
|
||||
|
|
|
@ -321,7 +321,7 @@ public class MainActivityFragment extends Fragment implements TrackbookKeys {
|
|||
|
||||
|
||||
/* Setter for tracking state */
|
||||
public void setTrackingState (boolean trackingState) {
|
||||
public void setTrackingState(boolean trackingState) {
|
||||
mTrackerServiceRunning = trackingState;
|
||||
|
||||
// got a new track (from notification)
|
||||
|
@ -333,7 +333,7 @@ public class MainActivityFragment extends Fragment implements TrackbookKeys {
|
|||
// turn on/off tracking for MainActivity Fragment - prevent double tracking
|
||||
if (mTrackerServiceRunning) {
|
||||
stopPreliminaryTracking();
|
||||
} else if (!mLocalTrackerRunning){
|
||||
} else if (!mLocalTrackerRunning && mFragmentVisible) {
|
||||
startPreliminaryTracking();
|
||||
}
|
||||
|
||||
|
|
|
@ -40,6 +40,11 @@ public interface TrackbookKeys {
|
|||
|
||||
/* ARGS */
|
||||
String ARG_PERMISSIONS_GRANTED = "ArgPermissionsGranted";
|
||||
String ARG_TRACKING_STATE = "ArgTrackingState";
|
||||
String ARG_TRACK = "ArgTrack";
|
||||
|
||||
/* TAGS */
|
||||
String TAG_MAIN_ACTIVITY_FRAGMENT = "TagMainActivityFragment";
|
||||
|
||||
/* PREFS */
|
||||
String PREFS_NAME = "org.y20k.trackbook.prefs";
|
||||
|
|
|
@ -9,3 +9,4 @@
|
|||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
tools:layout="@layout/fragment_main" />
|
||||
|
||||
|
|
Loading…
Reference in a new issue