@@ -279,6 +279,7 @@ def SetDeviceActive(self, device_path, active_connection_path):
279
279
dev_obj .Set (DEVICE_IFACE , 'ActiveConnection' , dbus .ObjectPath (active_connection_path ))
280
280
old_state = dev_obj .Get (DEVICE_IFACE , 'State' )
281
281
dev_obj .Set (DEVICE_IFACE , 'State' , dbus .UInt32 (DeviceState .ACTIVATED ))
282
+ dev_obj .Set (DEVICE_IFACE , 'StateReason' , (dbus .UInt32 (DeviceState .ACTIVATED ), dbus .UInt32 (0 )))
282
283
283
284
dev_obj .EmitSignal (DEVICE_IFACE , 'StateChanged' , 'uuu' , [dbus .UInt32 (DeviceState .ACTIVATED ), old_state , dbus .UInt32 (1 )])
284
285
@@ -290,6 +291,7 @@ def SetDeviceDisconnected(self, device_path):
290
291
dev_obj .Set (DEVICE_IFACE , 'ActiveConnection' , dbus .ObjectPath ('/' ))
291
292
old_state = dev_obj .Get (DEVICE_IFACE , 'State' )
292
293
dev_obj .Set (DEVICE_IFACE , 'State' , dbus .UInt32 (DeviceState .DISCONNECTED ))
294
+ dev_obj .Set (DEVICE_IFACE , 'StateReason' , (dbus .UInt32 (DeviceState .DISCONNECTED ), dbus .UInt32 (0 )))
293
295
294
296
dev_obj .EmitSignal (DEVICE_IFACE , 'StateChanged' , 'uuu' , [dbus .UInt32 (DeviceState .DISCONNECTED ), old_state , dbus .UInt32 (1 )])
295
297
0 commit comments