Merge lp:~albaguirre/unity8/use-new-display-power-state-interface into lp:unity8
- use-new-display-power-state-interface
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Michael Terry |
Approved revision: | 897 |
Merged at revision: | 985 |
Proposed branch: | lp:~albaguirre/unity8/use-new-display-power-state-interface |
Merge into: | lp:unity8 |
Diff against target: |
155 lines (+33/-33) 5 files modified
plugins/Powerd/Powerd.cpp (+16/-16) plugins/Powerd/Powerd.h (+8/-8) qml/Shell.qml (+1/-1) tests/mocks/Powerd/Powerd.h (+7/-7) tests/qmltests/tst_Shell.qml (+1/-1) |
To merge this branch: | bzr merge lp:~albaguirre/unity8/use-new-display-power-state-interface |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot (community) | continuous-integration | Needs Fixing | |
Michael Terry | Approve | ||
Albert Astals Cid (community) | Needs Fixing | ||
Review via email: mp+219552@code.launchpad.net |
Commit message
Update Powerd plugin and Shell.qml to accommodate changes in the display power state notification.
Description of the change
There are some changes being done to powerd and unity-system-
* Are there any related MPs required for this MP to build/function as expected?
Yes:
The dependent changes in powerd and USC are here:
https:/
https:/
* 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?
N/A
* If you changed the UI, has there been a design review?
N/A
PS Jenkins bot (ps-jenkins) wrote : | # |
Albert Astals Cid (aacid) wrote : | # |
Kevin/Alberto can you please set the commit message and then set as description the "MP Submission Checklist Template" of https:/
kevin gunn (kgunn72) wrote : | # |
> Kevin/Alberto can you please set the commit message and then set as
> description the "MP Submission Checklist Template" of
> https:/
absolutely, we were just getting a silo up first for some pre-flight testing.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:887
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 888. By Alberto Aguirre
-
Update to use display power state change reason
- 889. By Alberto Aguirre
-
merge trunk
- 890. By Alberto Aguirre
-
Keep hook to powerd auto-brightness
Update mock powerd.h to reflect changes in real powerd.h
Alberto Aguirre (albaguirre) wrote : | # |
* Are there any related MPs required for this MP to build/function as expected? Please list.
Yes there are:
https:/
* Did you perform an exploratory manual test run of your code change and any related functionality?
Yes. I tested that the greeter is still shown when powering on/off the screen through the power key and that the greeter is not shown when screen is turned off due to proximity events.
* 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?
N/A
* If you changed the UI, has there been a design review?
N/A
- 891. By Alberto Aguirre
-
Fix missing #endif
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:891
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:891
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Albert Astals Cid (aacid) wrote : | # |
Just for curiosity, do we need the three branches at the same time or can we land the u-s-c and powerd ones and then this one? In case they need to land at the same time is there a silo available for testing?
MichaĆ Sawicz (saviq) wrote : | # |
It's in silo 001, but I'm not sure this is actually ready for review? Alberto, could you please mark this branch Work In Progress if that's what it is?
Alberto Aguirre (albaguirre) wrote : | # |
@Saviq,
It's ready for review but not landing.
@Albert
They need to land at the same time.
Albert Astals Cid (aacid) wrote : | # |
Text conflict in qml/Shell.qml
1 conflicts encountered.
- 892. By Alberto Aguirre
-
merge trunk
- 893. By Alberto Aguirre
-
Hook auto brightness to unity screen instead of powerd
- 894. By Alberto Aguirre
-
tests: fix Powerd constant name
- 895. By Alberto Aguirre
-
merge trunk
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:895
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Alberto Aguirre (albaguirre) wrote : | # |
"
(2 failures / -12)
unity8.
unity8.
"
^-- Expected since it needs the powerd/USC dependencies listed in description
MichaĆ Sawicz (saviq) wrote : | # |
On 18.06.2014 20:36, Alberto Aguirre wrote:
> ^-- Expected since it needs the powerd/USC dependencies listed in description
Shouldn't there be package/dependency version bumps then?
Alberto Aguirre (albaguirre) wrote : | # |
> On 18.06.2014 20:36, Alberto Aguirre wrote:
> > ^-- Expected since it needs the powerd/USC dependencies listed in
> description
>
> Shouldn't there be package/dependency version bumps then?
I don't see a powerd dependency on the current debian/
Michael Terry (mterry) wrote : | # |
With your new branches, yeah maybe USC could get a Recommends for powerd. Depends feels too strong. And Recommends would still pull in powerd by default.
Alberto Aguirre (albaguirre) wrote : | # |
@mterry: I meant should I add a unity-system-
- 896. By Alberto Aguirre
-
merge trunk
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:896
http://
Executed test runs:
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Michael Terry (mterry) wrote : | # |
> @mterry: I meant should I add a unity-system-
Naw, I don't think so. But we're just listening to a DBus interface here. If USC isn't running, it's no big deal, right?
Code looks fine, let me test with silo.
- 897. By Alberto Aguirre
-
merge trunk again...
Michael Terry (mterry) wrote : | # |
Testing with the silo, it doesn't seem like the greeter comes up when I press the power button...
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:896
http://
Executed test runs:
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Michael Terry (mterry) wrote : | # |
* Did you perform an exploratory manual test run of the code change and any related functionality?
- Yes, worked fine after a rebuild of the silo.
* Did CI run pass? If not, please explain why.
- No, but only because of existing qmluitest errors and the autopilot failure is because AP needs the rest of the silo. I tested myself and they passed.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:897
http://
Executed test runs:
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Preview Diff
1 | === modified file 'plugins/Powerd/Powerd.cpp' |
2 | --- plugins/Powerd/Powerd.cpp 2014-03-26 17:54:40 +0000 |
3 | +++ plugins/Powerd/Powerd.cpp 2014-06-24 16:27:39 +0000 |
4 | @@ -19,35 +19,35 @@ |
5 | #include "Powerd.h" |
6 | #include <QDBusPendingCall> |
7 | |
8 | -void autoBrightnessChanged(GSettings *settings, const gchar *key, QDBusInterface *powerd) |
9 | +void autoBrightnessChanged(GSettings *settings, const gchar *key, QDBusInterface *unityScreen) |
10 | { |
11 | bool value = g_settings_get_boolean(settings, key); |
12 | - powerd->asyncCall("userAutobrightnessEnable", QVariant(value)); |
13 | + unityScreen->asyncCall("userAutobrightnessEnable", QVariant(value)); |
14 | } |
15 | |
16 | Powerd::Powerd(QObject* parent) |
17 | : QObject(parent), |
18 | - powerd(NULL) |
19 | + unityScreen(NULL) |
20 | { |
21 | - powerd = new QDBusInterface("com.canonical.powerd", |
22 | - "/com/canonical/powerd", |
23 | - "com.canonical.powerd", |
24 | - QDBusConnection::SM_BUSNAME(), this); |
25 | + unityScreen = new QDBusInterface("com.canonical.Unity.Screen", |
26 | + "/com/canonical/Unity/Screen", |
27 | + "com.canonical.Unity.Screen", |
28 | + QDBusConnection::SM_BUSNAME(), this); |
29 | |
30 | - powerd->connection().connect("com.canonical.powerd", |
31 | - "/com/canonical/powerd", |
32 | - "com.canonical.powerd", |
33 | - "DisplayPowerStateChange", |
34 | - this, |
35 | - SIGNAL(displayPowerStateChange(int, unsigned int))); |
36 | + unityScreen->connection().connect("com.canonical.Unity.Screen", |
37 | + "/com/canonical/Unity/Screen", |
38 | + "com.canonical.Unity.Screen", |
39 | + "DisplayPowerStateChange", |
40 | + this, |
41 | + SIGNAL(displayPowerStateChange(int, int))); |
42 | |
43 | systemSettings = g_settings_new("com.ubuntu.touch.system"); |
44 | - g_signal_connect(systemSettings, "changed::auto-brightness", G_CALLBACK(autoBrightnessChanged), powerd); |
45 | - autoBrightnessChanged(systemSettings, "auto-brightness", powerd); |
46 | + g_signal_connect(systemSettings, "changed::auto-brightness", G_CALLBACK(autoBrightnessChanged), unityScreen); |
47 | + autoBrightnessChanged(systemSettings, "auto-brightness", unityScreen); |
48 | } |
49 | |
50 | Powerd::~Powerd() |
51 | { |
52 | - g_signal_handlers_disconnect_by_data(systemSettings, powerd); |
53 | + g_signal_handlers_disconnect_by_data(systemSettings, unityScreen); |
54 | g_object_unref(systemSettings); |
55 | } |
56 | |
57 | === modified file 'plugins/Powerd/Powerd.h' |
58 | --- plugins/Powerd/Powerd.h 2014-03-26 17:54:40 +0000 |
59 | +++ plugins/Powerd/Powerd.h 2014-06-24 16:27:39 +0000 |
60 | @@ -28,15 +28,15 @@ |
61 | { |
62 | Q_OBJECT |
63 | Q_ENUMS(Status) |
64 | - Q_FLAGS(DisplayFlag DisplayFlags) |
65 | + Q_ENUMS(DisplayStateChangeReason) |
66 | |
67 | public: |
68 | - enum DisplayFlag { |
69 | - UseProximity = 1, // Use proximity sensor to override screen state |
70 | - DisableAutoBrightness = 2, // Force autobrightness to be disabled |
71 | - Bright = 4, // Request the screen to stay bright |
72 | + enum DisplayStateChangeReason { |
73 | + Unknown = 0, |
74 | + Inactivity = 1, // Display changed state due to inactivity |
75 | + PowerKey = 2, // Display changed state due to user pressing power key |
76 | + Proximity = 3, // Display changed state due to proximity events |
77 | }; |
78 | - Q_DECLARE_FLAGS(DisplayFlags, DisplayFlag) |
79 | |
80 | enum Status { |
81 | Off, |
82 | @@ -47,10 +47,10 @@ |
83 | ~Powerd(); |
84 | |
85 | Q_SIGNALS: |
86 | - void displayPowerStateChange(int status, unsigned int flags); |
87 | + void displayPowerStateChange(int status, int reason); |
88 | |
89 | private: |
90 | - QDBusInterface *powerd; |
91 | + QDBusInterface *unityScreen; |
92 | GSettings *systemSettings; |
93 | }; |
94 | |
95 | |
96 | === modified file 'qml/Shell.qml' |
97 | --- qml/Shell.qml 2014-06-13 12:13:51 +0000 |
98 | +++ qml/Shell.qml 2014-06-24 16:27:39 +0000 |
99 | @@ -452,7 +452,7 @@ |
100 | onDisplayPowerStateChange: { |
101 | // We ignore any display-off signals when the proximity sensor |
102 | // is active. This usually indicates something like a phone call. |
103 | - if (status == Powerd.Off && (flags & Powerd.UseProximity) == 0) { |
104 | + if (status == Powerd.Off && reason != Powerd.Proximity) { |
105 | greeter.showNow(); |
106 | } |
107 | |
108 | |
109 | === modified file 'tests/mocks/Powerd/Powerd.h' |
110 | --- tests/mocks/Powerd/Powerd.h 2013-08-21 20:04:24 +0000 |
111 | +++ tests/mocks/Powerd/Powerd.h 2014-06-24 16:27:39 +0000 |
112 | @@ -25,15 +25,15 @@ |
113 | { |
114 | Q_OBJECT |
115 | Q_ENUMS(Status) |
116 | - Q_FLAGS(DisplayFlag DisplayFlags) |
117 | + Q_ENUMS(DisplayStateChangeReason) |
118 | |
119 | public: |
120 | - enum DisplayFlag { |
121 | - UseProximity = 1, // Use proximity sensor to override screen state |
122 | - DisableAutoBrightness = 2, // Force autobrightness to be disabled |
123 | - Bright = 4, // Request the screen to stay bright |
124 | + enum DisplayStateChangeReason { |
125 | + Unknown = 0, |
126 | + Inactivity = 1, // Display changed state due to inactivity |
127 | + PowerKey = 2, // Display changed state due to user pressing power key |
128 | + Proximity = 3, // Display changed state due to proximity events |
129 | }; |
130 | - Q_DECLARE_FLAGS(DisplayFlags, DisplayFlag) |
131 | |
132 | enum Status { |
133 | Off, |
134 | @@ -43,7 +43,7 @@ |
135 | explicit Powerd(QObject *parent = 0); |
136 | |
137 | Q_SIGNALS: |
138 | - void displayPowerStateChange(int status, unsigned int flags); |
139 | + void displayPowerStateChange(int status, int reason); |
140 | }; |
141 | |
142 | #endif |
143 | |
144 | === modified file 'tests/qmltests/tst_Shell.qml' |
145 | --- tests/qmltests/tst_Shell.qml 2014-06-11 15:36:51 +0000 |
146 | +++ tests/qmltests/tst_Shell.qml 2014-06-24 16:27:39 +0000 |
147 | @@ -195,7 +195,7 @@ |
148 | tryCompare(mainApp, "state", ApplicationInfo.Running); |
149 | |
150 | // Try to suspend while proximity is engaged... |
151 | - Powerd.displayPowerStateChange(Powerd.Off, Powerd.UseProximity); |
152 | + Powerd.displayPowerStateChange(Powerd.Off, Powerd.Proximity); |
153 | tryCompare(greeter, "showProgress", 0); |
154 | |
155 | // Now really suspend |
FAILED: Continuous integration, rev:887 /code.launchpad .net/~albaguirr e/unity8/ use-new- display- power-state- interface/ +merge/ 219552/ +edit-commit- message
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https:/
http:// jenkins. qa.ubuntu. com/job/ unity8- ci/2963/ jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- utopic- touch/220 jenkins. qa.ubuntu. com/job/ unity-phablet- qmluitests- trusty/ 1823/console jenkins. qa.ubuntu. com/job/ unity8- utopic- amd64-ci/ 57 jenkins. qa.ubuntu. com/job/ unity8- utopic- armhf-ci/ 57 jenkins. qa.ubuntu. com/job/ unity8- utopic- armhf-ci/ 57/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ unity8- utopic- i386-ci/ 57 jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- runner- mako/711 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- utopic- armhf/452 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- utopic- armhf/452/ artifact/ work/output/ *zip*/output. zip s-jenkins. ubuntu- ci:8080/ job/touch- flash-device/ 7162
Executed test runs:
UNSTABLE: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/unity8- ci/2963/ rebuild
http://