Add haptic feedback for lock pattern

This commit is contained in:
NekoInverter committed 2021-01-11 13:12:08 +08:00
1 parent 0c1bf6f0b3
commit 9128fdb523
1 file changed
+5 -1
@@ -30,6 +30,7 @@ import android.os.Parcel;
import android.os.Parcelable;
import android.os.SystemClock;
import android.util.AttributeSet;
import android.view.HapticFeedbackConstants;
import android.view.MotionEvent;
import android.view.View;
import android.view.accessibility.AccessibilityManager;
@@ -366,6 +367,10 @@ public class LockPatternView extends View {
}
}
addCellToPattern(cell);
performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY,
HapticFeedbackConstants.FLAG_IGNORE_VIEW_SETTING
| HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING);
return cell;
}
return null;
@@ -1082,7 +1087,6 @@ public class LockPatternView extends View {
/**
* Constructor called from {@link #CREATOR}
*/
@SuppressWarnings("ConstantConditions")
@SuppressLint("ParcelClassLoader")
private SavedState(Parcel in) {
super(in);