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
1=== modified file 'plugins/phone/CallForwarding.qml'
2--- plugins/phone/CallForwarding.qml 2013-07-31 13:38:47 +0000
3+++ plugins/phone/CallForwarding.qml 2014-07-22 20:10:38 +0000
4@@ -22,34 +22,49 @@
5 import SystemSettings 1.0
6 import Ubuntu.Components 0.1
7 import Ubuntu.Components.ListItems 0.1 as ListItem
8+import MeeGo.QOfono 0.2
9
10 ItemPage {
11 title: i18n.tr("Call forwarding")
12- property bool canCheckForwarding: true
13-
14- /* Simulate going off and retreiving the status, TODO: replace by real data */
15- Timer {
16- id: callForwardingTimer
17- interval: 3000
18- running: true
19- onTriggered: canCheckForwarding = false
20+
21+ property bool forwarding: callForwarding.voiceUnconditional !== ""
22+ property string modem
23+
24+ onForwardingChanged: {
25+ if (callForwardingSwitch.checked !== forwarding)
26+ callForwardingSwitch.checked = forwarding;
27+ }
28+
29+ OfonoCallForwarding {
30+ id: callForwarding
31+ modemPath: modem
32+ onVoiceUnconditionalChanged: {
33+ destNumberField.text = voiceUnconditional;
34+ }
35+ onVoiceUnconditionalComplete: {
36+ callForwardingIndicator.running = false;
37+ if (callForwardingSwitch.checked !== forwarding)
38+ callForwardingSwitch.checked = forwarding;
39+ }
40 }
41
42 Switch {
43 id: callForwardingSwitch
44- checked: false
45- visible: callForwardingItem.control == callForwardingSwitch
46+ checked: forwarding
47+ enabled: (forwarding === checked)
48+ visible: callForwardingItem.control === callForwardingSwitch
49+ onCheckedChanged: {
50+ if (!checked && forwarding) {
51+ callForwardingIndicator.running = true;
52+ callForwarding.voiceUnconditional = "";
53+ }
54+ }
55 }
56
57 ActivityIndicator {
58 id: callForwardingIndicator
59- running: true
60- visible: callForwardingItem.control == callForwardingIndicator
61- }
62-
63- Label {
64- id: contactLabel
65- text: "Not working yet"
66+ running: false
67+ visible: running
68 }
69
70 Column {
71@@ -58,12 +73,13 @@
72 ListItem.Standard {
73 id: callForwardingItem
74 text: i18n.tr("Call forwarding")
75- control: callForwardingTimer.running ? callForwardingIndicator : callForwardingSwitch
76+ control: callForwardingIndicator.running ?
77+ callForwardingIndicator : callForwardingSwitch
78 }
79
80 ListItem.Base {
81 height: textItem.height + units.gu(2)
82- Text {
83+ Label {
84 id: textItem
85 anchors {
86 left: parent.left
87@@ -79,29 +95,35 @@
88 visible: !callForwardingSwitch.checked
89 }
90
91- ListItem.Base {
92- Text {
93- id: errorTextItem
94- anchors {
95- left: parent.left
96- right: parent.right
97- verticalCenter: parent.verticalCenter
98+ ListItem.Standard {
99+ id: forwardToItem
100+ text: i18n.tr("Forward to")
101+ visible: callForwardingSwitch.checked
102+ control: TextInput {
103+ id: destNumberField
104+ 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
125 }
126-
127- text: i18n.tr("Call forwarding status can’t be checked right now. Try again later.")
128- color: "red" // TODO: replace by the standard 'error color' if we get one in the toolkit
129- horizontalAlignment: Text.AlignHCenter
130- wrapMode: Text.WordWrap
131 }
132- showDivider: false
133- visible: !callForwardingSwitch.checked && !canCheckForwarding
134- }
135-
136- ListItem.Standard {
137- property string contactName: ""
138- text: i18n.tr("Divert to")
139- control: contactLabel
140- visible: callForwardingSwitch.checked
141 }
142
143 ListItem.Base {
144@@ -109,15 +131,32 @@
145 Row {
146 anchors.centerIn: parent
147 spacing: units.gu(2)
148- Repeater {
149- model: [i18n.tr("Contacts…"), i18n.tr("Cancel"), i18n.tr("Set") ]
150- Button {
151- text: modelData
152- width: (buttonsRowId.width-units.gu(2)*4)/3
153+
154+ Button {
155+ text: i18n.tr("Cancel")
156+ width: (buttonsRowId.width-units.gu(2)*4)/3
157+ enabled: !callForwardingIndicator.running
158+ onClicked: {
159+ destNumberField.text =
160+ callForwarding.voiceUnconditional;
161+ if (forwarding !== callForwardingSwitch.checked)
162+ callForwardingSwitch.checked = forwarding;
163+ }
164+ }
165+
166+ Button {
167+ text: i18n.tr("Set")
168+ width: (buttonsRowId.width-units.gu(2)*4)/3
169+ enabled: !callForwardingIndicator.running
170+ onClicked: {
171+ callForwardingIndicator.running = true;
172+ callForwarding.voiceUnconditional = destNumberField.text;
173 }
174 }
175 }
176- visible: callForwardingSwitch.checked
177+ visible: callForwardingSwitch.checked &&
178+ (destNumberField.text !==
179+ callForwarding.voiceUnconditional)
180 }
181 }
182 }
183
184=== modified file 'plugins/phone/PageComponent.qml'
185--- plugins/phone/PageComponent.qml 2014-07-16 16:44:46 +0000
186+++ plugins/phone/PageComponent.qml 2014-07-22 20:10:38 +0000
187@@ -49,10 +49,8 @@
188
189 ListItem.Standard {
190 text: i18n.tr("Call forwarding")
191- /* Hide until implemented */
192- visible: showAllUI
193 progression: true
194- onClicked: pageStack.push(Qt.resolvedUrl("CallForwarding.qml"))
195+ onClicked: pageStack.push(Qt.resolvedUrl("CallForwarding.qml"), {modem: manager.modems[0]})
196 }
197
198 ListItem.Standard {

Subscribers

People subscribed via source and target branches