Merge lp:~boiko/dialer-app/live_call_behavior into lp:dialer-app
- live_call_behavior
- Merge into trunk
Status: | Superseded |
---|---|
Proposed branch: | lp:~boiko/dialer-app/live_call_behavior |
Merge into: | lp:dialer-app |
Diff against target: |
443 lines (+45/-213) 9 files modified
debian/dialer-app.install (+0/-1) src/qml/CMakeLists.txt (+0/-1) src/qml/DialerPage/DialerPage.qml (+0/-4) src/qml/LiveCallPage/LiveCall.qml (+32/-18) src/qml/LiveCallPage/LiveCallKeypadButton.qml (+5/-5) src/qml/VoicemailPage/CMakeLists.txt (+0/-7) src/qml/VoicemailPage/VoicemailPage.qml (+0/-150) src/qml/dialer-app.qml (+7/-24) tests/autopilot/dialer_app/tests/test_logs.py (+1/-3) |
To merge this branch: | bzr merge lp:~boiko/dialer-app/live_call_behavior |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot | continuous-integration | Needs Fixing | |
Tiago Salem Herrmann (community) | Needs Fixing | ||
Review via email:
|
This proposal has been superseded by a proposal from 2014-02-21.
Commit message
Improve the live call view behavior by addressing the following points:
- Start in the live call directly when there is an existing call (to avoid showing the dialpad for a short time before loading the live call view).
- Merge the voicemail view into the live call one. This addresses a problem that when you were on a voicemail call and got another call, there was no way to switch between them.
Description of the change
Improve the live call view behavior by addressing the following points:
- Start in the live call directly when there is an existing call (to avoid showing the dialpad for a short time before loading the live call view).
- Merge the voicemail view into the live call one. This addresses a problem that when you were on a voicemail call and got another call, there was no way to switch between them.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Tiago Salem Herrmann (tiagosh) wrote : | # |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:103
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Gustavo Pichorim Boiko (boiko) wrote : | # |
> I think you forgot to remove the comment.
>
> 129 + enabled: false //!isVoicemail
That was actually added there on purpose, I will add a comment explaining why.
- 104. By Gustavo Pichorim Boiko
-
Remove VoicemailPage from the debian packaging.
- 105. By Gustavo Pichorim Boiko
-
Add a note on why the commented code was left there.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:105
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Tiago Salem Herrmann (tiagosh) wrote : | # |
I think I found a bug:
Call voicemail, receive another call and put the voicemail call on hold.
With the new call in foreground enable and disable the keypad. Now switch to the voicemail call and then it is not possible to show the keypad anymore as the button is disabled.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:105
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Tiago Salem Herrmann (tiagosh) wrote : | # |
We should not trigger call() here if the voicemailNumber is empty, otherwise the livecall view will be displayed and after some seconds disappear because no call was actually created.
363 + call(callManage
- 106. By Gustavo Pichorim Boiko
-
Make sure to always show the dialpad for voicemail calls.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:106
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 107. By Gustavo Pichorim Boiko
-
Merge the fixes for the test that involves the messaging app.
- 108. By Gustavo Pichorim Boiko
-
Make sure the phonenumber is not empty before calling.
Unmerged revisions
Preview Diff
1 | === modified file 'debian/dialer-app.install' |
2 | --- debian/dialer-app.install 2014-01-14 04:04:23 +0000 |
3 | +++ debian/dialer-app.install 2014-02-21 19:42:08 +0000 |
4 | @@ -5,7 +5,6 @@ |
5 | usr/share/dialer-app/LiveCallPage |
6 | usr/share/dialer-app/HistoryPage |
7 | usr/share/dialer-app/DialerPage |
8 | -usr/share/dialer-app/VoicemailPage |
9 | usr/share/dialer-app/ContactsPage |
10 | usr/share/dialer-app/assets |
11 | usr/bin/*dialer-app* |
12 | |
13 | === modified file 'src/qml/CMakeLists.txt' |
14 | --- src/qml/CMakeLists.txt 2013-07-31 17:27:42 +0000 |
15 | +++ src/qml/CMakeLists.txt 2014-02-21 19:42:08 +0000 |
16 | @@ -11,5 +11,4 @@ |
17 | add_subdirectory(DialerPage) |
18 | add_subdirectory(HistoryPage) |
19 | add_subdirectory(LiveCallPage) |
20 | -add_subdirectory(VoicemailPage) |
21 | add_subdirectory(ContactsPage) |
22 | |
23 | === modified file 'src/qml/DialerPage/DialerPage.qml' |
24 | --- src/qml/DialerPage/DialerPage.qml 2013-10-08 13:21:55 +0000 |
25 | +++ src/qml/DialerPage/DialerPage.qml 2014-02-21 19:42:08 +0000 |
26 | @@ -29,10 +29,6 @@ |
27 | property alias dialNumber: keypadEntry.value |
28 | property alias input: keypadEntry.input |
29 | |
30 | - function isVoicemailActive() { |
31 | - return mainView.isVoicemailActive(); |
32 | - } |
33 | - |
34 | tools: ToolbarItems { |
35 | opened: false |
36 | locked: true |
37 | |
38 | === modified file 'src/qml/LiveCallPage/LiveCall.qml' |
39 | --- src/qml/LiveCallPage/LiveCall.qml 2014-01-16 20:27:58 +0000 |
40 | +++ src/qml/LiveCallPage/LiveCall.qml 2014-02-21 19:42:08 +0000 |
41 | @@ -36,9 +36,16 @@ |
42 | property bool onHold: call ? call.held : false |
43 | property bool isSpeaker: call ? call.speaker : false |
44 | property bool isMuted: call ? call.muted : false |
45 | - property bool dtmfVisible: false |
46 | + property bool dtmfVisible: call ? call.voicemail : false |
47 | + property bool isVoicemail: call ? call.voicemail : false |
48 | property string phoneNumberSubTypeLabel: "" |
49 | Component.onDestruction: mainView.switchToCallLogView() |
50 | + |
51 | + onCallChanged: { |
52 | + // reset the DTMF keypad visibility status |
53 | + dtmfVisible = (call && call.voicemail); |
54 | + } |
55 | + |
56 | Timer { |
57 | id: callWatcher |
58 | interval: 10000 |
59 | @@ -96,8 +103,18 @@ |
60 | when: liveCall.header && liveCall.active |
61 | } |
62 | |
63 | - // TRANSLATORS: %1 is the duration of the call |
64 | - title: dtmfLabelHelper.text !== "" ? dtmfLabelHelper.text : contactWatcher.alias != "" ? contactWatcher.alias : contactWatcher.phoneNumber |
65 | + title: { |
66 | + if (dtmfLabelHelper.text !== "") { |
67 | + return dtmfLabelHelper.text; |
68 | + } else if (isVoicemail) { |
69 | + return i18n.tr("Voicemail"); |
70 | + } else if (contactWatcher.alias != "") { |
71 | + return contactWatcher.alias; |
72 | + } else { |
73 | + return contactWatcher.phoneNumber; |
74 | + } |
75 | + } |
76 | + |
77 | tools: ToolbarItems { |
78 | opened: false |
79 | locked: true |
80 | @@ -170,7 +187,7 @@ |
81 | |
82 | fillMode: Image.PreserveAspectCrop |
83 | // FIXME: use something different than a hardcoded path of a unity8 asset |
84 | - source: contactWatcher.avatar != "" ? contactWatcher.avatar : "../assets/live_call_background.png" |
85 | + source: (isVoicemail || contactWatcher.avatar == "") ? "../assets/live_call_background.png" : contactWatcher.avatar |
86 | anchors { |
87 | top: topPanel.bottom |
88 | left: parent.left |
89 | @@ -193,7 +210,11 @@ |
90 | Item { |
91 | id: topPanel |
92 | clip: true |
93 | - height: contactWatcher.isUnknown ? 0 : units.gu(5) |
94 | + height: (isVoicemail || contactWatcher.isUnknown) ? 0 : units.gu(5) |
95 | + Behavior on height { |
96 | + UbuntuNumberAnimation { } |
97 | + } |
98 | + |
99 | anchors { |
100 | top: parent.top |
101 | left: parent.left |
102 | @@ -229,17 +250,6 @@ |
103 | bottom: buttonsArea.top |
104 | } |
105 | |
106 | - // FIXME: re-enable the keypad entry once design decides where to place it |
107 | - /*KeypadEntry { |
108 | - id: keypadEntry |
109 | - |
110 | - anchors.centerIn: parent |
111 | - placeHolder: liveCall.number |
112 | - placeHolderPixelFontSize: units.dp(43) |
113 | - focus: true |
114 | - input.readOnly: true |
115 | - }*/ |
116 | - |
117 | Keypad { |
118 | id: keypad |
119 | |
120 | @@ -248,7 +258,6 @@ |
121 | anchors.bottomMargin: units.gu(2) |
122 | anchors.horizontalCenter: parent.horizontalCenter |
123 | onKeyPressed: { |
124 | - //keypadEntry.value += label |
125 | if (call) { |
126 | dtmfEntry += label |
127 | call.sendDTMF(label) |
128 | @@ -331,6 +340,7 @@ |
129 | LiveCallKeypadButton { |
130 | objectName: "muteButton" |
131 | iconSource: selected ? "microphone-mute" : "microphone" |
132 | + enabled: !isVoicemail |
133 | selected: liveCall.isMuted |
134 | iconWidth: units.gu(3) |
135 | iconHeight: units.gu(3) |
136 | @@ -344,6 +354,7 @@ |
137 | LiveCallKeypadButton { |
138 | objectName: "pauseStartButton" |
139 | iconSource: selected ? "media-playback-start" : "media-playback-pause" |
140 | + enabled: !isVoicemail |
141 | selected: liveCall.onHold |
142 | iconWidth: units.gu(3) |
143 | iconHeight: units.gu(3) |
144 | @@ -382,7 +393,9 @@ |
145 | iconSource: "contact" |
146 | iconWidth: units.gu(4) |
147 | iconHeight: units.gu(4) |
148 | - opacity: 0.2 |
149 | + // this button is fully disabled for now, but when it gets enabled again, we need to remember |
150 | + // to still disable it while calling the voicemail |
151 | + enabled: false //!isVoicemail |
152 | |
153 | anchors { |
154 | verticalCenter: hangupButton.verticalCenter |
155 | @@ -406,6 +419,7 @@ |
156 | iconSource: "keypad" |
157 | iconWidth: units.gu(4) |
158 | iconHeight: units.gu(4) |
159 | + enabled: !isVoicemail |
160 | |
161 | anchors { |
162 | verticalCenter: hangupButton.verticalCenter |
163 | |
164 | === modified file 'src/qml/LiveCallPage/LiveCallKeypadButton.qml' |
165 | --- src/qml/LiveCallPage/LiveCallKeypadButton.qml 2013-09-27 17:35:35 +0000 |
166 | +++ src/qml/LiveCallPage/LiveCallKeypadButton.qml 2014-02-21 19:42:08 +0000 |
167 | @@ -27,15 +27,15 @@ |
168 | |
169 | width: units.gu(7) |
170 | height: units.gu(7) |
171 | + opacity: enabled ? 1.0 : 0.2 |
172 | + |
173 | + Behavior on opacity { |
174 | + UbuntuNumberAnimation { } |
175 | + } |
176 | |
177 | property int iconWidth: 0 |
178 | property int iconHeight: 0 |
179 | |
180 | - /*BorderImage { |
181 | - anchors.fill: parent |
182 | - source: (selected || pressed) ? "../assets/dialer_pad_bg_pressed.png" : "../assets/dialer_pad_bg.png" |
183 | - }*/ |
184 | - |
185 | Icon { |
186 | id: icon |
187 | anchors.centerIn: parent |
188 | |
189 | === removed directory 'src/qml/VoicemailPage' |
190 | === removed file 'src/qml/VoicemailPage/CMakeLists.txt' |
191 | --- src/qml/VoicemailPage/CMakeLists.txt 2013-07-31 17:27:42 +0000 |
192 | +++ src/qml/VoicemailPage/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
193 | @@ -1,7 +0,0 @@ |
194 | -file(GLOB VOICEMAIL_QML_JS_FILES *.qml *.js) |
195 | - |
196 | -# make the files visible on qtcreator |
197 | -add_custom_target(dialer_voicemail_QMlFiles ALL SOURCES ${VOICEMAIL_QML_JS_FILES}) |
198 | - |
199 | -install(FILES ${VOICEMAIL_QML_JS_FILES} DESTINATION ${DIALER_APP_DIR}/VoicemailPage) |
200 | - |
201 | |
202 | === removed file 'src/qml/VoicemailPage/VoicemailPage.qml' |
203 | --- src/qml/VoicemailPage/VoicemailPage.qml 2013-09-26 21:39:16 +0000 |
204 | +++ src/qml/VoicemailPage/VoicemailPage.qml 1970-01-01 00:00:00 +0000 |
205 | @@ -1,150 +0,0 @@ |
206 | -/* |
207 | - * Copyright 2012-2013 Canonical Ltd. |
208 | - * |
209 | - * This file is part of phone-app. |
210 | - * |
211 | - * phone-app is free software; you can redistribute it and/or modify |
212 | - * it under the terms of the GNU General Public License as published by |
213 | - * the Free Software Foundation; version 3. |
214 | - * |
215 | - * phone-app is distributed in the hope that it will be useful, |
216 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
217 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
218 | - * GNU General Public License for more details. |
219 | - * |
220 | - * You should have received a copy of the GNU General Public License |
221 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
222 | - */ |
223 | - |
224 | -import QtQuick 2.0 |
225 | -import Ubuntu.Components 0.1 |
226 | -import "../DialerPage" |
227 | -import "../LiveCallPage" |
228 | - |
229 | -Page { |
230 | - id: voicemail |
231 | - |
232 | - property variant contact |
233 | - property QtObject call: callManager.foregroundCall |
234 | - property string number: callManager.voicemailNumber |
235 | - Component.onDestruction: mainView.switchToCallLogView() |
236 | - Timer { |
237 | - id: callWatcher |
238 | - interval: 10000 |
239 | - repeat: false |
240 | - running: true |
241 | - onTriggered: { |
242 | - if (!call) { |
243 | - // TODO: notify about failed call |
244 | - pageStack.pop() |
245 | - } |
246 | - } |
247 | - } |
248 | - |
249 | - title: i18n.tr("Voicemail") |
250 | - |
251 | - function isVoicemailActive() { |
252 | - return mainView.isVoicemailActive(); |
253 | - } |
254 | - |
255 | - function endCall() { |
256 | - if (call) { |
257 | - call.endCall(); |
258 | - } |
259 | - } |
260 | - |
261 | - Item { |
262 | - id: container |
263 | - |
264 | - anchors.fill: parent |
265 | - |
266 | - Item { |
267 | - id: body |
268 | - |
269 | - anchors.fill: parent |
270 | - |
271 | - Label { |
272 | - id: number |
273 | - |
274 | - anchors.horizontalCenter: parent.horizontalCenter |
275 | - anchors.bottom: stopWatch.top |
276 | - anchors.topMargin: units.gu(0.5) |
277 | - text: voicemail.number |
278 | - color: "#a0a0a2" |
279 | - style: Text.Sunken |
280 | - styleColor: Qt.rgba(0.0, 0.0, 0.0, 0.5) |
281 | - fontSize: "medium" |
282 | - } |
283 | - |
284 | - Label { |
285 | - id: dialing |
286 | - |
287 | - anchors.horizontalCenter: parent.horizontalCenter |
288 | - anchors.topMargin: units.gu(2) |
289 | - anchors.top: number.bottom |
290 | - |
291 | - text: i18n.tr("Dialing") |
292 | - color: "#a0a0a2" |
293 | - style: Text.Sunken |
294 | - styleColor: Qt.rgba(0.0, 0.0, 0.0, 0.5) |
295 | - fontSize: "medium" |
296 | - opacity: (call && call.voicemail && call.dialing) ? 1.0 : 0.0 |
297 | - } |
298 | - |
299 | - StopWatch { |
300 | - id: stopWatch |
301 | - time: call && call.voicemail ? call.elapsedTime : 0 |
302 | - |
303 | - anchors.horizontalCenter: parent.horizontalCenter |
304 | - anchors.topMargin: units.gu(2) |
305 | - anchors.bottom: keypad.top |
306 | - opacity: (call && call.voicemail && !call.dialing) ? 1.0 : 0.0 |
307 | - } |
308 | - |
309 | - Keypad { |
310 | - id: keypad |
311 | - |
312 | - anchors.horizontalCenter: parent.horizontalCenter |
313 | - anchors.verticalCenter: parent.verticalCenter |
314 | - onKeyPressed: { |
315 | - if (call) { |
316 | - call.sendDTMF(label) |
317 | - } |
318 | - } |
319 | - } |
320 | - |
321 | - Row { |
322 | - anchors.top: keypad.bottom |
323 | - anchors.topMargin: units.gu(3) |
324 | - anchors.horizontalCenter: parent.horizontalCenter |
325 | - spacing: units.gu(0.5) |
326 | - Button { |
327 | - id: dialhangupButton |
328 | - iconSource: "../assets/incall_hangup.png" |
329 | - width: isVoicemailActive() ? units.gu(8) : units.gu(16) |
330 | - color: isVoicemailActive() ? "#bf400c" : "#268bd2" |
331 | - onClicked: { |
332 | - if(isVoicemailActive()) |
333 | - endCall() |
334 | - else |
335 | - mainView.callNumber(voicemail.number) |
336 | - } |
337 | - } |
338 | - |
339 | - Button { |
340 | - id: speakerButton |
341 | - width: units.gu(8) |
342 | - visible: isVoicemailActive() |
343 | - iconSource: call && call.speaker ? "../assets/speaker.png" : "../assets/speaker-mute.png" |
344 | - color: "#565656" |
345 | - state: call && call.speaker ? "pressed" : "" |
346 | - onClicked: { |
347 | - if (call) { |
348 | - call.speaker = !call.speaker |
349 | - } |
350 | - } |
351 | - } |
352 | - } |
353 | - } |
354 | - } |
355 | -} |
356 | |
357 | === modified file 'src/qml/dialer-app.qml' |
358 | --- src/qml/dialer-app.qml 2014-01-29 19:29:32 +0000 |
359 | +++ src/qml/dialer-app.qml 2014-02-21 19:42:08 +0000 |
360 | @@ -55,22 +55,13 @@ |
361 | } |
362 | |
363 | function callVoicemail() { |
364 | - if (!telepathyHelper.connected || callManager.voicemailNumber === "") { |
365 | - return |
366 | - } |
367 | - if (pageStack.depth === 1 && !callManager.hasCalls) { |
368 | - pageStack.push(Qt.resolvedUrl("VoicemailPage/VoicemailPage.qml")) |
369 | - } |
370 | - callManager.startCall(callManager.voicemailNumber); |
371 | + call(callManager.voicemailNumber); |
372 | } |
373 | |
374 | function call(number) { |
375 | if (!telepathyHelper.connected) { |
376 | return |
377 | } |
378 | - if (number === callManager.voicemailNumber) { |
379 | - callVoicemail() |
380 | - } |
381 | if (pageStack.depth === 1 && !callManager.hasCalls) { |
382 | pageStack.push(Qt.resolvedUrl("LiveCallPage/LiveCall.qml")) |
383 | } |
384 | @@ -81,17 +72,14 @@ |
385 | pageStack.currentPage.currentTab = 2; |
386 | } |
387 | |
388 | - function isVoicemailActive() { |
389 | - if (callManager.foregroundCall) { |
390 | - return callManager.foregroundCall.voicemail; |
391 | - } else { |
392 | - return false |
393 | - } |
394 | - } |
395 | - |
396 | Component.onCompleted: { |
397 | Theme.name = "Ubuntu.Components.Themes.SuruGradient"; |
398 | pageStack.push(Qt.createComponent("MainPage.qml")) |
399 | + |
400 | + // if there are calls, even if we don't have info about them yet, push the livecall view |
401 | + if (callManager.hasCalls) { |
402 | + pageStack.push(Qt.resolvedUrl("LiveCallPage/LiveCall.qml")); |
403 | + } |
404 | } |
405 | |
406 | Connections { |
407 | @@ -112,12 +100,7 @@ |
408 | } |
409 | // if there are no calls, or if the views are already loaded, do not continue processing |
410 | if ((callManager.foregroundCall || callManager.backgroundCall) && pageStack.depth === 1) { |
411 | - if ((callManager.foregroundCall && callManager.foregroundCall.voicemail) |
412 | - || (callManager.backgroundCall && callManager.backgroundCall.voicemail)) { |
413 | - pageStack.push(Qt.resolvedUrl("VoicemailPage/VoicemailPage.qml")) |
414 | - } else { |
415 | - pageStack.push(Qt.resolvedUrl("LiveCallPage/LiveCall.qml")); |
416 | - } |
417 | + pageStack.push(Qt.resolvedUrl("LiveCallPage/LiveCall.qml")); |
418 | application.activateWindow(); |
419 | } |
420 | } |
421 | |
422 | === modified file 'tests/autopilot/dialer_app/tests/test_logs.py' |
423 | --- tests/autopilot/dialer_app/tests/test_logs.py 2014-02-12 17:42:47 +0000 |
424 | +++ tests/autopilot/dialer_app/tests/test_logs.py 2014-02-21 19:42:08 +0000 |
425 | @@ -23,7 +23,6 @@ |
426 | import os |
427 | import subprocess |
428 | import time |
429 | -import unittest |
430 | |
431 | |
432 | @skipIf(model() == 'Desktop', |
433 | @@ -77,9 +76,8 @@ |
434 | |
435 | self.assertThat(msg_app_view.visible, Eventually(Equals(True))) |
436 | self.assertThat(msgs_pane.visible, Eventually(Equals(True))) |
437 | - self.assertThat(msgs_pane.number, Eventually(Equals("800"))) |
438 | + self.assertThat(msgs_pane.title, Eventually(Equals("800"))) |
439 | |
440 | - @unittest.skip('Test is failing, due to OSD bug, will re-enable soon') |
441 | def test_add_new_contact_from_log(self): |
442 | """Ensure tapping on 'add new contact' item of a call log opens |
443 | the address-book app to allow adding new contact. |
I think you forgot to remove the comment.
129 + enabled: false //!isVoicemail