File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed
maestro-client/src/main/java/maestro/device Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -265,7 +265,11 @@ object DeviceService {
265
265
return connectedIphoneList.filter {
266
266
it.connectionProperties.tunnelState == DeviceCtlResponse .ConnectionProperties .CONNECTED
267
267
}.map {
268
- val description = " ${it.deviceProperties.name} - ${it.deviceProperties.osVersionNumber} - ${it.identifier} "
268
+ val description = listOfNotNull(
269
+ it.deviceProperties?.name,
270
+ it.deviceProperties?.osVersionNumber,
271
+ it.identifier
272
+ ).joinToString(" - " )
269
273
270
274
Device .Connected (
271
275
instanceId = it.hardwareProperties.udid,
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ data class DeviceCtlResponse(
19
19
@JsonIgnoreProperties(ignoreUnknown = true )
20
20
data class Device (
21
21
val identifier : String ,
22
- val deviceProperties : DeviceProperties ,
22
+ val deviceProperties : DeviceProperties ? ,
23
23
val hardwareProperties : HardwareProperties ,
24
24
val connectionProperties : ConnectionProperties ,
25
25
)
@@ -35,8 +35,8 @@ data class DeviceCtlResponse(
35
35
36
36
@JsonIgnoreProperties(ignoreUnknown = true )
37
37
data class DeviceProperties (
38
- val name : String ,
39
- val osVersionNumber : String ,
38
+ val name : String? ,
39
+ val osVersionNumber : String? ,
40
40
)
41
41
42
42
@JsonIgnoreProperties(ignoreUnknown = true )
Original file line number Diff line number Diff line change @@ -72,7 +72,6 @@ class DeviceCtlResponseTest {
72
72
"developerModeStatus" : "enabled",
73
73
"hasInternalOSBuild" : false,
74
74
"name" : "xx's iPhone ",
75
- "osVersionNumber" : "18.1.1",
76
75
"rootFileSystemIsWritable" : false
77
76
},
78
77
"hardwareProperties" : {
@@ -147,7 +146,6 @@ class DeviceCtlResponseTest {
147
146
"ddiServicesAvailable" : false,
148
147
"developerModeStatus" : "disabled",
149
148
"hasInternalOSBuild" : false,
150
- "name" : "S’s Apple's Watch",
151
149
"osBuildUpdate" : "22S560",
152
150
"osVersionNumber" : "11.3.1"
153
151
},
You can’t perform that action at this time.
0 commit comments