Skip to content
This repository has been archived by the owner on Feb 1, 2025. It is now read-only.

Commit

Permalink
bug fixed: stop button did not stop tracking under certain conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
y20k committed Sep 13, 2016
1 parent 25e5ad9 commit 2873cc6
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/org/y20k/trackbook/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Copyright (c) 2016 - Y20K.org
* Licensed under the MIT-License
* http://opensource.org/licenses/MIT
*
*
* Trackbook uses osmdroid - OpenStreetMap-Tools for Android
* https://github.com/osmdroid/osmdroid
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ public void onSaveInstanceState(Bundle outState) {


/* Setter for tracking state */
public void setTrackingState (boolean trackingState) {
public void setTrackingState(boolean trackingState) {
mTrackerServiceRunning = trackingState;

// got a new track (from notification)
Expand All @@ -333,7 +333,7 @@ public void setTrackingState (boolean trackingState) {
// turn on/off tracking for MainActivity Fragment - prevent double tracking
if (mTrackerServiceRunning) {
stopPreliminaryTracking();
} else if (!mLocalTrackerRunning){
} else if (!mLocalTrackerRunning && mFragmentVisible) {
startPreliminaryTracking();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/content_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:layout="@layout/fragment_main" />

0 comments on commit 2873cc6

Please sign in to comment.