summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jonathon Axford <axfordjc@google.com> 2023-09-18 08:54:32 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2023-09-18 08:54:32 +0000
commitfc8bc1ab71b9af795dd01498f1ae5595199803e1 (patch)
tree42b560611d9801f0271117111d406f1c03decf03
parent49eb0f1fb44475b47d3c5836c94814479c3c5dc5 (diff)
parent554704f520d03f7e093c3e890c755113249a201c (diff)
Merge "Disable password bouncer cursor when testing" into main
-rw-r--r--packages/SystemUI/src/com/android/keyguard/KeyguardPasswordView.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardPasswordView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardPasswordView.java
index 681c3471b414..d30f4971f8de 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardPasswordView.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardPasswordView.java
@@ -34,6 +34,7 @@ import static com.android.systemui.statusbar.policy.DevicePostureController.DEVI
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ValueAnimator;
+import android.app.ActivityManager;
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.Insets;
@@ -191,6 +192,11 @@ public class KeyguardPasswordView extends KeyguardAbsKeyInputView {
mPasswordEntry = findViewById(getPasswordTextViewId());
mPasswordEntryDisabler = new TextViewInputDisabler(mPasswordEntry);
+
+ // EditText cursor can fail screenshot tests, so disable it when testing
+ if (ActivityManager.isRunningInTestHarness()) {
+ mPasswordEntry.setCursorVisible(false);
+ }
}
@Override