fixes #35 ("App crashes on clicking Resume and Clear options simultaneously") - plus: some clean-up

This commit is contained in:
y20k 2018-05-23 11:32:30 +02:00
parent eda489e428
commit 3c5be28ded
7 changed files with 12 additions and 9 deletions

View file

@ -98,7 +98,7 @@ public class MainActivity extends AppCompatActivity implements TrackbookKeys {
private int mFloatingActionButtonState; private int mFloatingActionButtonState;
private int mSelectedTab; private int mSelectedTab;
boolean mBound = false; private boolean mBound = false;
@Override @Override

View file

@ -287,6 +287,9 @@ public class TrackerService extends Service implements TrackbookKeys, SensorEven
// change notification // change notification
displayNotification(false); displayNotification(false);
// reset resume flag
mResumedFlag = false;
// remove listeners // remove listeners
stopFindingLocation(); stopFindingLocation();
mSensorManager.unregisterListener(this); mSensorManager.unregisterListener(this);

View file

@ -4,6 +4,6 @@
android:viewportWidth="24.0" android:viewportWidth="24.0"
android:viewportHeight="24.0"> android:viewportHeight="24.0">
<path <path
android:fillColor="@color/location_buttom_icon" android:fillColor="@color/location_button_icon"
android:pathData="M12,8c-2.21,0 -4,1.79 -4,4s1.79,4 4,4 4,-1.79 4,-4 -1.79,-4 -4,-4zM20.94,11c-0.46,-4.17 -3.77,-7.48 -7.94,-7.94L13,1h-2v2.06C6.83,3.52 3.52,6.83 3.06,11L1,11v2h2.06c0.46,4.17 3.77,7.48 7.94,7.94L11,23h2v-2.06c4.17,-0.46 7.48,-3.77 7.94,-7.94L23,13v-2h-2.06zM12,19c-3.87,0 -7,-3.13 -7,-7s3.13,-7 7,-7 7,3.13 7,7 -3.13,7 -7,7z"/> android:pathData="M12,8c-2.21,0 -4,1.79 -4,4s1.79,4 4,4 4,-1.79 4,-4 -1.79,-4 -4,-4zM20.94,11c-0.46,-4.17 -3.77,-7.48 -7.94,-7.94L13,1h-2v2.06C6.83,3.52 3.52,6.83 3.06,11L1,11v2h2.06c0.46,4.17 3.77,7.48 7.94,7.94L11,23h2v-2.06c4.17,-0.46 7.48,-3.77 7.94,-7.94L23,13v-2h-2.06zM12,19c-3.87,0 -7,-3.13 -7,-7s3.13,-7 7,-7 7,3.13 7,7 -3.13,7 -7,7z"/>
</vector> </vector>

View file

@ -23,7 +23,7 @@
android:clickable="true" android:clickable="true"
android:contentDescription="@string/descr_fab_my_location" android:contentDescription="@string/descr_fab_my_location"
android:focusable="true" android:focusable="true"
app:backgroundTint="@color/location_buttom_background" app:backgroundTint="@color/location_button_background"
app:fabSize="mini" app:fabSize="mini"
app:layout_constraintBottom_toBottomOf="@+id/fabMainButton" app:layout_constraintBottom_toBottomOf="@+id/fabMainButton"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"

View file

@ -9,8 +9,8 @@
<color name="fab_button_card_text">@color/trackbook_white</color> <color name="fab_button_card_text">@color/trackbook_white</color>
<color name="fab_button_card_background">@color/trackbook_grey_dark</color> <color name="fab_button_card_background">@color/trackbook_grey_dark</color>
<color name="location_buttom_icon">@color/trackbook_white</color> <color name="location_button_icon">@color/trackbook_white</color>
<color name="location_buttom_background">@color/trackbook_grey_dark</color> <color name="location_button_background">@color/trackbook_grey_dark</color>
<color name="track_management_text">@color/trackbook_white</color> <color name="track_management_text">@color/trackbook_white</color>
<color name="track_management_icons">@color/trackbook_white</color> <color name="track_management_icons">@color/trackbook_white</color>

View file

@ -9,8 +9,8 @@
<color name="fab_button_card_text">@color/trackbook_grey_dark</color> <color name="fab_button_card_text">@color/trackbook_grey_dark</color>
<color name="fab_button_card_background">@color/trackbook_white</color> <color name="fab_button_card_background">@color/trackbook_white</color>
<color name="location_buttom_icon">@color/trackbook_grey</color> <color name="location_button_icon">@color/trackbook_grey</color>
<color name="location_buttom_background">@color/trackbook_white</color> <color name="location_button_background">@color/trackbook_white</color>
<color name="track_management_text">@color/trackbook_grey_dark</color> <color name="track_management_text">@color/trackbook_grey_dark</color>
<color name="track_management_icons">@color/trackbook_grey_dark</color> <color name="track_management_icons">@color/trackbook_grey_dark</color>

View file

@ -27,10 +27,10 @@ allprojects {
targetSdkVersion = 27 targetSdkVersion = 27
buildToolsVersion = '27.0.3' buildToolsVersion = '27.0.3'
supportLibraryVersion = '27.1.1' supportLibraryVersion = '27.1.1'
constraintLayoutVersion = '1.1.0-beta5' constraintLayoutVersion = '1.1.0-beta6'
osmdroidVersion = '6.0.1' osmdroidVersion = '6.0.1'
gsonVersion = '2.8.4' gsonVersion = '2.8.5'
} }
} }