diff --git a/build/debian/otgc_native.sh b/build/debian/otgc_native.sh index a0a7bbd..9f5f140 100755 --- a/build/debian/otgc_native.sh +++ b/build/debian/otgc_native.sh @@ -11,7 +11,7 @@ # Constants PROJECT_NAME="otgc" -VERSION="2.8.0" +VERSION="2.9.0" program=$0 diff --git a/pom.xml b/pom.xml index 8eb1b3d..d6e80a8 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ otgc otgc - 2.8.0 + 2.9.0 UTF-8 diff --git a/src/main/java/org/openconnectivity/otgc/viewmodel/ToolbarViewModel.java b/src/main/java/org/openconnectivity/otgc/viewmodel/ToolbarViewModel.java index 3e8d6a1..ca8377c 100644 --- a/src/main/java/org/openconnectivity/otgc/viewmodel/ToolbarViewModel.java +++ b/src/main/java/org/openconnectivity/otgc/viewmodel/ToolbarViewModel.java @@ -466,7 +466,12 @@ public void onboardAllDevices(List devices) { .subscribe( deviceRole -> { ownedDevice.setDeviceRole(deviceRole); - String deviceName = ownedDevice.getDeviceRole().toString() + ownedDevice.getDeviceId().substring(0, 5); + String deviceName; + if (ownedDevice.getDeviceInfo().getName() == null || ownedDevice.getDeviceInfo().getName().isEmpty()) { + deviceName = ownedDevice.getDeviceRole().toString() + "_" + ownedDevice.getDeviceId().substring(0, 5); + } else { + deviceName = ownedDevice.getDeviceInfo().getName() + "_" + ownedDevice.getDeviceId().substring(0, 5); + } ownedDevice.getDeviceInfo().setName(deviceName); setDeviceName(ownedDevice.getDeviceId(), deviceName); deviceRoleMultiResponse.setValue(Response.success(ownedDevice));