- Decision
- ADR-195
- Date
- 2026-10-26
- Status
- ProposedProposed (owner request 2026-10-25 and 2026-10-26; patches
frameworks-base/0010andpackages-apps-Settings/0002host-tested, 59 of 59 mutants killed; landed on the build server 2026-10-26 as23ee105cd833andd31f2300fb2;GRB-020isPARTIALandGRB-021partly run onlynx2026102302on 2026-10-27,GRB-022andGRB-023not run). - Part
- Grab detection
- Mentions
- ADR-169, ADR-176, ADR-197
- Mentioned by
- ADR-176, ADR-197, ADR-204, ADR-236, ADR-260
1Decision
Amend ADR-176: an impact after a short free fall is a set-down and does not lock. GrabDetector tracks the runs of accelerometer samples with a magnitude below 4 m/s² and, at an impact (deviation from gravity at or above grab_impact_peak_dms2), takes the longest run that ended within the 400 ms before it.
No free fall, or one of at least 250 ms (a fall of about 30 cm), locks as before; a shorter one does not, and the rest of that pulse is not judged again for 250 ms (the pull rule of ADR-169 still sees it).
The owner chooses the strictness in Settings (exploit protection page; the placement is amended by ADR-197), stored as grab_impact_level: 0 strictest (today's behaviour of ADR-176, every impact locks), 1 standard (default; the rule above), 2 relaxed (the rule above and twice the impact peak, for running). The log line of an impact names the free fall, the verdict and the level.
2Why and evidence
The owner called a lock after a set-down from about 3 cm unreasonable (GRB-018, 2026-10-25), asked for a setting from the strictest level to a relaxed one for running, and wants a real fall (a train) to lock.
[measured] (GRB-019; the real detector replayed over the recordings at 50 Hz, the rate of SENSOR_DELAY_GAME, in five phases of the sample grid, 2026-10-26): 12 staged grabs have no free fall in any phase; 15 to 17 set-downs of 3 cm have one of 20 to 101 ms, 13 hard set-downs 20 to 159 ms, so at level 1 all 12 grabs lock and none of 28 to 30 set-downs does; at level 0 every one locks; at level 2 (60 m/s²) 4 to 6 of the 12 grabs lock through this route.
The limit of 250 ms leaves 91 ms of margin above the longest set-down measured. Prior art: ADR-176 rejected a free-fall check because a lock after a drop was accepted; that reason falls with the owner's request, and a real fall still locks (a free fall of 250 ms or more).
Not rejected here, left out: a minimum pulse width, which would stop the one 4 ms spike of a pickup that still locks at level 1, because a missed snatch is worse than a false lock and no short grab pulse is measured either way.
3Consequences
One more key (grab_impact_level, global, default 1), a free-fall run tracker in GrabDetector and a list in Settings; no new permission, Binder interface or sensor. A thief cannot choose the level, but a sample below 4 m/s² just before a snatch would make that impact a set-down; none of 12 grabs had one [measured], and the pull rule remains for a snatch with touch.
The result stands on 12 grabs and 29 set-downs of one hand and one phone [assumption] for other hands, other surfaces and the real sensor rate. Level 2 for running is [assumption]: no run is measured and the peak factor of 2 is a guess. A fall from 50 cm to 1 m, a thief who lets go and walking, which should lock or not lock by the rule, are not measured.
A phone dropped from the hand onto a soft surface and a very hard set-down are the cases most likely to sit near the limit.
4Review when
The falls from 30 cm to 1 m do not all lock; a grab is found with a free fall before the impact; daily use shows locks after set-downs or missed snatches; a run shows impacts of 30 m/s² or more at level 1 (then the relaxed level needs its own measurement).
Read from docs/governance/decision-log.md, entry ADR-195.