diff options
author | Matt Porter <mporter@konsulko.com> | 2017-11-09 15:55:44 -0500 |
---|---|---|
committer | Matt Porter <mporter@konsulko.com> | 2017-11-09 16:00:56 -0500 |
commit | 202a1402f1e59c73e631ef9495c22fee30bafac2 (patch) | |
tree | ba505a8ebf7c0a18f6371df5d09f17b99084cb68 /app/Dialer.qml | |
parent | f9cbfb636f6dce351f26e6b86dcb0080a32cd18d (diff) |
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 <mporter@konsulko.com>
Diffstat (limited to 'app/Dialer.qml')
-rw-r--r-- | app/Dialer.qml | 16 |
1 files changed, 0 insertions, 16 deletions
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) } |