Merge lp:~mterry/unity8/no-home-when-locked into lp:unity8

Proposed by Michael Terry on 2016-04-05
Status: Merged
Approved by: Daniel d'Andrada on 2016-04-26
Approved revision: 2329
Merged at revision: 2367
Proposed branch: lp:~mterry/unity8/no-home-when-locked
Merge into: lp:unity8
Diff against target: 40 lines (+18/-1)
2 files modified
qml/Shell.qml (+8/-1)
tests/qmltests/tst_Shell.qml (+10/-0)
To merge this branch: bzr merge lp:~mterry/unity8/no-home-when-locked
Reviewer Review Type Date Requested Status
Daniel d'Andrada (community) 2016-04-05 Approve on 2016-04-26
Unity8 CI Bot continuous-integration Needs Fixing on 2016-04-06
Unity Team 2016-04-12 Pending
Review via email: mp+291050@code.launchpad.net

Commit Message

Ignore Home Key presses when the greeter is up.

This avoids pocket presses / dialing on devices like the arale.

Description of the Change

 * 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.
2329. By Michael Terry on 2016-04-05

Check coverPage, not greeter -- it animates closed

Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2328
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/936/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/522
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial,testname=qmluitests.sh/522
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=autopilot.sh/522
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1274
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1245
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/1245
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1243
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1243/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/1243
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/1243/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1243
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1243/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/1243
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/1243/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1243
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1243/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/1243
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/1243/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/936/rebuild

review: Needs Fixing (continuous-integration)
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2329
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/937/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/523
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial,testname=qmluitests.sh/523
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=autopilot.sh/523
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1275
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1246
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/1246
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1244
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1244/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/1244
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/1244/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1244
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1244/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/1244
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/1244/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1244
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1244/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/1244
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/1244/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/937/rebuild

review: Needs Fixing (continuous-integration)
Daniel d'Andrada (dandrader) wrote :

If the display is off, shouldn't that hardware home button be completely disabled? I mean, not even generate the event at driver level.

review: Needs Information
Michael Terry (mterry) wrote :

It can happen if the screen is first turned on. Say by a notification or whatnot. From the linked bug:

"If, for some reason, the display turns on (power button pressed inadvertently or battery notification for example) while the device is in a pocket, the button is pressed, the greeter dismissed and the pocket starts tapping random keys until the device is completely locked."

Daniel d'Andrada (dandrader) wrote :

Code looks sensible. Didn't test though.

review: Approve (code)
Daniel d'Andrada (dandrader) wrote :

It would be nice if you could shorten that first line in the commit message. Unnecessarily verbose

Michael Terry (mterry) wrote :

I made the commit message shorter.

Daniel d'Andrada (dandrader) 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.
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 2016-03-23 09:53:03 +0000
3+++ qml/Shell.qml 2016-04-05 21:18:46 +0000
4@@ -179,7 +179,14 @@
5 }
6
7 WindowInputMonitor {
8- onHomeKeyActivated: { launcher.fadeOut(); shell.showHome(); }
9+ objectName: "windowInputMonitor"
10+ onHomeKeyActivated: {
11+ // Ignore when greeter is active, to avoid pocket presses
12+ if (!greeter.active) {
13+ launcher.fadeOut();
14+ shell.showHome();
15+ }
16+ }
17 onTouchBegun: { cursor.opacity = 0; }
18 onTouchEnded: {
19 // move the (hidden) cursor to the last known touch position
20
21=== modified file 'tests/qmltests/tst_Shell.qml'
22--- tests/qmltests/tst_Shell.qml 2016-03-30 07:46:17 +0000
23+++ tests/qmltests/tst_Shell.qml 2016-04-05 21:18:46 +0000
24@@ -1383,6 +1383,16 @@
25 tryCompare(launcherPanel, "x", -launcherPanel.width);
26 }
27
28+ function test_physicalHomeKeyPressDoesNothingWithActiveGreeter() {
29+ loadShell("phone");
30+
31+ var windowInputMonitor = findInvisibleChild(shell, "windowInputMonitor");
32+ var coverPage = findChild(shell, "coverPage");
33+
34+ windowInputMonitor.homeKeyActivated();
35+ verify(coverPage.shown);
36+ }
37+
38 function test_tabletLogin_data() {
39 return [
40 {tag: "auth error", user: "auth-error", loggedIn: false, password: ""},

Subscribers

People subscribed via source and target branches