test: Find the active call and do hangup on that

This commit is contained in:
Marit Henriksen 2011-02-03 14:14:08 +01:00 committed by Denis Kenzior
parent aad3b22924
commit 1031664a9e
1 changed files with 9 additions and 3 deletions

View File

@ -15,9 +15,15 @@ manager = dbus.Interface(bus.get_object('org.ofono', path),
'org.ofono.VoiceCallManager')
calls = manager.GetCalls()
path = calls[0][0]
call = dbus.Interface(bus.get_object('org.ofono', path),
for path, properties in calls:
state = properties["State"]
print "[ %s ] %s" % (path, state)
if state != "active":
continue
call = dbus.Interface(bus.get_object('org.ofono', path),
'org.ofono.VoiceCall')
call.Hangup()
call.Hangup()