diff options
author | Xavier Ducrohet <xav@android.com> | 2010-06-08 20:44:11 +0200 |
---|---|---|
committer | Xavier Ducrohet <xav@android.com> | 2010-06-08 20:44:11 +0200 |
commit | 03d44f3cead4ea7b9eb32108ccf4e97dcf960bfb (patch) | |
tree | 6e907e45a284c938ef013f3765f4e86d285c46eb /ddms | |
parent | 3f7087032bba4b7ea52b6bd391d8f3005d51230a (diff) | |
download | sdk-03d44f3cead4ea7b9eb32108ccf4e97dcf960bfb.zip sdk-03d44f3cead4ea7b9eb32108ccf4e97dcf960bfb.tar.gz sdk-03d44f3cead4ea7b9eb32108ccf4e97dcf960bfb.tar.bz2 |
Enforce english formatting for the geo string sent to the emulator.
Change-Id: I1fc90e332fff41e40d2fce740bce8e07d88586ce
Diffstat (limited to 'ddms')
-rw-r--r-- | ddms/libs/ddmlib/src/com/android/ddmlib/EmulatorConsole.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ddms/libs/ddmlib/src/com/android/ddmlib/EmulatorConsole.java b/ddms/libs/ddmlib/src/com/android/ddmlib/EmulatorConsole.java index 6ac019d..a37e03a 100644 --- a/ddms/libs/ddmlib/src/com/android/ddmlib/EmulatorConsole.java +++ b/ddms/libs/ddmlib/src/com/android/ddmlib/EmulatorConsole.java @@ -25,7 +25,9 @@ import java.nio.ByteBuffer; import java.nio.channels.SocketChannel; import java.security.InvalidParameterException; import java.util.Calendar; +import java.util.Formatter; import java.util.HashMap; +import java.util.Locale; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -540,13 +542,15 @@ public final class EmulatorConsole { double latMinute = (absLat - Math.floor(absLat)) * 60; - String command = String.format(COMMAND_GPS, + // need to make sure the string format uses dot and not comma + Formatter formatter = new Formatter(Locale.US); + formatter.format(COMMAND_GPS, c.get(Calendar.HOUR_OF_DAY), c.get(Calendar.MINUTE), c.get(Calendar.SECOND), c.get(Calendar.MILLISECOND), latDegree, latMinute, latDirection, longDegree, longMinute, longDirection); - return processCommand(command); + return processCommand(formatter.toString()); } /** |