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

Commit 8b9f948c authored by Selim Cinek's avatar Selim Cinek
Browse files

Changed to vibrate on down instead of up when entering pin

Change-Id: I180e67e65fa3b1230bd1737abf2f0605a254d348
Fixes: 30000347
parent 3e45194a
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();