From 202a1402f1e59c73e631ef9495c22fee30bafac2 Mon Sep 17 00:00:00 2001 From: Matt Porter Date: Thu, 9 Nov 2017 15:55:44 -0500 Subject: Move ringtone logic from QML to Phone class Adds a Phone class that implements ringtone logic. This allows for the ringtone to be started/stopped even if the phone app is not visible (QML render thread not executing) and the QML implementation can be removed. Bug-AGL: SPEC-1081 Change-Id: I7d0dd5f167ce1f53477d6c9d8053111996033e4c Signed-off-by: Matt Porter --- app/Dialer.qml | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'app/Dialer.qml') diff --git a/app/Dialer.qml b/app/Dialer.qml index f4a3272..afeea18 100644 --- a/app/Dialer.qml +++ b/app/Dialer.qml @@ -55,7 +55,6 @@ Item { onCallStateChanged: { if (telephony.callState == "incoming") { rejectButton.active = true - ringtone.active = true callStateLabel.text = "Incoming call from " + telephony.callClip } else if (telephony.callState == "dialing") { callStateLabel.text = "Dialing " + telephony.callColp @@ -67,25 +66,11 @@ Item { rejectButton.active = false callButton.checked = false callTimer.stop() - ringtone.active = false callStateLabel.text = "" } } } - Loader { - id: ringtone - active: false - sourceComponent: Component { - SoundEffect { - loops: SoundEffect.Infinite - source: './Phone.wav' - category: 'phone' - Component.onCompleted: play() - } - } - } - signal showContacts function call(contact) { name.text = contact.name @@ -188,7 +173,6 @@ Item { history.insert(0, contact) if (telephony.callState == "incoming") { telephony.answer() - ringtone.active = false; } else { telephony.dial(number.text) } -- cgit 1.2.3-korg