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
=== modified file 'src/qml/DialerPage/DialerPage.qml'
--- src/qml/DialerPage/DialerPage.qml 2016-10-18 09:28:54 +0000
+++ src/qml/DialerPage/DialerPage.qml 2017-03-22 16:16:45 +0000
@@ -56,10 +56,18 @@
5656
57 ]57 ]
58 title: page.title58 title: page.title
59 focus: false
59 trailingActionBar {60 trailingActionBar {
60 actions: mainView.greeterMode ? actionsGreeter : actionsNormal61 actions: mainView.greeterMode ? actionsGreeter : actionsNormal
61 }62 }
6263
64 // make sure the SIM selector never gets focus
65 onFocusChanged: {
66 if (focus) {
67 focus = false
68 }
69 }
70
63 leadingActionBar {71 leadingActionBar {
64 property list<QtObject> backActionList: [72 property list<QtObject> backActionList: [
65 Action {73 Action {
@@ -95,6 +103,7 @@
95 id: headerSections103 id: headerSections
96 model: mainView.multiplePhoneAccounts ? accountsModel.activeAccountNames : []104 model: mainView.multiplePhoneAccounts ? accountsModel.activeAccountNames : []
97 selectedIndex: accountsModel.defaultCallAccountIndex105 selectedIndex: accountsModel.defaultCallAccountIndex
106 focus: false
98 onSelectedIndexChanged: {107 onSelectedIndexChanged: {
99 if (selectedIndex >= 0) {108 if (selectedIndex >= 0) {
100 mainView.account = accountsModel.activeAccounts[selectedIndex]109 mainView.account = accountsModel.activeAccounts[selectedIndex]
@@ -130,8 +139,11 @@
130 var oldTitle = i18n.tr("SIM Locked")139 var oldTitle = i18n.tr("SIM Locked")
131 // show Emergency Calls for sim locked too. There is going to be an icon indicating it is locked140 // show Emergency Calls for sim locked too. There is going to be an icon indicating it is locked
132 return i18n.tr("Emergency Calls")141 return i18n.tr("Emergency Calls")
133 } else if (mainView.account && mainView.account.networkName != "") {142 } else if (mainView.account && mainView.account.networkName && mainView.account.networkName != "") {
134 return mainView.account.networkName143 return mainView.account.networkName
144 } else if (mainView.account && mainView.account.type != AccountEntry.PhoneAccount) {
145 return mainView.account.protocolInfo.serviceDisplayName != "" ? mainView.account.protocolInfo.serviceDisplayName :
146 mainView.account.protocolInfo.name
135 } else if (multiplePhoneAccounts && !mainView.account) {147 } else if (multiplePhoneAccounts && !mainView.account) {
136 return i18n.tr("Phone")148 return i18n.tr("Phone")
137 }149 }
@@ -165,6 +177,15 @@
165 }177 }
166 ]178 ]
167179
180 // Forward key presses
181 Keys.onPressed: {
182 if (!active) {
183 return
184 }
185
186 keypad.keyPressed(event.key, event.text)
187 }
188
168 function triggerCallAnimation() {189 function triggerCallAnimation() {
169 callAnimation.start();190 callAnimation.start();
170 }191 }
@@ -288,6 +309,9 @@
288 placeHolder: i18n.tr("Enter a number")309 placeHolder: i18n.tr("Enter a number")
289 Keys.forwardTo: [callButton]310 Keys.forwardTo: [callButton]
290 value: mainView.pendingNumberToDial311 value: mainView.pendingNumberToDial
312 onCommitRequested: {
313 callButton.clicked()
314 }
291 }315 }
292316
293 CustomButton {317 CustomButton {
@@ -368,6 +392,13 @@
368 }392 }
369393
370 onKeyPressed: {394 onKeyPressed: {
395 // handle special keys (backspace, arrows, etc)
396 keypadEntry.handleKeyEvent(keycode, keychar)
397
398 if (keycode == Qt.Key_Space) {
399 return
400 }
401
371 callManager.playTone(keychar);402 callManager.playTone(keychar);
372 input.insert(input.cursorPosition, keychar)403 input.insert(input.cursorPosition, keychar)
373 if(checkMMI(dialNumber)) {404 if(checkMMI(dialNumber)) {
374405
=== modified file 'src/qml/DialerPage/KeypadEntry.qml'
--- src/qml/DialerPage/KeypadEntry.qml 2016-08-24 17:52:19 +0000
+++ src/qml/DialerPage/KeypadEntry.qml 2017-03-22 16:16:45 +0000
@@ -33,6 +33,33 @@
33 // this is used by tests. do not remove it33 // this is used by tests. do not remove it
34 property alias selectedText: input.selectedText34 property alias selectedText: input.selectedText
3535
36 signal commitRequested()
37
38 function handleKeyEvent(key, text) {
39 if (input.length == 0) {
40 return
41 }
42
43 switch (key) {
44 case Qt.Key_Backspace:
45 input.remove(input.cursorPosition-1, input.cursorPosition)
46 break
47 case Qt.Key_Delete:
48 input.remove(input.cursorPosition, input.cursorPosition+1)
49 break
50 case Qt.Key_Left:
51 input.cursorPosition--
52 break
53 case Qt.Key_Right:
54 input.cursorPosition++
55 break
56 case Qt.Key_Enter:
57 case Qt.Key_Return:
58 keypadEntry.commitRequested()
59 break
60 }
61 }
62
36 onValueChanged: input.deselect()63 onValueChanged: input.deselect()
3764
38 PhoneNumberField {65 PhoneNumberField {
3966
=== modified file 'src/qml/LiveCallPage/LiveCall.qml'
--- src/qml/LiveCallPage/LiveCall.qml 2016-03-08 02:10:46 +0000
+++ src/qml/LiveCallPage/LiveCall.qml 2017-03-22 16:16:45 +0000
@@ -90,6 +90,14 @@
90 extension: multiplePhoneAccounts ? headerSections : null90 extension: multiplePhoneAccounts ? headerSections : null
91 }91 }
9292
93 Keys.onPressed: {
94 if (!dtmfVisible) {
95 dtmfVisible = true
96 }
97
98 keypad.keyPressed(event.key, event.text)
99 }
100
93 function reportStatus(callObject, text) {101 function reportStatus(callObject, text) {
94 // if a previous status was already set, do not overwrite it102 // if a previous status was already set, do not overwrite it
95 if (statusLabel.text !== "" || callManager.hasCalls) {103 if (statusLabel.text !== "" || callManager.hasCalls) {
@@ -140,7 +148,7 @@
140 callObject["active"] = true;148 callObject["active"] = true;
141 callObject["voicemail"] = call.voicemail;149 callObject["voicemail"] = call.voicemail;
142 callObject["account"] = call.account;150 callObject["account"] = call.account;
143 callObject["phoneNumber"] = call.phoneNumber;151 callObject["phoneNumber"] = contactWatcher.identifier;
144 callObject["held"] = call.held;152 callObject["held"] = call.held;
145 callObject["muted"] = call.muted;153 callObject["muted"] = call.muted;
146 callObject["activeAudioOutput"] = call.activeAudioOutput;154 callObject["activeAudioOutput"] = call.activeAudioOutput;
@@ -282,6 +290,7 @@
282290
283 Component.onCompleted: {291 Component.onCompleted: {
284 callManager.callIndicatorVisible = !active && callManager.hasCalls;292 callManager.callIndicatorVisible = !active && callManager.hasCalls;
293 forceActiveFocus();
285 }294 }
286295
287 Timer {296 Timer {
@@ -617,6 +626,7 @@
617 }626 }
618 }627 }
619 }628 }
629 enabled: audioOutputs.length > 1
620 }630 }
621631
622 LiveCallKeypadButton {632 LiveCallKeypadButton {

Subscribers

People subscribed via source and target branches

to all changes: