Merge "Security fix in accessibility - don't read out password. # 2371557" into eclair
This commit is contained in:
committed by
Android (Google) Code Review
commit
b35b8c1334
@@ -6301,7 +6301,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
|
||||
if (DEBUG_EXTRACT) Log.v(TAG, "beforeTextChanged start=" + start
|
||||
+ " before=" + before + " after=" + after + ": " + buffer);
|
||||
|
||||
if (AccessibilityManager.getInstance(mContext).isEnabled()) {
|
||||
if (AccessibilityManager.getInstance(mContext).isEnabled()
|
||||
&& !isPasswordInputType(mInputType)) {
|
||||
mBeforeText = buffer.toString();
|
||||
}
|
||||
|
||||
@@ -6972,9 +6973,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
|
||||
|
||||
@Override
|
||||
public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) {
|
||||
boolean isPassword =
|
||||
(mInputType & (EditorInfo.TYPE_MASK_CLASS | EditorInfo.TYPE_MASK_VARIATION)) ==
|
||||
(EditorInfo.TYPE_CLASS_TEXT | EditorInfo.TYPE_TEXT_VARIATION_PASSWORD);
|
||||
final boolean isPassword = isPasswordInputType(mInputType);
|
||||
|
||||
if (!isPassword) {
|
||||
CharSequence text = getText();
|
||||
|
||||
Reference in New Issue
Block a user