|
@@ -11,6 +11,7 @@ import android.os.Bundle;
|
|
|
import android.os.Handler;
|
|
|
import android.os.Looper;
|
|
|
import android.os.PowerManager;
|
|
|
+import android.util.Log;
|
|
|
import android.util.Xml;
|
|
|
import android.view.View;
|
|
|
import android.widget.Button;
|
|
@@ -294,6 +295,7 @@ public class MainActivity
|
|
|
getString(R.string.yes),
|
|
|
getString(R.string.no)
|
|
|
);
|
|
|
+
|
|
|
newFragment.show(getSupportFragmentManager(), DIALOG_TAG_EXIT);
|
|
|
}
|
|
|
|
|
@@ -672,8 +674,10 @@ public class MainActivity
|
|
|
double lat = loc.getLatitude();
|
|
|
double lon = loc.getLongitude();
|
|
|
float acc = loc.getAccuracy();
|
|
|
+
|
|
|
|
|
|
- if ((acc < MIN_ACC) && (0 < lat) && (0 < lon)) {
|
|
|
+
|
|
|
+ if ((acc < MIN_ACC) && (0 < lat) && (-180 < lon)) {
|
|
|
callStartExec(lat, lon);
|
|
|
}
|
|
|
}
|
|
@@ -699,7 +703,8 @@ public class MainActivity
|
|
|
double lon = loc.getLongitude();
|
|
|
float acc = loc.getAccuracy();
|
|
|
|
|
|
- if ((acc < MIN_ACC) && (0 < lat) && (0 < lon)) {
|
|
|
+
|
|
|
+ if ((acc < MIN_ACC) && (0 < lat) && (-180 < lon)) {
|
|
|
callEndExec(lat, lon);
|
|
|
}
|
|
|
}
|
|
@@ -734,7 +739,9 @@ public class MainActivity
|
|
|
super.onDestroy();
|
|
|
|
|
|
if (_refreshDisplayRunnable != null) {
|
|
|
- _refreshDisplayHandler.removeCallbacks(_refreshDisplayRunnable);
|
|
|
+ if (_refreshDisplayHandler != null) {
|
|
|
+ _refreshDisplayHandler.removeCallbacks(_refreshDisplayRunnable);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
Intent intent = new Intent(this, DriveService.class);
|