Merge "Remove a11y noise for bouncer unlock" into udc-dev

This commit is contained in:
Aaron Liu
2023-06-12 14:48:44 +00:00
committed by Android (Google) Code Review
2 changed files with 2 additions and 2 deletions

View File

@@ -208,7 +208,7 @@ public class KeyguardMessageAreaController<T extends KeyguardMessageArea>
@Override @Override
public void run() { public void run() {
final View host = mHost.get(); final View host = mHost.get();
if (host != null) { if (host != null && host.isVisibleToUser()) {
host.announceForAccessibility(mTextToAnnounce); host.announceForAccessibility(mTextToAnnounce);
} }
} }

View File

@@ -326,7 +326,7 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
} }
if (!Objects.equals(prevContentDescription, mView.getContentDescription()) if (!Objects.equals(prevContentDescription, mView.getContentDescription())
&& mView.getContentDescription() != null) { && mView.getContentDescription() != null && mView.isVisibleToUser()) {
mView.announceForAccessibility(mView.getContentDescription()); mView.announceForAccessibility(mView.getContentDescription());
} }
} }