Get device profile id before the foreach
This commit is contained in:
parent
aa816d61ab
commit
379ba80b2c
@ -682,16 +682,15 @@ public class DefaultTransportService implements TransportService {
|
|||||||
private void onDeviceUpdate(Device device) {
|
private void onDeviceUpdate(Device device) {
|
||||||
long deviceIdMSB = device.getId().getId().getMostSignificantBits();
|
long deviceIdMSB = device.getId().getId().getMostSignificantBits();
|
||||||
long deviceIdLSB = device.getId().getId().getLeastSignificantBits();
|
long deviceIdLSB = device.getId().getId().getLeastSignificantBits();
|
||||||
sessions.forEach((id, md) -> {
|
|
||||||
if (md.getSessionInfo().getDeviceIdMSB() == deviceIdMSB
|
|
||||||
&& md.getSessionInfo().getDeviceIdLSB() == deviceIdLSB) {
|
|
||||||
long deviceProfileIdMSB = device.getDeviceProfileId().getId().getMostSignificantBits();
|
long deviceProfileIdMSB = device.getDeviceProfileId().getId().getMostSignificantBits();
|
||||||
long deviceProfileIdLSB = device.getDeviceProfileId().getId().getLeastSignificantBits();
|
long deviceProfileIdLSB = device.getDeviceProfileId().getId().getLeastSignificantBits();
|
||||||
if (md.getSessionInfo().getDeviceProfileIdMSB() != deviceProfileIdMSB
|
sessions.forEach((id, md) -> {
|
||||||
&& md.getSessionInfo().getDeviceProfileIdLSB() != deviceProfileIdLSB) {
|
if ((md.getSessionInfo().getDeviceIdMSB() == deviceIdMSB
|
||||||
|
&& md.getSessionInfo().getDeviceIdLSB() == deviceIdLSB)
|
||||||
|
&& (md.getSessionInfo().getDeviceProfileIdMSB() != deviceProfileIdMSB
|
||||||
|
&& md.getSessionInfo().getDeviceProfileIdLSB() != deviceProfileIdLSB)) {
|
||||||
transportCallbackExecutor.submit(() -> md.getListener().onDeviceUpdate(device));
|
transportCallbackExecutor.submit(() -> md.getListener().onDeviceUpdate(device));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user