Unverified Commit 7fcc50c3 authored by Javier Guerra's avatar Javier Guerra Committed by GitHub

Merge pull request #21 from openconnectivity/develop

Merge develop into master
parents f7c37d83 d37d4be1
...@@ -30,7 +30,7 @@ android { ...@@ -30,7 +30,7 @@ android {
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 28 targetSdkVersion 28
versionCode 13 versionCode 13
versionName "2.8.0" versionName "2.9.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
compileOptions { compileOptions {
......
...@@ -482,7 +482,12 @@ public class DoxsViewModel extends BaseViewModel { ...@@ -482,7 +482,12 @@ public class DoxsViewModel extends BaseViewModel {
.subscribe( .subscribe(
deviceRole -> { deviceRole -> {
ownedDevice.setDeviceRole(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); ownedDevice.getDeviceInfo().setName(deviceName);
setDeviceName(ownedDevice.getDeviceId(), deviceName); setDeviceName(ownedDevice.getDeviceId(), deviceName);
deviceRoleMultiResponse.setValue(Response.success(ownedDevice)); 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