Unverified Commit 2ea2412e authored by Javier Guerra's avatar Javier Guerra Committed by GitHub

Merge pull request #18 from openconnectivity/develop

Merge develop into master
parents d2b8c678 99c65d38
......@@ -11,7 +11,7 @@
# Constants
PROJECT_NAME="otgc"
VERSION="2.8.0"
VERSION="2.9.0"
program=$0
......
......@@ -6,7 +6,7 @@
<groupId>otgc</groupId>
<artifactId>otgc</artifactId>
<version>2.8.0</version>
<version>2.9.0</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
......
......@@ -466,7 +466,12 @@ public class ToolbarViewModel implements ViewModel {
.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));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment