开发项目遇到一个问题,具体描述及复制步骤如下:
就是开启"Enhanced PIN privacy"(增强的PIN隐私)的时候输入秘密的时候还是会显示数字
如下图,应该是直接是“.” 不应该出现PIN 密码
想要的效果如下图:
设置的步骤如下图:
其中涉及到的部分code如下:
/frameworks/base/core/java/com/android/internal/widget/LockPatternUtils.java
/frameworks/base/packages/SystemUI/src/com/android/keyguard/KeyguardPinBasedInputViewController.java
/frameworks/base/packages/SystemUI/src/com/android/keyguard/PasswordTextView.java
/frameworks/base/services/core/java/com/android/server/locksettings/LockSettingsStorage.java
I.LockPatternUtils.java:
/**
* @return Whether enhanced pin privacy is enabled.
*/
public boolean isPinEnhancedPrivacyEnabled(int userId) {
return getBoolean(LOCK_PIN_ENHANCED_PRIVACY, false, userId);
}
/**
* Set whether enhanced pin privacy is enabled.
*/
public void setPinEnhancedPrivacyEnabled(boolean enabled, int userId) {
setBoolean(LOCK_PIN_ENHANCED_PRIVACY, enabled, userId);
}
private boolean getBoolean(String secureSettingKey, boolean defaultValue, int userId) {
Log.i("TD","LockPatternUtils----->getBoolean: "+secureSettingKey);
try {
return getLockSettings().getBoolean(secureSettingKey, defaultValue, userId);
} catch (RemoteException re) {
return defaultValue;
}
}
private void setBoolean(String secureSettingKey, boolean enabled, int userId) {
Log.i("TD","LockPatternUtils----->setsetBoolean: "+secureSettingKey);
try {
getLockSettings().setBoolean(secureSettingKey, enabled, userId);
} catch (R