Merge lp:~canonical-platform-qa/autopilot/overlay_fix-touch-device into lp:autopilot/overlay

Proposed by Christopher Lee
Status: Merged
Approved by: Christopher Lee
Approved revision: 560
Merged at revision: 557
Proposed branch: lp:~canonical-platform-qa/autopilot/overlay_fix-touch-device
Merge into: lp:autopilot/overlay
Diff against target: 143 lines (+50/-17)
3 files modified
autopilot/input/_uinput.py (+3/-10)
autopilot/tests/unit/test_input.py (+2/-2)
debian/changelog (+45/-5)
To merge this branch: bzr merge lp:~canonical-platform-qa/autopilot/overlay_fix-touch-device
Reviewer Review Type Date Requested Status
Canonical Platform QA Team Pending
PS Jenkins bot continuous-integration Pending
Review via email: mp+264092@code.launchpad.net

This proposal supersedes a proposal from 2015-07-08.

Commit message

Create correct touch device at creation to stop unity8 erroneously changing to windowed mode. (Fixes lp:1471598).

Description of the change

Create correct touch device at creation to stop unity8 erroneously changing to windowed mode. (Fixes lp:1471598).

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'autopilot/input/_uinput.py'
2--- autopilot/input/_uinput.py 2015-03-16 15:14:27 +0000
3+++ autopilot/input/_uinput.py 2015-07-08 01:17:08 +0000
4@@ -23,7 +23,6 @@
5
6 from evdev import UInput, ecodes as e
7
8-import autopilot.platform
9 from autopilot.input import Keyboard as KeyboardBase
10 from autopilot.input import Touch as TouchBase
11 from autopilot.input._common import get_center_point
12@@ -325,13 +324,7 @@
13
14
15 def _get_touch_tool():
16- # android uses BTN_TOOL_FINGER, whereas desktop uses BTN_TOUCH. I have
17- # no idea why...
18- if autopilot.platform.model() == 'Desktop':
19- touch_tool = e.BTN_TOUCH
20- else:
21- touch_tool = e.BTN_TOOL_FINGER
22- return touch_tool
23+ return e.BTN_TOUCH
24
25
26 class _UInputTouchDevice(object):
27@@ -378,7 +371,7 @@
28 self._device.write(
29 e.EV_ABS, e.ABS_MT_TRACKING_ID, self._get_next_tracking_id())
30 press_value = 1
31- self._device.write(e.EV_KEY, e.BTN_TOOL_FINGER, press_value)
32+ self._device.write(e.EV_KEY, _get_touch_tool(), press_value)
33 self._device.write(e.EV_ABS, e.ABS_MT_POSITION_X, int(x))
34 self._device.write(e.EV_ABS, e.ABS_MT_POSITION_Y, int(y))
35 self._device.write(e.EV_ABS, e.ABS_MT_PRESSURE, 400)
36@@ -430,7 +423,7 @@
37 lift_tracking_id = -1
38 self._device.write(e.EV_ABS, e.ABS_MT_TRACKING_ID, lift_tracking_id)
39 release_value = 0
40- self._device.write(e.EV_KEY, e.BTN_TOOL_FINGER, release_value)
41+ self._device.write(e.EV_KEY, _get_touch_tool(), release_value)
42 self._device.syn()
43 self._release_touch_finger()
44
45
46=== modified file 'autopilot/tests/unit/test_input.py'
47--- autopilot/tests/unit/test_input.py 2015-03-22 06:20:40 +0000
48+++ autopilot/tests/unit/test_input.py 2015-07-08 01:17:08 +0000
49@@ -468,7 +468,7 @@
50 call.write(
51 ecodes.EV_ABS, ecodes.ABS_MT_TRACKING_ID, tracking_id),
52 call.write(
53- ecodes.EV_KEY, ecodes.BTN_TOOL_FINGER, press_value),
54+ ecodes.EV_KEY, ecodes.BTN_TOUCH, press_value),
55 call.write(ecodes.EV_ABS, ecodes.ABS_MT_POSITION_X, x),
56 call.write(ecodes.EV_ABS, ecodes.ABS_MT_POSITION_Y, y),
57 call.write(ecodes.EV_ABS, ecodes.ABS_MT_PRESSURE, 400),
58@@ -493,7 +493,7 @@
59 call.write(
60 ecodes.EV_ABS, ecodes.ABS_MT_TRACKING_ID, lift_tracking_id),
61 call.write(
62- ecodes.EV_KEY, ecodes.BTN_TOOL_FINGER, release_value),
63+ ecodes.EV_KEY, ecodes.BTN_TOUCH, release_value),
64 call.syn()
65 ]
66 self.assertEqual(expected_calls, touch._device.mock_calls)
67
68=== modified file 'debian/changelog'
69--- debian/changelog 2015-05-08 04:45:01 +0000
70+++ debian/changelog 2015-07-08 01:17:08 +0000
71@@ -1,12 +1,52 @@
72-autopilot (1.5.0) UNRELEASED; urgency=medium
73-
74+autopilot (1.5.1+15.04.20150522-0ubuntu1) vivid; urgency=medium
75+
76+ [ CI Train Bot ]
77+ * New rebuild forced.
78+
79+ [ Christopher Lee, Federico Gimenez, Leo Arias, Richard Huddie, Vincent Ladeuil ]
80+ * Bug fixes for logging (debug level now -vv) and application of CPO
81+ bases for proxy objects. (LP: #1425721, #1376996, #1420949)
82+
83+ -- CI Train Bot <ci-train-bot@canonical.com> Fri, 22 May 2015 16:54:03 +0000
84+
85+autopilot (1.5.0+15.04.20150408-0ubuntu1) vivid; urgency=medium
86+
87+ [ Albert Astals Cid ]
88+ * Bug fixes related to improving automated runs.
89+
90+ [ Christopher Lee ]
91+ * Bug fixes related to improving automated runs.
92+
93+ -- CI Train Bot <ci-train-bot@canonical.com> Wed, 08 Apr 2015 15:07:28 +0000
94+
95+autopilot (1.5.0+15.04.20150323-0ubuntu1) vivid; urgency=medium
96+
97+ [ CI Train Bot ]
98+ * New rebuild forced.
99+
100+ [ Christopher Lee ]
101+ * Bugfix for Touch pointer pressed. Packaging req. due to python3-xlib
102+ bug.
103+
104+ [ Leo Arias ]
105+ * Bugfix for Touch pointer pressed. Packaging req. due to python3-xlib
106+ bug.
107+
108+ -- CI Train Bot <ci-train-bot@canonical.com> Mon, 23 Mar 2015 09:34:31 +0000
109+
110+autopilot (1.5.0+15.04.20150226.1-0ubuntu1) vivid; urgency=medium
111+
112+ [ Christopher Lee ]
113 * Fix for desktop file name change (lp:1411096)
114 Fix for config value containing '=' char (lp:1408317)
115 Fix for skipped tests not appearing in log (lp:1414632)
116 Add json docs build (for web publish) (lp:1409778)
117 Documentation improvements for API, Tutorial, FAQ, and Guidelines
118
119- -- Christopher Lee <chris.lee@canonical.com> Fri, 27 Feb 2015 10:16:42 +1300
120+ [ CI Train Bot ]
121+ * New rebuild forced.
122+
123+ -- CI Train Bot <ci-train-bot@canonical.com> Thu, 26 Feb 2015 22:47:35 +0000
124
125 autopilot (1.5.0+15.04.20141031-0ubuntu1) vivid; urgency=low
126
127@@ -131,7 +171,7 @@
128 * Remove python2 packages and dependencies, as they're now handled by the
129 autopilot-legacy source package. (lp: #1308661)
130 * Autopilot vis tool can now search the introspection tree. (lp: #1097392)
131- * Autopilot vis tool can now draw a transparent overlay over the selected
132+ * Autopilot vis tool can now draw a transparent overlay over the selected
133 widget.
134 * Autopilot vis tool now shows the root of the introspection tree (lp: #1298600)
135 * Autopilot vis tool can now be launched from the unity dash.
136@@ -265,7 +305,7 @@
137
138 autopilot (1.4+14.04.20140310.1-0ubuntu1) trusty; urgency=low
139
140- *
141+ *
142
143 -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Mon, 10 Mar 2014 19:39:00 +0000
144

Subscribers

People subscribed via source and target branches

to all changes: