Merge lp:~ken-vandine/ubuntu-system-settings/call_forwarding into lp:ubuntu-system-settings

Proposed by Ken VanDine
Status: Merged
Approved by: Ken VanDine
Approved revision: 812
Merged at revision: 830
Proposed branch: lp:~ken-vandine/ubuntu-system-settings/call_forwarding
Merge into: lp:ubuntu-system-settings
Diff against target: 198 lines (+86/-49)
2 files modified
plugins/phone/CallForwarding.qml (+85/-46)
plugins/phone/PageComponent.qml (+1/-3)
To merge this branch: bzr merge lp:~ken-vandine/ubuntu-system-settings/call_forwarding
Reviewer Review Type Date Requested Status
Sebastien Bacher (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+227761@code.launchpad.net

Commit message

[phone] Call forwarding implementation

Description of the change

Call forwarding implementation per design spec https://wiki.ubuntu.com/PhoneApp#Settings

This is enough to provide the feature, but not completely per design:
 * No contacts integration
 * Uses OSK for dial pad instead of embedding a dial pad

We'll need to prioritize the work to complete based on the design spec.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:811
http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-ci/1034/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/2325
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/1912
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-amd64-ci/226
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-armhf-ci/226
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-armhf-ci/226/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-i386-ci/226
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/2511
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/3536
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/3536/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/10231
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/1603
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2142
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2142/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/ubuntu-system-settings-ci/1034/rebuild

review: Approve (continuous-integration)
812. By Ken VanDine

removed debugging output

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:812
http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-ci/1036/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/2346
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/1925
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-amd64-ci/228
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-armhf-ci/228
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-armhf-ci/228/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-i386-ci/228
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/2525
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/3559
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/3559/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/10247
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/1614
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2159
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2159/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/ubuntu-system-settings-ci/1036/rebuild

review: Approve (continuous-integration)
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks, looks fine. You use modem(0), is that going to be valid in the multisim case as well or is multisim support going to be part of another changeset?

Oh, and where did you get the styling/colors from?

review: Needs Information
Revision history for this message
Ken VanDine (ken-vandine) wrote :

> Thanks, looks fine. You use modem(0), is that going to be valid in the
> multisim case as well or is multisim support going to be part of another
> changeset?
>
> Oh, and where did you get the styling/colors from?

The modem path will need to change for dualsim.

The styling/colors come from dialer-app

Revision history for this message
Sebastien Bacher (seb128) wrote :

Ok, thanks. I don't have a SIM here to test those changes, could somebody do before approving the changes? The code looks fine to me, so +1 to merge it if testing shows it's working

review: Approve
Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

I tested the debs as follows:

Set call forwarding on, directed to my office land line
Made a call to the conference line with the Mako
Called the mako from my other mobile
Answered the call on the office phone

I disabled call forwarding, called again and received the call while on another call.

Works for me

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'plugins/phone/CallForwarding.qml'
--- plugins/phone/CallForwarding.qml 2013-07-31 13:38:47 +0000
+++ plugins/phone/CallForwarding.qml 2014-07-22 20:10:38 +0000
@@ -22,34 +22,49 @@
22import SystemSettings 1.022import SystemSettings 1.0
23import Ubuntu.Components 0.123import Ubuntu.Components 0.1
24import Ubuntu.Components.ListItems 0.1 as ListItem24import Ubuntu.Components.ListItems 0.1 as ListItem
25import MeeGo.QOfono 0.2
2526
26ItemPage {27ItemPage {
27 title: i18n.tr("Call forwarding")28 title: i18n.tr("Call forwarding")
28 property bool canCheckForwarding: true29
2930 property bool forwarding: callForwarding.voiceUnconditional !== ""
30 /* Simulate going off and retreiving the status, TODO: replace by real data */31 property string modem
31 Timer {32
32 id: callForwardingTimer33 onForwardingChanged: {
33 interval: 300034 if (callForwardingSwitch.checked !== forwarding)
34 running: true35 callForwardingSwitch.checked = forwarding;
35 onTriggered: canCheckForwarding = false36 }
37
38 OfonoCallForwarding {
39 id: callForwarding
40 modemPath: modem
41 onVoiceUnconditionalChanged: {
42 destNumberField.text = voiceUnconditional;
43 }
44 onVoiceUnconditionalComplete: {
45 callForwardingIndicator.running = false;
46 if (callForwardingSwitch.checked !== forwarding)
47 callForwardingSwitch.checked = forwarding;
48 }
36 }49 }
3750
38 Switch {51 Switch {
39 id: callForwardingSwitch52 id: callForwardingSwitch
40 checked: false53 checked: forwarding
41 visible: callForwardingItem.control == callForwardingSwitch54 enabled: (forwarding === checked)
55 visible: callForwardingItem.control === callForwardingSwitch
56 onCheckedChanged: {
57 if (!checked && forwarding) {
58 callForwardingIndicator.running = true;
59 callForwarding.voiceUnconditional = "";
60 }
61 }
42 }62 }
4363
44 ActivityIndicator {64 ActivityIndicator {
45 id: callForwardingIndicator65 id: callForwardingIndicator
46 running: true66 running: false
47 visible: callForwardingItem.control == callForwardingIndicator67 visible: running
48 }
49
50 Label {
51 id: contactLabel
52 text: "Not working yet"
53 }68 }
5469
55 Column {70 Column {
@@ -58,12 +73,13 @@
58 ListItem.Standard {73 ListItem.Standard {
59 id: callForwardingItem74 id: callForwardingItem
60 text: i18n.tr("Call forwarding")75 text: i18n.tr("Call forwarding")
61 control: callForwardingTimer.running ? callForwardingIndicator : callForwardingSwitch76 control: callForwardingIndicator.running ?
77 callForwardingIndicator : callForwardingSwitch
62 }78 }
6379
64 ListItem.Base {80 ListItem.Base {
65 height: textItem.height + units.gu(2)81 height: textItem.height + units.gu(2)
66 Text {82 Label {
67 id: textItem83 id: textItem
68 anchors {84 anchors {
69 left: parent.left85 left: parent.left
@@ -79,29 +95,35 @@
79 visible: !callForwardingSwitch.checked95 visible: !callForwardingSwitch.checked
80 }96 }
8197
82 ListItem.Base {98 ListItem.Standard {
83 Text {99 id: forwardToItem
84 id: errorTextItem100 text: i18n.tr("Forward to")
85 anchors {101 visible: callForwardingSwitch.checked
86 left: parent.left102 control: TextInput {
87 right: parent.right103 id: destNumberField
88 verticalCenter: parent.verticalCenter104 horizontalAlignment: TextInput.AlignRight
105 width: forwardToItem.width/2
106 inputMethodHints: Qt.ImhDialableCharactersOnly
107 text: callForwarding.voiceUnconditional
108 font.pixelSize: units.dp(18)
109 font.weight: Font.Light
110 font.family: "Ubuntu"
111 color: "#AAAAAA"
112 maximumLength: 20
113 focus: true
114 cursorVisible: text !== callForwarding.voiceUnconditional ||
115 text === ""
116 clip: true
117 opacity: 0.9
118
119 cursorDelegate: Rectangle {
120 anchors.top: parent.top
121 anchors.bottom: parent.bottom
122 width: units.dp(1)
123 color: "#DD4814"
124 visible: destNumberField.cursorVisible
89 }125 }
90
91 text: i18n.tr("Call forwarding status can’t be checked right now. Try again later.")
92 color: "red" // TODO: replace by the standard 'error color' if we get one in the toolkit
93 horizontalAlignment: Text.AlignHCenter
94 wrapMode: Text.WordWrap
95 }126 }
96 showDivider: false
97 visible: !callForwardingSwitch.checked && !canCheckForwarding
98 }
99
100 ListItem.Standard {
101 property string contactName: ""
102 text: i18n.tr("Divert to")
103 control: contactLabel
104 visible: callForwardingSwitch.checked
105 }127 }
106128
107 ListItem.Base {129 ListItem.Base {
@@ -109,15 +131,32 @@
109 Row {131 Row {
110 anchors.centerIn: parent132 anchors.centerIn: parent
111 spacing: units.gu(2)133 spacing: units.gu(2)
112 Repeater {134
113 model: [i18n.tr("Contacts…"), i18n.tr("Cancel"), i18n.tr("Set") ]135 Button {
114 Button {136 text: i18n.tr("Cancel")
115 text: modelData137 width: (buttonsRowId.width-units.gu(2)*4)/3
116 width: (buttonsRowId.width-units.gu(2)*4)/3138 enabled: !callForwardingIndicator.running
139 onClicked: {
140 destNumberField.text =
141 callForwarding.voiceUnconditional;
142 if (forwarding !== callForwardingSwitch.checked)
143 callForwardingSwitch.checked = forwarding;
144 }
145 }
146
147 Button {
148 text: i18n.tr("Set")
149 width: (buttonsRowId.width-units.gu(2)*4)/3
150 enabled: !callForwardingIndicator.running
151 onClicked: {
152 callForwardingIndicator.running = true;
153 callForwarding.voiceUnconditional = destNumberField.text;
117 }154 }
118 }155 }
119 }156 }
120 visible: callForwardingSwitch.checked157 visible: callForwardingSwitch.checked &&
158 (destNumberField.text !==
159 callForwarding.voiceUnconditional)
121 }160 }
122 }161 }
123}162}
124163
=== modified file 'plugins/phone/PageComponent.qml'
--- plugins/phone/PageComponent.qml 2014-07-16 16:44:46 +0000
+++ plugins/phone/PageComponent.qml 2014-07-22 20:10:38 +0000
@@ -49,10 +49,8 @@
4949
50 ListItem.Standard {50 ListItem.Standard {
51 text: i18n.tr("Call forwarding")51 text: i18n.tr("Call forwarding")
52 /* Hide until implemented */
53 visible: showAllUI
54 progression: true52 progression: true
55 onClicked: pageStack.push(Qt.resolvedUrl("CallForwarding.qml"))53 onClicked: pageStack.push(Qt.resolvedUrl("CallForwarding.qml"), {modem: manager.modems[0]})
56 }54 }
5755
58 ListItem.Standard {56 ListItem.Standard {

Subscribers

People subscribed via source and target branches