Merge \\"Changed to vibrate on down instead of up when entering pin\\" into nyc-mr1-dev am: 798d69817d
am: 45ac88982f
Change-Id: I326ea761cfbb02d9f96b04c8cf51070d38673c8a
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user