Prevent UdfpsView from being selectable during a11y enrollment

Touching the sensor area also selects the UdfpsView, which triggers
unnecessary feedback.

Fixes: 187324285
Test: manual
Change-Id: I9761c313d917f11fd42e0d584d6303d2150ce1a0
This commit is contained in:
Kevin Chyn
2021-05-13 17:29:12 -07:00
parent 3e9fddd94f
commit 4c83e679c9

View File

@@ -624,6 +624,14 @@ public class UdfpsController implements DozeReceiver, HbmCallback {
animation.init();
mView.setAnimationViewController(animation);
// This view overlaps the sensor area, so prevent it from being selectable
// during a11y.
if (reason == IUdfpsOverlayController.REASON_ENROLL_FIND_SENSOR
|| reason == IUdfpsOverlayController.REASON_ENROLL_ENROLLING) {
mView.setImportantForAccessibility(
View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS);
}
mWindowManager.addView(mView, computeLayoutParams(animation));
mAccessibilityManager.addTouchExplorationStateChangeListener(
mTouchExplorationStateChangeListener);