diff options
author | Anton Tananaev <anton@traccar.org> | 2022-05-30 11:49:39 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-05-30 11:49:39 -0700 |
commit | 154ff3b2175e67b3fac531cb9c5c5c68880f5e12 (patch) | |
tree | f448a59c75b64deea60b1bd6e79d66790f62a4a8 /src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java | |
parent | b1a971eedb18a11af2cdc70ba5f8004bae89defd (diff) | |
download | trackermap-server-154ff3b2175e67b3fac531cb9c5c5c68880f5e12.tar.gz trackermap-server-154ff3b2175e67b3fac531cb9c5c5c68880f5e12.tar.bz2 trackermap-server-154ff3b2175e67b3fac531cb9c5c5c68880f5e12.zip |
Inject media manager
Diffstat (limited to 'src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java')
-rw-r--r-- | src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java index 89931f614..832645374 100644 --- a/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java @@ -1028,8 +1028,7 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder { sendPhotoRequest(channel, pictureId); } else { Device device = Context.getDeviceManager().getById(deviceSession.getDeviceId()); - position.set( - Position.KEY_IMAGE, Context.getMediaManager().writeFile(device.getUniqueId(), photo, "jpg")); + position.set(Position.KEY_IMAGE, writeMediaFile(device.getUniqueId(), photo, "jpg")); photos.remove(pictureId).release(); } @@ -1265,8 +1264,7 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder { position.setDeviceId(deviceSession.getDeviceId()); getLastLocation(position, new Date(timestamp)); Device device = Context.getDeviceManager().getById(deviceSession.getDeviceId()); - position.set(Position.KEY_IMAGE, - Context.getMediaManager().writeFile(device.getUniqueId(), photo, "jpg")); + position.set(Position.KEY_IMAGE, writeMediaFile(device.getUniqueId(), photo, "jpg")); photos.remove(mediaId).release(); } } |