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

Commit 798d6981 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Changed to vibrate on down instead of up when entering pin" into nyc-mr1-dev

parents 5c0ea3b5 8b9f948c
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ import android.os.SystemClock;
import android.util.AttributeSet;
import android.view.HapticFeedbackConstants;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
@@ -53,8 +54,7 @@ public class NumPadKey extends ViewGroup {
            if (mTextView != null && mTextView.isEnabled()) {
                mTextView.append(Character.forDigit(mDigit, 10));
            }
            userActivity();
            doHapticKeyClick();
            userActivity();;
        }
    };

@@ -125,6 +125,14 @@ public class NumPadKey extends ViewGroup {
        setContentDescription(mDigitText.getText().toString());
    }

    @Override
    public boolean onTouchEvent(MotionEvent event) {
        if (event.getActionMasked() == MotionEvent.ACTION_DOWN) {
            doHapticKeyClick();
        }
        return super.onTouchEvent(event);
    }

    @Override
    public void onDetachedFromWindow() {
        super.onDetachedFromWindow();