未验证 提交 c3ab0c91 编写于 作者: M Michael Goderbauer 提交者: GitHub

Rename isPassword to isObscured (#4815)

上级 bb2d177d
......@@ -224,7 +224,7 @@ class SemanticsFlag {
static const int _kIsEnabledIndex = 1 << 7;
static const int _kIsInMutuallyExclusiveGroupIndex = 1 << 8;
static const int _kIsHeaderIndex = 1 << 9;
static const int _kIsPasswordIndex = 1 << 10;
static const int _kIsObscuredIndex = 1 << 10;
const SemanticsFlag._(this.index);
......@@ -301,11 +301,11 @@ class SemanticsFlag {
/// address book applications.
static const SemanticsFlag isHeader = const SemanticsFlag._(_kIsHeaderIndex);
/// Whether the semantics node represents a password.
/// Whether the value of the semantics node is obscured.
///
/// This is usually used for text fields to indicate that the content should
/// be obscured.
static const SemanticsFlag isPassword = const SemanticsFlag._(_kIsPasswordIndex);
/// This is usually used for text fields to indicate that its content
/// is a password or contains other sensitive information.
static const SemanticsFlag isObscured = const SemanticsFlag._(_kIsObscuredIndex);
/// The possible semantics flags.
///
......@@ -321,7 +321,7 @@ class SemanticsFlag {
_kIsEnabledIndex: isEnabled,
_kIsInMutuallyExclusiveGroupIndex: isInMutuallyExclusiveGroup,
_kIsHeaderIndex: isHeader,
_kIsPasswordIndex: isPassword,
_kIsObscuredIndex: isObscured,
};
@override
......@@ -347,8 +347,8 @@ class SemanticsFlag {
return 'SemanticsFlag.isInMutuallyExclusiveGroup';
case _kIsHeaderIndex:
return 'SemanticsFlag.isHeader';
case _kIsPasswordIndex:
return 'SemanticsFlag.isPassword';
case _kIsObscuredIndex:
return 'SemanticsFlag.isObscured';
}
return null;
}
......
......@@ -85,7 +85,7 @@ class AccessibilityBridge extends AccessibilityNodeProvider implements BasicMess
IS_ENABLED(1 << 7),
IS_IN_MUTUALLY_EXCLUSIVE_GROUP(1 << 8),
IS_HEADER(1 << 9),
IS_PASSWORD(1 << 10);
IS_OBSCURED(1 << 10);
Flag(int value) {
this.value = value;
......@@ -138,7 +138,7 @@ class AccessibilityBridge extends AccessibilityNodeProvider implements BasicMess
result.setAccessibilityFocused(mA11yFocusedObject.id == virtualViewId);
if (object.hasFlag(Flag.IS_TEXT_FIELD)) {
result.setPassword(object.hasFlag(Flag.IS_PASSWORD));
result.setPassword(object.hasFlag(Flag.IS_OBSCURED));
result.setClassName("android.widget.EditText");
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
result.setEditable(true);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册