aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/AutoFonProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/AutoFonProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/AutoFonProtocolDecoder.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/org/traccar/protocol/AutoFonProtocolDecoder.java b/src/org/traccar/protocol/AutoFonProtocolDecoder.java
index 32b4bfa74..e243b93ea 100644
--- a/src/org/traccar/protocol/AutoFonProtocolDecoder.java
+++ b/src/org/traccar/protocol/AutoFonProtocolDecoder.java
@@ -62,8 +62,7 @@ public class AutoFonProtocolDecoder extends BaseProtocolDecoder {
private Position decodePosition(DeviceSession deviceSession, ChannelBuffer buf, boolean history) {
- Position position = new Position();
- position.setProtocol(getProtocolName());
+ Position position = new Position(getProtocolName());
position.setDeviceId(deviceSession.getDeviceId());
if (!history) {
@@ -167,8 +166,7 @@ public class AutoFonProtocolDecoder extends BaseProtocolDecoder {
} else if (type == MSG_45_LOCATION) {
- Position position = new Position();
- position.setProtocol(getProtocolName());
+ Position position = new Position(getProtocolName());
position.setDeviceId(deviceSession.getDeviceId());
short status = buf.readUnsignedByte();