Repository navigation
Conversation
Raise to Talk kept the gravity sensor on at 10 Hz for as long as the session screen listened, though posture only matters once proximity is covered. Now motion starts with the cover and stops once the raise is decided (a brief cover, a refused raise, a flat phone) or the phone leaves the ear. The posture as it's covered is read from motion's first samples, 100 ms in, and checked again when the 600 ms dwell ends; a sample from before motion started is never read. Ports iOS #313 (7393e966). Verified: scripts/check.sh (full, on the Android VM); four ported IdleVoiceSensorsTests fail on the old detector and pass now. On the emulator with faked sensors (adb emu sensor set), dumpsys sensorservice shows only proximity while idle, gravity on right after a cover, off again after the dwell when flat, and an upright cover raises. Not checked on a real phone.
When the motion sensor starts cold, its first sample can land after the 100 ms posture check, which then had nothing to read and let the cover through; a phone covered flat that turned upright within the dwell could start a call that dev, with motion always warm, refused. Now a cover with no sample at 100 ms takes its posture from the first sample that arrives. The parity row now says the proximity refcount cases don't apply on Android and the cover warming nudge is deferred. Verified: scripts/check.sh (full, on the Android VM); the new aFirstSampleLyingFlatAfterTheEarlyCheckIsNoRaise fails with the check disabled and passes with it.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Raise to Talk kept the gravity sensor running at 10 Hz the whole time a session screen was open with the setting on. Now it runs only from the moment the proximity sensor is covered until the raise is decided, and while the phone is at the ear. Posture is read from the first samples, 100 ms after the cover (or from the first sample to arrive, if the sensor starts slower), and again when the dwell ends. Ports iOS #313 (7393e966).
Verified with the full
scripts/check.sh. The four portedIdleVoiceSensorsTestsand the late-first-sample test fail without the change. On the emulator with faked sensors,dumpsys sensorserviceshows only proximity while idle, gravity switching on with a cover and back off after the dwell when the phone lies flat, and an upright cover still raises.Not tried on a real phone. How quickly a sensor delivers its first sample after starting depends on the device, and on phones without a gravity sensor the accelerometer fallback reads its first samples unfiltered.