Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b30445a4 authored by Yongshun Liu's avatar Yongshun Liu
Browse files

a11y: Throttle motion events for magnification UI update

This change introduces a throttling mechanism for motion events
to prevent excessive UI updates in magnification.

Previously, only mouse events were throttled, leading to potential
performance issues with touch events. This change extends the
throttling to touch events as well, guarded by a feature flag
`throttle_motion_events_for_ui_update`.

The following tests have been added to ensure the throttling works
as expected with and without the feature flag:
- onTouchEvent_withThrottleEnabled_shouldRateLimit
- onTouchEvent_withThrottleEnabled_shouldNotRateLimitAfterDelay
- onTouchEvent_withThrottleDisabled_shouldNotRateLimit

Bug: 435498747
Flag: com.android.server.accessibility.throttle_motion_events_for_ui_update
Test: atest MagnificationControllerTest
Change-Id: I2283d944ab30c6eed4f03d56d42afac8c6ec33c2
parent 0b4e1d2f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment