Fix formatting (fix #3)
Этот коммит содержится в:
@@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="org.traccar.client"
|
package="org.traccar.client"
|
||||||
android:versionCode="4"
|
android:versionCode="5"
|
||||||
android:versionName="1.3">
|
android:versionName="1.4">
|
||||||
<application android:label="@string/app_name" android:icon="@drawable/ic_launcher">
|
<application android:label="@string/app_name" android:icon="@drawable/ic_launcher">
|
||||||
<activity android:name="TraccarActivity"
|
<activity android:name="TraccarActivity"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
package org.traccar.client;
|
package org.traccar.client;
|
||||||
|
|
||||||
import java.util.Formatter;
|
import java.util.Formatter;
|
||||||
|
import java.util.Locale;
|
||||||
import android.location.Location;
|
import android.location.Location;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -28,7 +29,7 @@ public class Protocol {
|
|||||||
*/
|
*/
|
||||||
public static String createId(String id) {
|
public static String createId(String id) {
|
||||||
StringBuilder s = new StringBuilder("$PGID,");
|
StringBuilder s = new StringBuilder("$PGID,");
|
||||||
Formatter f = new Formatter(s);
|
Formatter f = new Formatter(s, Locale.ENGLISH);
|
||||||
|
|
||||||
s.append(id);
|
s.append(id);
|
||||||
|
|
||||||
@@ -46,7 +47,7 @@ public class Protocol {
|
|||||||
*/
|
*/
|
||||||
public static String createNmea(Location l) {
|
public static String createNmea(Location l) {
|
||||||
StringBuilder s = new StringBuilder("$GPRMC,");
|
StringBuilder s = new StringBuilder("$GPRMC,");
|
||||||
Formatter f = new Formatter(s);
|
Formatter f = new Formatter(s, Locale.ENGLISH); // Should use DecimalFormat instead
|
||||||
|
|
||||||
f.format("%1$tH%1$tM%1$tS.%1$tL,A,", l.getTime());
|
f.format("%1$tH%1$tM%1$tS.%1$tL,A,", l.getTime());
|
||||||
|
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user