Fix Crash

This commit is contained in:
jannis 2019-10-04 13:13:35 +02:00
parent e28a2ad9c2
commit fa0a9ea095
2 changed files with 9 additions and 5 deletions

View File

@ -74,6 +74,8 @@ public class ListWorkoutsActivity extends Activity implements WorkoutAdapter.Wor
findViewById(R.id.workoutListRecordHiking) .setOnClickListener(v -> startRecording(Workout.WORKOUT_TYPE_HIKING));
findViewById(R.id.workoutListRecordCycling).setOnClickListener(v -> startRecording(Workout.WORKOUT_TYPE_CYCLING));
loadData();
checkFirstStart();
adapter= new WorkoutAdapter(workouts, this);

View File

@ -356,11 +356,13 @@ public class RecordWorkoutActivity extends FitoTrackActivity implements Location
@Override
public void onGPSStateChanged(WorkoutRecorder.GpsState oldState, WorkoutRecorder.GpsState state) {
mHandler.post(() -> gpsStatusView.setTextColor(state.color));
mHandler.post(() -> {
gpsStatusView.setTextColor(state.color);
if(!gpsFound && (state != WorkoutRecorder.GpsState.SIGNAL_LOST)){
gpsFound= true;
hideWaitOverlay();
}
});
}
public static class InfoViewHolder{