fixes a crash when a user pressed the my location button directly after a recording has been started

master
y20k 2018-11-10 20:52:36 +01:00
parent a2c48a8cc3
commit ba0f97c2db
4 changed files with 28 additions and 2 deletions

View File

@ -406,7 +406,7 @@ public class MainActivityMapFragment extends Fragment implements TrackbookKeys {
GeoPoint position;
// get current position
if (mTrackerServiceRunning && mTrack != null) {
if (mTrackerServiceRunning && mTrack != null && mTrack.getSize() > 0) {
// get current Location from tracker service
mCurrentBestLocation = mTrack.getWayPointLocation(mTrack.getSize() - 1);
} else if (mCurrentBestLocation == null) {

View File

@ -0,0 +1,13 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:viewportHeight="96.0"
android:viewportWidth="96.0"
android:width="24dp">
<path
android:fillAlpha="0.33"
android:fillColor="@color/trackbook_blue"
android:pathData="M48,48m-48,0a48,48 0,1 1,96 0a48,48 0,1 1,-96 0"/>
<path
android:fillColor="@color/trackbook_grey_light"
android:pathData="M48,48m-24,0a24,24 0,1 1,48 0a24,24 0,1 1,-48 0"/>
</vector>

View File

@ -0,0 +1,13 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:viewportHeight="96.0"
android:viewportWidth="96.0"
android:width="24dp">
<path
android:fillAlpha="0.33"
android:fillColor="@color/trackbook_red"
android:pathData="M48,48m-48,0a48,48 0,1 1,96 0a48,48 0,1 1,-96 0"/>
<path
android:fillColor="@color/trackbook_grey_light"
android:pathData="M48,48m-24,0a24,24 0,1 1,48 0a24,24 0,1 1,-48 0"/>
</vector>

View File

@ -33,7 +33,7 @@ allprojects {
constraintlayoutVersion = '1.1.3'
materialVersion = "1.0.0"
appcompatVersion = '1.0.0'
appcompatVersion = '1.0.2'
cardviewVersion = '1.0.0'
osmdroidVersion = '6.0.2'