summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Aaron Liu <aaronjli@google.com> 2024-01-26 22:33:25 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-01-26 22:33:25 +0000
commit038c071e62e257e31b010880683dbe46bd64405d (patch)
tree59914155b59e744ab41b7bb6c0a9f716f3d4f5bc
parent7a5aa65517927854b47d106a9e49e5a432a3f805 (diff)
parentef38a8b6ebacf19b346ef8dcc6b5e01d2c60ccb0 (diff)
Merge "Add lift to type support" into main
-rw-r--r--packages/SystemUI/src/com/android/keyguard/NumPadButton.java7
-rw-r--r--packages/SystemUI/src/com/android/keyguard/NumPadKey.java10
2 files changed, 14 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/NumPadButton.java b/packages/SystemUI/src/com/android/keyguard/NumPadButton.java
index 76f93e18dda4..a81c1b0bf9c3 100644
--- a/packages/SystemUI/src/com/android/keyguard/NumPadButton.java
+++ b/packages/SystemUI/src/com/android/keyguard/NumPadButton.java
@@ -26,6 +26,7 @@ import android.graphics.drawable.GradientDrawable;
import android.graphics.drawable.VectorDrawable;
import android.util.AttributeSet;
import android.view.MotionEvent;
+import android.view.accessibility.AccessibilityNodeInfo;
import androidx.annotation.Nullable;
@@ -145,4 +146,10 @@ public class NumPadButton extends AlphaOptimizedImageButton implements NumPadAni
mAnimator = null;
}
}
+
+ @Override
+ public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
+ super.onInitializeAccessibilityNodeInfo(info);
+ info.setTextEntryKey(true);
+ }
}
diff --git a/packages/SystemUI/src/com/android/keyguard/NumPadKey.java b/packages/SystemUI/src/com/android/keyguard/NumPadKey.java
index 871d57da9b0d..dcfa775dcabf 100644
--- a/packages/SystemUI/src/com/android/keyguard/NumPadKey.java
+++ b/packages/SystemUI/src/com/android/keyguard/NumPadKey.java
@@ -30,7 +30,7 @@ import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
-import android.view.accessibility.AccessibilityManager;
+import android.view.accessibility.AccessibilityNodeInfo;
import android.widget.TextView;
import androidx.annotation.Nullable;
@@ -105,8 +105,6 @@ public class NumPadKey extends ViewGroup implements NumPadAnimationListener {
}
setOnClickListener(mListener);
- setOnHoverListener(new LiftToActivateListener(
- (AccessibilityManager) context.getSystemService(Context.ACCESSIBILITY_SERVICE)));
mPM = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(
@@ -240,4 +238,10 @@ public class NumPadKey extends ViewGroup implements NumPadAnimationListener {
public void setAnimationEnabled(boolean enabled) {
mAnimationsEnabled = enabled;
}
+
+ @Override
+ public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
+ super.onInitializeAccessibilityNodeInfo(info);
+ info.setTextEntryKey(true);
+ }
}