Merge lp:~mterry/unity8/dialer-app-lock into lp:unity8

Proposed by Michael Terry
Status: Merged
Approved by: Michael Zanetti
Approved revision: 1371
Merged at revision: 1415
Proposed branch: lp:~mterry/unity8/dialer-app-lock
Merge into: lp:unity8
Diff against target: 94 lines (+59/-1)
2 files modified
qml/Shell.qml (+1/-1)
tests/qmltests/tst_ShellWithPin.qml (+58/-0)
To merge this branch: bzr merge lp:~mterry/unity8/dialer-app-lock
Reviewer Review Type Date Requested Status
Michael Zanetti (community) Approve
PS Jenkins bot (community) continuous-integration Needs Fixing
Review via email: mp+240293@code.launchpad.net

Commit message

Don't lock phone if user tries to switch back to an active call.

Description of the change

Don't lock phone if user tries to switch back to an active call.

== Checklist ==

 * Are there any related MPs required for this MP to build/function as expected? Please list.
 No

 * Did you perform an exploratory manual test run of your code change and any related functionality?
 Yes

 * Did you make sure that your branch does not contain spurious tags?
 Yes

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
 NA

 * If you changed the UI, has there been a design review?
 NA

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~mterry/unity8/dialer-app-lock updated
1371. By Michael Terry

Add tests

Revision history for this message
Michael Terry (mterry) wrote :

Added some tests to cover the locked and unlocked versions of this user interaction.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Michael Zanetti (mzanetti) wrote :
review: Needs Fixing
Revision history for this message
Michael Zanetti (mzanetti) wrote :

> After a merge with trunk some tests are failing:
> https://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-
> utopic/1797/#showFailuresLink

works fine again after merging https://code.launchpad.net/~aacid/unity8/multimediaMocks/+merge/240248 too.

review: Abstain
Revision history for this message
Michael Zanetti (mzanetti) wrote :

 * Did you perform an exploratory manual test run of the code change and any related functionality?

yes

 * Did CI run pass? If not, please explain why.

nope. see previous comments

 * Did you make sure that the branch does not contain spurious tags?

yes

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Shell.qml'
2--- qml/Shell.qml 2014-10-30 21:43:18 +0000
3+++ qml/Shell.qml 2014-10-31 20:02:13 +0000
4@@ -175,7 +175,7 @@
5 target: ApplicationManager
6 onFocusRequested: {
7 if (greeter.narrowMode) {
8- if (appId === "dialer-app" && callManager.hasCalls) {
9+ if (appId === "dialer-app" && callManager.hasCalls && shell.locked) {
10 // If we are in the middle of a call, make dialer lockedApp and show it.
11 // This can happen if user backs out of dialer back to greeter, then
12 // launches dialer again.
13
14=== modified file 'tests/qmltests/tst_ShellWithPin.qml'
15--- tests/qmltests/tst_ShellWithPin.qml 2014-10-30 21:40:34 +0000
16+++ tests/qmltests/tst_ShellWithPin.qml 2014-10-31 20:02:13 +0000
17@@ -160,6 +160,7 @@
18 AccountsService.enableLauncherWhileLocked = true
19 AccountsService.enableIndicatorsWhileLocked = true
20 AccountsService.demoEdges = false
21+ callManager.foregroundCall = null
22
23 // reload our test subject to get it in a fresh state once again
24 shellLoader.active = true
25@@ -212,6 +213,7 @@
26 tryCompare(lockscreen, "shown", false)
27 tryCompare(greeter, "hasLockedApp", true)
28 tryCompare(greeter, "lockedApp", app)
29+ tryCompare(LightDM.Greeter, "active", true)
30 tryCompare(ApplicationManager, "focusedApplicationId", app)
31 }
32
33@@ -386,5 +388,61 @@
34 callManager.foregroundCall = phoneCall
35 confirmLockedApp("dialer-app")
36 }
37+
38+ function test_emergencyDialerActiveCallPanel() {
39+ // Make sure that the following sequence works:
40+ // - Enter emergency mode call
41+ // - Return to greeter
42+ // - Click on active call panel
43+ // - Should be back in emergency mode dialer
44+
45+ var greeter = findChild(shell, "greeter");
46+ var lockscreen = findChild(shell, "lockscreen");
47+
48+ lockscreen.emergencyCall();
49+ confirmLockedApp("dialer-app");
50+ callManager.foregroundCall = phoneCall;
51+
52+ LightDM.Greeter.showGreeter();
53+ tryCompare(lockscreen, "shown", true);
54+ tryCompare(greeter, "hasLockedApp", false);
55+
56+ // simulate a callHint press, the real thing requires dialer: url support
57+ ApplicationManager.requestFocusApplication("dialer-app");
58+
59+ confirmLockedApp("dialer-app");
60+ }
61+
62+ function test_normalDialerActiveCallPanel() {
63+ // Make sure that the following sequence works:
64+ // - Log in
65+ // - Start a call
66+ // - Switch apps
67+ // - Click on active call panel
68+ // - Should be back in normal dialer
69+ // (we've had a bug where we locked screen in this case)
70+
71+ var lockscreen = findChild(shell, "lockscreen");
72+ var panel = findChild(shell, "panel");
73+
74+ enterPin("1234");
75+ tryCompare(lockscreen, "shown", false);
76+ tryCompare(LightDM.Greeter, "active", false);
77+
78+ ApplicationManager.startApplication("dialer-app", ApplicationManager.NoFlag);
79+ tryCompare(ApplicationManager, "focusedApplicationId", "dialer-app");
80+ callManager.foregroundCall = phoneCall;
81+
82+ ApplicationManager.requestFocusApplication("unity8-dash");
83+ tryCompare(ApplicationManager, "focusedApplicationId", "unity8-dash");
84+ tryCompare(panel.callHint, "visible", true);
85+
86+ // simulate a callHint press, the real thing requires dialer: url support
87+ ApplicationManager.requestFocusApplication("dialer-app");
88+
89+ tryCompare(ApplicationManager, "focusedApplicationId", "dialer-app");
90+ tryCompare(lockscreen, "shown", false);
91+ tryCompare(LightDM.Greeter, "active", false);
92+ }
93 }
94 }

Subscribers

People subscribed via source and target branches