Сравнить коммиты
| Автор | SHA1 | Дата | |
|---|---|---|---|
|
|
43e108de8c | ||
|
|
fedce0e26b | ||
|
|
e24d725feb | ||
|
|
3198bee2f2 |
@@ -9,8 +9,8 @@ android {
|
|||||||
buildConfigField "boolean", "HIDDEN_APP", "false"
|
buildConfigField "boolean", "HIDDEN_APP", "false"
|
||||||
minSdkVersion 14
|
minSdkVersion 14
|
||||||
targetSdkVersion 26
|
targetSdkVersion 26
|
||||||
versionCode 37
|
versionCode 38
|
||||||
versionName '5.0'
|
versionName '5.1'
|
||||||
}
|
}
|
||||||
|
|
||||||
lintOptions {
|
lintOptions {
|
||||||
|
|||||||
@@ -56,10 +56,10 @@ public abstract class PositionProvider {
|
|||||||
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);
|
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);
|
||||||
locationManager = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE);
|
locationManager = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE);
|
||||||
|
|
||||||
deviceId = preferences.getString(MainFragment.KEY_DEVICE, null);
|
deviceId = preferences.getString(MainFragment.KEY_DEVICE, "undefined");
|
||||||
interval = Long.parseLong(preferences.getString(MainFragment.KEY_INTERVAL, null)) * 1000;
|
interval = Long.parseLong(preferences.getString(MainFragment.KEY_INTERVAL, "600")) * 1000;
|
||||||
distance = Integer.parseInt(preferences.getString(MainFragment.KEY_DISTANCE, null));
|
distance = Integer.parseInt(preferences.getString(MainFragment.KEY_DISTANCE, "0"));
|
||||||
angle = Integer.parseInt(preferences.getString(MainFragment.KEY_ANGLE, null));
|
angle = Integer.parseInt(preferences.getString(MainFragment.KEY_ANGLE, "0"));
|
||||||
|
|
||||||
if (distance > 0 || angle > 0) {
|
if (distance > 0 || angle > 0) {
|
||||||
requestInterval = MINIMUM_INTERVAL;
|
requestInterval = MINIMUM_INTERVAL;
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ public class RequestManager {
|
|||||||
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
|
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
|
||||||
connection.setReadTimeout(TIMEOUT);
|
connection.setReadTimeout(TIMEOUT);
|
||||||
connection.setConnectTimeout(TIMEOUT);
|
connection.setConnectTimeout(TIMEOUT);
|
||||||
|
connection.setRequestMethod("POST");
|
||||||
connection.connect();
|
connection.connect();
|
||||||
inputStream = connection.getInputStream();
|
inputStream = connection.getInputStream();
|
||||||
while (inputStream.read() != -1);
|
while (inputStream.read() != -1);
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
package org.traccar.client;
|
package org.traccar.client;
|
||||||
|
|
||||||
|
import org.junit.Ignore;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.robolectric.RobolectricTestRunner;
|
import org.robolectric.RobolectricTestRunner;
|
||||||
@@ -12,6 +13,7 @@ import static org.junit.Assert.assertTrue;
|
|||||||
@Config(constants = BuildConfig.class, sdk = 21)
|
@Config(constants = BuildConfig.class, sdk = 21)
|
||||||
public class RequestManagerTest {
|
public class RequestManagerTest {
|
||||||
|
|
||||||
|
@Ignore
|
||||||
@Test
|
@Test
|
||||||
public void testSendRequest() throws Exception {
|
public void testSendRequest() throws Exception {
|
||||||
|
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user