Loading core/java/android/view/View.java +21 −4 Original line number Diff line number Diff line Loading @@ -104,6 +104,7 @@ import android.view.accessibility.AccessibilityNodeProvider; import android.view.animation.Animation; import android.view.animation.AnimationUtils; import android.view.animation.Transformation; import android.view.autofill.AutoFillManager; import android.view.autofill.AutoFillType; import android.view.autofill.AutoFillValue; import android.view.autofill.VirtualViewDelegate; Loading Loading @@ -6444,16 +6445,23 @@ public class View implements Drawable.Callback, KeyEvent.Callback, if (isPressed()) { setPressed(false); } if (imm != null && mAttachInfo != null && mAttachInfo.mHasWindowFocus) { if (imm != null && mAttachInfo != null && mAttachInfo.mHasWindowFocus) { imm.focusOut(this); } onFocusLost(); } else if (imm != null && mAttachInfo != null && mAttachInfo.mHasWindowFocus) { } else if (imm != null && mAttachInfo != null && mAttachInfo.mHasWindowFocus) { imm.focusIn(this); } if (isAutoFillable()) { AutoFillManager afm = getAutoFillManager(); if (afm != null) { afm.updateAutoFillInput(this, gainFocus ? AutoFillManager.FLAG_UPDATE_UI_SHOW : AutoFillManager.FLAG_UPDATE_UI_HIDE); } } invalidate(true); ListenerInfo li = mListenerInfo; if (li != null && li.mOnFocusChangeListener != null) { Loading Loading @@ -7089,6 +7097,15 @@ public class View implements Drawable.Callback, KeyEvent.Callback, return null; } @Nullable private AutoFillManager getAutoFillManager() { return mContext.getSystemService(AutoFillManager.class); } private boolean isAutoFillable() { return getAutoFillType() != null && !isAutoFillBlocked(); } private void populateVirtualStructure(ViewStructure structure, AccessibilityNodeProvider provider, AccessibilityNodeInfo info, int flags) { // NOTE: currently flags are only used for AutoFill; if they're used for Assist as well, Loading core/java/android/widget/TextView.java +2 −11 Original line number Diff line number Diff line Loading @@ -9028,14 +9028,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener Spannable sp = (Spannable) mText; MetaKeyKeyListener.resetMetaState(sp); } } else { final AutoFillManager afm = mContext.getSystemService(AutoFillManager.class); if (afm != null) { if (DEBUG_AUTOFILL) { Log.v(LOG_TAG, "onFocusChanged(false): id=" + getAccessibilityViewId()); } afm.updateAutoFillInput(this, AutoFillManager.FLAG_UPDATE_UI_HIDE); } } startStopMarquee(focused); Loading Loading @@ -9767,10 +9759,9 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener } @Override @Nullable public AutoFillType getAutoFillType() { // TODO(b/33197203): ideally it should return a constant, but value returned by // getInputType() can change. return AutoFillType.forText(getInputType()); return isTextEditable() ? AutoFillType.forText(getInputType()) : null; } /** @hide */ Loading Loading
core/java/android/view/View.java +21 −4 Original line number Diff line number Diff line Loading @@ -104,6 +104,7 @@ import android.view.accessibility.AccessibilityNodeProvider; import android.view.animation.Animation; import android.view.animation.AnimationUtils; import android.view.animation.Transformation; import android.view.autofill.AutoFillManager; import android.view.autofill.AutoFillType; import android.view.autofill.AutoFillValue; import android.view.autofill.VirtualViewDelegate; Loading Loading @@ -6444,16 +6445,23 @@ public class View implements Drawable.Callback, KeyEvent.Callback, if (isPressed()) { setPressed(false); } if (imm != null && mAttachInfo != null && mAttachInfo.mHasWindowFocus) { if (imm != null && mAttachInfo != null && mAttachInfo.mHasWindowFocus) { imm.focusOut(this); } onFocusLost(); } else if (imm != null && mAttachInfo != null && mAttachInfo.mHasWindowFocus) { } else if (imm != null && mAttachInfo != null && mAttachInfo.mHasWindowFocus) { imm.focusIn(this); } if (isAutoFillable()) { AutoFillManager afm = getAutoFillManager(); if (afm != null) { afm.updateAutoFillInput(this, gainFocus ? AutoFillManager.FLAG_UPDATE_UI_SHOW : AutoFillManager.FLAG_UPDATE_UI_HIDE); } } invalidate(true); ListenerInfo li = mListenerInfo; if (li != null && li.mOnFocusChangeListener != null) { Loading Loading @@ -7089,6 +7097,15 @@ public class View implements Drawable.Callback, KeyEvent.Callback, return null; } @Nullable private AutoFillManager getAutoFillManager() { return mContext.getSystemService(AutoFillManager.class); } private boolean isAutoFillable() { return getAutoFillType() != null && !isAutoFillBlocked(); } private void populateVirtualStructure(ViewStructure structure, AccessibilityNodeProvider provider, AccessibilityNodeInfo info, int flags) { // NOTE: currently flags are only used for AutoFill; if they're used for Assist as well, Loading
core/java/android/widget/TextView.java +2 −11 Original line number Diff line number Diff line Loading @@ -9028,14 +9028,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener Spannable sp = (Spannable) mText; MetaKeyKeyListener.resetMetaState(sp); } } else { final AutoFillManager afm = mContext.getSystemService(AutoFillManager.class); if (afm != null) { if (DEBUG_AUTOFILL) { Log.v(LOG_TAG, "onFocusChanged(false): id=" + getAccessibilityViewId()); } afm.updateAutoFillInput(this, AutoFillManager.FLAG_UPDATE_UI_HIDE); } } startStopMarquee(focused); Loading Loading @@ -9767,10 +9759,9 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener } @Override @Nullable public AutoFillType getAutoFillType() { // TODO(b/33197203): ideally it should return a constant, but value returned by // getInputType() can change. return AutoFillType.forText(getInputType()); return isTextEditable() ? AutoFillType.forText(getInputType()) : null; } /** @hide */ Loading