sessiond: record the wake, so the trail can tell it from nothing
apply_gesture's dark-panel branch returned Unblank+Restore without a record_decision, while the blank branch records panel-off or lock-before-blank. The trail showed 'button-gesture recognised' and then silence, so a press that woke the panel and a press that was swallowed left identical evidence — which is the one question anyone debugging a dark phone is asking.
This commit is contained in:
parent
8c7567e419
commit
6cb245492e
1 changed files with 10 additions and 0 deletions
|
|
@ -1628,6 +1628,16 @@ impl DeviceStateMachine {
|
|||
// `Restore` puts back the brightness the dim captured rather than a
|
||||
// guessed floor — see the comment on that capture.
|
||||
self.blank_requested = false;
|
||||
// Recorded, because the blank branch below records and this one did
|
||||
// not: the trail showed `button-gesture … recognised` and then
|
||||
// silence, so "the press woke it" and "the press did nothing" were
|
||||
// the same entry. A trail that cannot tell those apart is the one
|
||||
// question anyone debugging a dark phone is actually asking.
|
||||
self.record_decision(
|
||||
"panel-on",
|
||||
serde_json::json!({ "button": "power", "gesture": "tap" }),
|
||||
"a tap on a dark panel is a wake",
|
||||
);
|
||||
return vec![Action::Unblank, Action::Restore];
|
||||
}
|
||||
self.request_blank(
|
||||
|
|
|
|||
Loading…
Reference in a new issue