aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/IntellitracProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/IntellitracProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/IntellitracProtocolDecoder.java11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/org/traccar/protocol/IntellitracProtocolDecoder.java b/src/org/traccar/protocol/IntellitracProtocolDecoder.java
index fa1837e50..3b03a6b2d 100644
--- a/src/org/traccar/protocol/IntellitracProtocolDecoder.java
+++ b/src/org/traccar/protocol/IntellitracProtocolDecoder.java
@@ -32,8 +32,8 @@ import org.traccar.model.Position;
public class IntellitracProtocolDecoder extends BaseProtocolDecoder {
- public IntellitracProtocolDecoder(DataManager dataManager, String protocol, Properties properties) {
- super(dataManager, protocol, properties);
+ public IntellitracProtocolDecoder(String protocol) {
+ super(protocol);
}
private static final Pattern pattern = Pattern.compile(
@@ -83,13 +83,10 @@ public class IntellitracProtocolDecoder extends BaseProtocolDecoder {
Integer index = 1;
// Detect device
- String id = parser.group(index++);
- try {
- position.setDeviceId(getDataManager().getDeviceByImei(id).getId());
- } catch(Exception error) {
- Log.warning("Unknown device - " + id);
+ if (!identify(parser.group(index++))) {
return null;
}
+ position.setDeviceId(getDeviceId());
// Date and time
Calendar time = Calendar.getInstance(TimeZone.getTimeZone("UTC"));