Remove a11y noise for bouncer unlock

When the bouncer unlocks, the keyguard message are and the lock icon
view announce for accessibility but are not visible. By ensuring the
view is visible in order to announce for accessibility, when we unlock
the pin screen with talkback, we just get "Device unlocked"

Fixes: 284902478
Test: unlock pin screen with talkback.
Change-Id: I10c7e48e821e7eed1d85815cfb1b920b197f7350
This commit is contained in:
Aaron Liu
2023-06-08 10:57:47 -07:00
parent 76fad89c1f
commit 2593ac5b17
2 changed files with 2 additions and 2 deletions

View File

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

View File

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