Skip to content

Commit f6c2acb

Browse files
authored
Merge pull request #115 from yanfalcao/master
Fix crashes with GPS Provider
2 parents 724f7ed + ea2f674 commit f6c2acb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

madlocationmanager/src/main/java/mad/location/manager/lib/locationProviders/GPSLocationProvider.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ public void startLocationUpdates(Settings m_settings, HandlerThread thread) {
111111
m_locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,
112112
m_settings.gpsMinTime, m_settings.gpsMinDistance, this);
113113
} else {
114-
thread.start();
114+
if(thread.getState() == Thread.State.NEW)
115+
thread.start();
115116
Criteria criteria = new Criteria();
116117
criteria.setSpeedRequired(true);
117118
criteria.setAccuracy(Criteria.ACCURACY_FINE);

0 commit comments

Comments
 (0)