diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardMessageAreaController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardMessageAreaController.java index 0332c9f571360..363dd014beb67 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardMessageAreaController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardMessageAreaController.java @@ -208,7 +208,7 @@ public class KeyguardMessageAreaController @Override public void run() { final View host = mHost.get(); - if (host != null) { + if (host != null && host.isVisibleToUser()) { host.announceForAccessibility(mTextToAnnounce); } } diff --git a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java b/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java index 7cedecc33a022..239a0cc01c457 100644 --- a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java +++ b/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java @@ -326,7 +326,7 @@ public class LockIconViewController extends ViewController impleme } if (!Objects.equals(prevContentDescription, mView.getContentDescription()) - && mView.getContentDescription() != null) { + && mView.getContentDescription() != null && mView.isVisibleToUser()) { mView.announceForAccessibility(mView.getContentDescription()); } }