From 0ad8a8b3141fe9450bbf7e2a3917932c813a7210 Mon Sep 17 00:00:00 2001 From: Matt Ranostay Date: Wed, 13 Mar 2019 18:25:45 -0700 Subject: phone: qml: enable/disable dialpad on hfp status events Enable/disable the dialpad based on the handsfree profile connection status. Note this has nothing to do with if an active call is connected. Bug-AGL: SPEC-2257 Change-Id: Ibaedab7c6b9a4151fdded73a07a04de9c554e2f0 Signed-off-by: Matt Ranostay --- app/Dialer.qml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/Dialer.qml b/app/Dialer.qml index 248bc6c..11c190e 100644 --- a/app/Dialer.qml +++ b/app/Dialer.qml @@ -34,8 +34,11 @@ Item { Connections { target: telephony - onConnectedChanged: { - // FIXME: keep dialpad inactive until connected + onOnlineChanged: { + dialpad.enabled = connected + if (!connected) { + number.text = '' + } } onCallStateChanged: { @@ -82,6 +85,7 @@ Item { anchors.topMargin: 50 anchors.bottomMargin: 50 spacing: 20 + id: dialpad ColumnLayout { Layout.alignment: Qt.AlignHCenter Label { -- cgit 1.2.3-korg