diff options
Diffstat (limited to 'test/cancel-ussd')
-rwxr-xr-x | test/cancel-ussd | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/test/cancel-ussd b/test/cancel-ussd index 3bccb981..65b0f556 100755 --- a/test/cancel-ussd +++ b/test/cancel-ussd @@ -9,10 +9,15 @@ manager = dbus.Interface(bus.get_object('org.ofono', '/'), 'org.ofono.Manager') properties = manager.GetProperties() - path = properties["Modems"][0] ussd = dbus.Interface(bus.get_object('org.ofono', path), 'org.ofono.SupplementaryServices') -ussd.Cancel() +properties = ussd.GetProperties() +state = properties["State"] + +print "State: %s" % (state) + +if state != "idle": + ussd.Cancel() |