Merge "Remove a11y noise for bouncer unlock" into udc-dev am: 4ee1f0103d

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23617628

Change-Id: I769c9c903cb6bb4297821f16c8dba75c54270ceb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Aaron Liu
2023-06-12 15:29:08 +00:00
committed by Automerger Merge Worker
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());
} }
} }