on xenial help sign in
Use power state change reason SnapDecision to turn screen on when a SnapDecision arrives
0565909Alexandros Frantzis
plugins/Powerd/Powerd.h+2
@@ -38,6 +38,8 @@ public:
38 PowerKey = 2, // Display changed state due to user pressing power key
38 PowerKey = 2, // Display changed state due to user pressing power key
39 Proximity = 3, // Display changed state due to proximity events
39 Proximity = 3, // Display changed state due to proximity events
40 Notification = 4, // Display changed state due to user notification
40 Notification = 4, // Display changed state due to user notification
41+ SnapDecision = 5, // Display changed state due to snap decision prompt
42+ CallDone = 6, // Display changed state due to voice call end
41 };
43 };
42
44
43 enum Status {
45 enum Status {
qml/Notifications/Notification.qml+1−1
@@ -90,7 +90,7 @@ Item {
90 // Turn on screen as needed (Powerd.Notification means the screen
90 // Turn on screen as needed (Powerd.Notification means the screen
91 // stays on for a shorter amount of time)
91 // stays on for a shorter amount of time)
92 if (type == Notification.SnapDecision) {
92 if (type == Notification.SnapDecision) {
93− Powerd.setStatus(Powerd.On, Powerd.Unknown);
93+ Powerd.setStatus(Powerd.On, Powerd.SnapDecision);
94 } else if (type != Notification.Confirmation) {
94 } else if (type != Notification.Confirmation) {
95 Powerd.setStatus(Powerd.On, Powerd.Notification);
95 Powerd.setStatus(Powerd.On, Powerd.Notification);
96 }
96 }