Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 038c071e authored by Aaron Liu's avatar Aaron Liu Committed by Android (Google) Code Review
Browse files

Merge "Add lift to type support" into main

parents 7a5aa655 ef38a8b6
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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);
    }
}
+7 −3
Original line number Diff line number Diff line
@@ -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);
    }
}