Use power state change reason SnapDecision to turn screen on when a SnapDecision arrives
Using this value allows USC to handle proximity correctly for snap decision prompts. Fixes: #1291455
Approved by: Lukáš Tinkl
commit0565909f7604fc82bcb90246353392e7e09f5d44
authorAlexandros Frantzis <alexandros.frantzis@canonical.com>
dateThu 1 Oct 2015, 12:04 (11 years ago)
parent8081657074a8bd
plugins/Powerd/Powerd.h+2
@@ -38,6 +38,8 @@ public:
3838 PowerKey = 2, // Display changed state due to user pressing power key
3939 Proximity = 3, // Display changed state due to proximity events
4040 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
4143 };
4244
4345 enum Status {
qml/Notifications/Notification.qml+1−1
@@ -90,7 +90,7 @@ Item {
9090 // Turn on screen as needed (Powerd.Notification means the screen
9191 // stays on for a shorter amount of time)
9292 if (type == Notification.SnapDecision) {
93− Powerd.setStatus(Powerd.On, Powerd.Unknown);
93+ Powerd.setStatus(Powerd.On, Powerd.SnapDecision);
9494 } else if (type != Notification.Confirmation) {
9595 Powerd.setStatus(Powerd.On, Powerd.Notification);
9696 }