diff options
author | Matt Porter <mporter@konsulko.com> | 2017-05-21 08:16:20 -0400 |
---|---|---|
committer | Matt Porter <mporter@konsulko.com> | 2017-05-21 08:19:31 -0400 |
commit | 07502ed69e6d6a1830c168aada4c59ab0220bd24 (patch) | |
tree | 7b525ddd1170863e3f99c2f314feb1e117ab28b3 /app | |
parent | 1f5cd7758161271e7e7c38e5a7dc78396f5c56b8 (diff) |
Add incoming call rejection to telephony binding and phone UI
Adds support for disconnection of an alerting incoming call to
the telephony binding via the hangup verb. This is support in
the phone UI by an additional button being loaded in the
incoming call state allowing the user to decline to answer the
call or use the already present answer call button to accept
it.
AGL-Bug: SPEC-601
Change-Id: I56ad0b813c0f1f24688709d180c3c061d7511651
Signed-off-by: Matt Porter <mporter@konsulko.com>
Diffstat (limited to 'app')
-rw-r--r-- | app/Dialer.qml | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/app/Dialer.qml b/app/Dialer.qml index 51f6a53..be13ec5 100644 --- a/app/Dialer.qml +++ b/app/Dialer.qml @@ -54,14 +54,18 @@ Item { onCallStatusChanged: { if (callStatus == "incoming") { ringtone.active = true + rejectButton.active = true callStatusLabel.text = "Incoming call from " + callClipColp } else if (callStatus == "dialing") { callStatusLabel.text = "Dialing " + callClipColp } else if (callStatus == "active") { + rejectButton.active = false callTimer.startTime = getTime() callTimer.restart() } else if (callStatus == "disconnected") { ringtone.active = false + rejectButton.active = false + callButton.checked = false callTimer.stop() callStatusLabel.text = "" } @@ -167,7 +171,7 @@ Item { Layout.alignment: Qt.AlignHCenter onImage: './images/HMI_Phone_Hangup.svg' offImage: './images/HMI_Phone_Call.svg' - property var active: (number.text.length > 0) || (telephony.callStatus == "incoming") + property var active: (number.text.length > 0) || (telephony.callStatus == "incoming") || (telephony.callStatus == "active") opacity: active ? 1 : 0.25 onCheckedChanged: { @@ -195,6 +199,18 @@ Item { } } + Loader { + id: rejectButton + Layout.alignment: Qt.AlignHCenter + active: false + sourceComponent: ImageButton { + offImage: './images/HMI_Phone_Hangup.svg' + onClicked: { + telephony.hangup() + } + } + } + ListView { Layout.fillWidth: true Layout.preferredHeight: 130 |