Merge lp:~phablet-team/dialer-app/voip_support into lp:dialer-app/staging

Proposed by Gustavo Pichorim Boiko
Status: Merged
Approved by: Renato Araujo Oliveira Filho
Approved revision: 566
Merged at revision: 556
Proposed branch: lp:~phablet-team/dialer-app/voip_support
Merge into: lp:dialer-app/staging
Diff against target: 165 lines (+70/-2)
3 files modified
src/qml/DialerPage/DialerPage.qml (+32/-1)
src/qml/DialerPage/KeypadEntry.qml (+27/-0)
src/qml/LiveCallPage/LiveCall.qml (+11/-1)
To merge this branch: bzr merge lp:~phablet-team/dialer-app/voip_support
Reviewer Review Type Date Requested Status
Renato Araujo Oliveira Filho (community) Approve
system-apps-ci-bot continuous-integration Pending
Review via email: mp+320666@code.launchpad.net

This proposal supersedes a proposal from 2016-12-15.

Commit message

Adapt to work with VOIP accounts.

Description of the change

Adapt to work with VOIP accounts.

To post a comment you must log in.
Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote : Posted in a previous version of this proposal

Some small comments.

review: Needs Information
Revision history for this message
Gustavo Pichorim Boiko (boiko) wrote : Posted in a previous version of this proposal

Comments replied & addressed.

Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:565
https://jenkins.canonical.com/system-apps/job/lp-dialer-app-ci/1/
Executed test runs:

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-dialer-app-ci/1/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote : Posted in a previous version of this proposal

looks good.

review: Approve
Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

looks good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/qml/DialerPage/DialerPage.qml'
2--- src/qml/DialerPage/DialerPage.qml 2016-10-18 09:28:54 +0000
3+++ src/qml/DialerPage/DialerPage.qml 2017-03-22 16:16:45 +0000
4@@ -56,10 +56,18 @@
5
6 ]
7 title: page.title
8+ focus: false
9 trailingActionBar {
10 actions: mainView.greeterMode ? actionsGreeter : actionsNormal
11 }
12
13+ // make sure the SIM selector never gets focus
14+ onFocusChanged: {
15+ if (focus) {
16+ focus = false
17+ }
18+ }
19+
20 leadingActionBar {
21 property list<QtObject> backActionList: [
22 Action {
23@@ -95,6 +103,7 @@
24 id: headerSections
25 model: mainView.multiplePhoneAccounts ? accountsModel.activeAccountNames : []
26 selectedIndex: accountsModel.defaultCallAccountIndex
27+ focus: false
28 onSelectedIndexChanged: {
29 if (selectedIndex >= 0) {
30 mainView.account = accountsModel.activeAccounts[selectedIndex]
31@@ -130,8 +139,11 @@
32 var oldTitle = i18n.tr("SIM Locked")
33 // show Emergency Calls for sim locked too. There is going to be an icon indicating it is locked
34 return i18n.tr("Emergency Calls")
35- } else if (mainView.account && mainView.account.networkName != "") {
36+ } else if (mainView.account && mainView.account.networkName && mainView.account.networkName != "") {
37 return mainView.account.networkName
38+ } else if (mainView.account && mainView.account.type != AccountEntry.PhoneAccount) {
39+ return mainView.account.protocolInfo.serviceDisplayName != "" ? mainView.account.protocolInfo.serviceDisplayName :
40+ mainView.account.protocolInfo.name
41 } else if (multiplePhoneAccounts && !mainView.account) {
42 return i18n.tr("Phone")
43 }
44@@ -165,6 +177,15 @@
45 }
46 ]
47
48+ // Forward key presses
49+ Keys.onPressed: {
50+ if (!active) {
51+ return
52+ }
53+
54+ keypad.keyPressed(event.key, event.text)
55+ }
56+
57 function triggerCallAnimation() {
58 callAnimation.start();
59 }
60@@ -288,6 +309,9 @@
61 placeHolder: i18n.tr("Enter a number")
62 Keys.forwardTo: [callButton]
63 value: mainView.pendingNumberToDial
64+ onCommitRequested: {
65+ callButton.clicked()
66+ }
67 }
68
69 CustomButton {
70@@ -368,6 +392,13 @@
71 }
72
73 onKeyPressed: {
74+ // handle special keys (backspace, arrows, etc)
75+ keypadEntry.handleKeyEvent(keycode, keychar)
76+
77+ if (keycode == Qt.Key_Space) {
78+ return
79+ }
80+
81 callManager.playTone(keychar);
82 input.insert(input.cursorPosition, keychar)
83 if(checkMMI(dialNumber)) {
84
85=== modified file 'src/qml/DialerPage/KeypadEntry.qml'
86--- src/qml/DialerPage/KeypadEntry.qml 2016-08-24 17:52:19 +0000
87+++ src/qml/DialerPage/KeypadEntry.qml 2017-03-22 16:16:45 +0000
88@@ -33,6 +33,33 @@
89 // this is used by tests. do not remove it
90 property alias selectedText: input.selectedText
91
92+ signal commitRequested()
93+
94+ function handleKeyEvent(key, text) {
95+ if (input.length == 0) {
96+ return
97+ }
98+
99+ switch (key) {
100+ case Qt.Key_Backspace:
101+ input.remove(input.cursorPosition-1, input.cursorPosition)
102+ break
103+ case Qt.Key_Delete:
104+ input.remove(input.cursorPosition, input.cursorPosition+1)
105+ break
106+ case Qt.Key_Left:
107+ input.cursorPosition--
108+ break
109+ case Qt.Key_Right:
110+ input.cursorPosition++
111+ break
112+ case Qt.Key_Enter:
113+ case Qt.Key_Return:
114+ keypadEntry.commitRequested()
115+ break
116+ }
117+ }
118+
119 onValueChanged: input.deselect()
120
121 PhoneNumberField {
122
123=== modified file 'src/qml/LiveCallPage/LiveCall.qml'
124--- src/qml/LiveCallPage/LiveCall.qml 2016-03-08 02:10:46 +0000
125+++ src/qml/LiveCallPage/LiveCall.qml 2017-03-22 16:16:45 +0000
126@@ -90,6 +90,14 @@
127 extension: multiplePhoneAccounts ? headerSections : null
128 }
129
130+ Keys.onPressed: {
131+ if (!dtmfVisible) {
132+ dtmfVisible = true
133+ }
134+
135+ keypad.keyPressed(event.key, event.text)
136+ }
137+
138 function reportStatus(callObject, text) {
139 // if a previous status was already set, do not overwrite it
140 if (statusLabel.text !== "" || callManager.hasCalls) {
141@@ -140,7 +148,7 @@
142 callObject["active"] = true;
143 callObject["voicemail"] = call.voicemail;
144 callObject["account"] = call.account;
145- callObject["phoneNumber"] = call.phoneNumber;
146+ callObject["phoneNumber"] = contactWatcher.identifier;
147 callObject["held"] = call.held;
148 callObject["muted"] = call.muted;
149 callObject["activeAudioOutput"] = call.activeAudioOutput;
150@@ -282,6 +290,7 @@
151
152 Component.onCompleted: {
153 callManager.callIndicatorVisible = !active && callManager.hasCalls;
154+ forceActiveFocus();
155 }
156
157 Timer {
158@@ -617,6 +626,7 @@
159 }
160 }
161 }
162+ enabled: audioOutputs.length > 1
163 }
164
165 LiveCallKeypadButton {

Subscribers

People subscribed via source and target branches

to all changes: