Fix PIN lock pattern not respecting user settings
The LockPatternView had a boolean attribute mEnableHapticFeedback that held a copy of the user settings for enabling "Touch feedback" vibrations. This attribute was used together with HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING deprecated setting to bypass the user settings in the vibrator service. This change removes the use of this deprecated flag and lets the Vibrator service apply the user settings for "Touch feedback" to vibrations generated for the PIN lock input in LockPatternView. Fix: 216656312 Test: manual Change-Id: If9733c059e5059b6e58b6f84d100df2a0abafab6
This commit is contained in:
@@ -35,7 +35,6 @@ import android.graphics.RecordingCanvas;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.Shader;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.media.AudioManager;
|
||||
import android.os.Bundle;
|
||||
import android.os.Debug;
|
||||
import android.os.Parcel;
|
||||
@@ -769,8 +768,7 @@ public class LockPatternView extends View {
|
||||
}
|
||||
addCellToPattern(cell);
|
||||
performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY,
|
||||
HapticFeedbackConstants.FLAG_IGNORE_VIEW_SETTING
|
||||
| HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING);
|
||||
HapticFeedbackConstants.FLAG_IGNORE_VIEW_SETTING);
|
||||
return cell;
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -76,8 +76,7 @@ public abstract class KeyguardAbsKeyInputView extends KeyguardInputView {
|
||||
// Cause a VIRTUAL_KEY vibration
|
||||
public void doHapticKeyClick() {
|
||||
performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY,
|
||||
HapticFeedbackConstants.FLAG_IGNORE_VIEW_SETTING
|
||||
| HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING);
|
||||
HapticFeedbackConstants.FLAG_IGNORE_VIEW_SETTING);
|
||||
}
|
||||
|
||||
public void setKeyDownListener(KeyDownListener keyDownListener) {
|
||||
|
||||
@@ -219,7 +219,6 @@ public class NumPadKey extends ViewGroup {
|
||||
// Cause a VIRTUAL_KEY vibration
|
||||
public void doHapticKeyClick() {
|
||||
performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY,
|
||||
HapticFeedbackConstants.FLAG_IGNORE_VIEW_SETTING
|
||||
| HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING);
|
||||
HapticFeedbackConstants.FLAG_IGNORE_VIEW_SETTING);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user