Commit 42898d4a3dbcb859c00a3b2a067fd3ca23dcd3b5

Authored by YevhenBondarenko
1 parent e1373fa8

refactored onAwakeDev

... ... @@ -407,14 +407,13 @@ public class DefaultLwM2MUplinkMsgHandler extends LwM2MExecutorAwareService impl
407 407 LwM2mClient lwM2MClient = this.clientContext.getClientByEndpoint(registration.getEndpoint());
408 408
409 409 if (LwM2MClientState.REGISTERED.equals(lwM2MClient.getState())) {
410   - Lwm2mDeviceProfileTransportConfiguration deviceProfile = clientContext.getProfile(lwM2MClient.getProfileId());
411   -
412 410 PowerMode powerMode = lwM2MClient.getPowerMode();
413 411 if (powerMode == null) {
  412 + Lwm2mDeviceProfileTransportConfiguration deviceProfile = clientContext.getProfile(lwM2MClient.getProfileId());
414 413 powerMode = deviceProfile.getClientLwM2mSettings().getPowerMode();
415 414 }
416 415
417   - if (powerMode.equals(PowerMode.PSM) || powerMode.equals(PowerMode.E_DRX)) {
  416 + if (PowerMode.PSM.equals(powerMode) || PowerMode.E_DRX.equals(powerMode)) {
418 417 initAttributes(lwM2MClient);
419 418 TransportProtos.TransportToDeviceActorMsg toDeviceActorMsg = TransportProtos.TransportToDeviceActorMsg
420 419 .newBuilder()
... ...