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

Commit 45ac8898 authored by Selim Cinek's avatar Selim Cinek Committed by android-build-merger
Browse files

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

am: 798d6981

Change-Id: Ic940aa6733ddf9e7415f9ae43b849ae2c2c06cd0
parents 951a9820 798d6981
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();