Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1f5c1821 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix a few auto fill ussues"

parents 0df5ea97 2f8fb1f6
Loading
Loading
Loading
Loading
+8 −7
Original line number Original line Diff line number Diff line
@@ -47498,15 +47498,16 @@ package android.view.autofill {
  }
  }
  public final class AutofillManager {
  public final class AutofillManager {
    method public void cancel();
    method public void commit();
    method public void notifyValueChanged(android.view.View);
    method public void notifyViewEntered(android.view.View);
    method public void notifyViewExited(android.view.View);
    method public void notifyVirtualValueChanged(android.view.View, int, android.view.autofill.AutofillValue);
    method public void notifyVirtualViewEntered(android.view.View, int, android.graphics.Rect);
    method public void notifyVirtualViewExited(android.view.View, int);
    method public void registerCallback(android.view.autofill.AutofillManager.AutofillCallback);
    method public void registerCallback(android.view.autofill.AutofillManager.AutofillCallback);
    method public void reset();
    method public void startAutofillRequest(android.view.View);
    method public void startAutofillRequestOnVirtualView(android.view.View, int, android.graphics.Rect);
    method public void stopAutofillRequest(android.view.View);
    method public void stopAutofillRequestOnVirtualView(android.view.View, int);
    method public void unregisterCallback(android.view.autofill.AutofillManager.AutofillCallback);
    method public void unregisterCallback(android.view.autofill.AutofillManager.AutofillCallback);
    method public void valueChanged(android.view.View);
    method public void virtualValueChanged(android.view.View, int, android.view.autofill.AutofillValue);
    field public static final java.lang.String EXTRA_ASSIST_STRUCTURE = "android.view.autofill.extra.ASSIST_STRUCTURE";
    field public static final java.lang.String EXTRA_ASSIST_STRUCTURE = "android.view.autofill.extra.ASSIST_STRUCTURE";
    field public static final java.lang.String EXTRA_AUTHENTICATION_RESULT = "android.view.autofill.extra.AUTHENTICATION_RESULT";
    field public static final java.lang.String EXTRA_AUTHENTICATION_RESULT = "android.view.autofill.extra.AUTHENTICATION_RESULT";
  }
  }
+8 −7
Original line number Original line Diff line number Diff line
@@ -50960,15 +50960,16 @@ package android.view.autofill {
  }
  }
  public final class AutofillManager {
  public final class AutofillManager {
    method public void cancel();
    method public void commit();
    method public void notifyValueChanged(android.view.View);
    method public void notifyViewEntered(android.view.View);
    method public void notifyViewExited(android.view.View);
    method public void notifyVirtualValueChanged(android.view.View, int, android.view.autofill.AutofillValue);
    method public void notifyVirtualViewEntered(android.view.View, int, android.graphics.Rect);
    method public void notifyVirtualViewExited(android.view.View, int);
    method public void registerCallback(android.view.autofill.AutofillManager.AutofillCallback);
    method public void registerCallback(android.view.autofill.AutofillManager.AutofillCallback);
    method public void reset();
    method public void startAutofillRequest(android.view.View);
    method public void startAutofillRequestOnVirtualView(android.view.View, int, android.graphics.Rect);
    method public void stopAutofillRequest(android.view.View);
    method public void stopAutofillRequestOnVirtualView(android.view.View, int);
    method public void unregisterCallback(android.view.autofill.AutofillManager.AutofillCallback);
    method public void unregisterCallback(android.view.autofill.AutofillManager.AutofillCallback);
    method public void valueChanged(android.view.View);
    method public void virtualValueChanged(android.view.View, int, android.view.autofill.AutofillValue);
    field public static final java.lang.String EXTRA_ASSIST_STRUCTURE = "android.view.autofill.extra.ASSIST_STRUCTURE";
    field public static final java.lang.String EXTRA_ASSIST_STRUCTURE = "android.view.autofill.extra.ASSIST_STRUCTURE";
    field public static final java.lang.String EXTRA_AUTHENTICATION_RESULT = "android.view.autofill.extra.AUTHENTICATION_RESULT";
    field public static final java.lang.String EXTRA_AUTHENTICATION_RESULT = "android.view.autofill.extra.AUTHENTICATION_RESULT";
  }
  }
+8 −7
Original line number Original line Diff line number Diff line
@@ -47867,15 +47867,16 @@ package android.view.autofill {
  }
  }
  public final class AutofillManager {
  public final class AutofillManager {
    method public void cancel();
    method public void commit();
    method public void notifyValueChanged(android.view.View);
    method public void notifyViewEntered(android.view.View);
    method public void notifyViewExited(android.view.View);
    method public void notifyVirtualValueChanged(android.view.View, int, android.view.autofill.AutofillValue);
    method public void notifyVirtualViewEntered(android.view.View, int, android.graphics.Rect);
    method public void notifyVirtualViewExited(android.view.View, int);
    method public void registerCallback(android.view.autofill.AutofillManager.AutofillCallback);
    method public void registerCallback(android.view.autofill.AutofillManager.AutofillCallback);
    method public void reset();
    method public void startAutofillRequest(android.view.View);
    method public void startAutofillRequestOnVirtualView(android.view.View, int, android.graphics.Rect);
    method public void stopAutofillRequest(android.view.View);
    method public void stopAutofillRequestOnVirtualView(android.view.View, int);
    method public void unregisterCallback(android.view.autofill.AutofillManager.AutofillCallback);
    method public void unregisterCallback(android.view.autofill.AutofillManager.AutofillCallback);
    method public void valueChanged(android.view.View);
    method public void virtualValueChanged(android.view.View, int, android.view.autofill.AutofillValue);
    field public static final java.lang.String EXTRA_ASSIST_STRUCTURE = "android.view.autofill.extra.ASSIST_STRUCTURE";
    field public static final java.lang.String EXTRA_ASSIST_STRUCTURE = "android.view.autofill.extra.ASSIST_STRUCTURE";
    field public static final java.lang.String EXTRA_AUTHENTICATION_RESULT = "android.view.autofill.extra.AUTHENTICATION_RESULT";
    field public static final java.lang.String EXTRA_AUTHENTICATION_RESULT = "android.view.autofill.extra.AUTHENTICATION_RESULT";
  }
  }
+1 −1
Original line number Original line Diff line number Diff line
@@ -1783,7 +1783,7 @@ public class Activity extends ContextThemeWrapper
        mTranslucentCallback = null;
        mTranslucentCallback = null;
        mCalled = true;
        mCalled = true;
        if (isFinishing() && mAutoFillResetNeeded) {
        if (isFinishing() && mAutoFillResetNeeded) {
            getSystemService(AutofillManager.class).reset();
            getSystemService(AutofillManager.class).commit();
        }
        }
    }
    }


+27 −21
Original line number Original line Diff line number Diff line
@@ -6132,6 +6132,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
        }
        }
        sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_CLICKED);
        sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_CLICKED);
        notifyEnterOrExitForAutoFillIfNeeded(true);
        return result;
        return result;
    }
    }
@@ -6791,14 +6794,18 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
            mAttachInfo.mKeyDispatchState.reset(this);
            mAttachInfo.mKeyDispatchState.reset(this);
        }
        }
        notifyEnterOrExitForAutoFillIfNeeded(gainFocus);
    }
    private void notifyEnterOrExitForAutoFillIfNeeded(boolean enter) {
        if (isAutofillable() && isAttachedToWindow()
        if (isAutofillable() && isAttachedToWindow()
                && getResolvedAutofillMode() == AUTOFILL_MODE_AUTO) {
                && getResolvedAutofillMode() == AUTOFILL_MODE_AUTO) {
            AutofillManager afm = getAutofillManager();
            AutofillManager afm = getAutofillManager();
            if (afm != null) {
            if (afm != null) {
                if (gainFocus) {
                if (enter && hasWindowFocus() && isFocused()) {
                    afm.startAutofillRequest(this);
                    afm.notifyViewEntered(this);
                } else {
                } else if (!hasWindowFocus() || !isFocused()) {
                    afm.stopAutofillRequest(this);
                    afm.notifyViewExited(this);
                }
                }
            }
            }
        }
        }
@@ -7368,13 +7375,17 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     * <li>Also implement {@link #autofillVirtual(int, AutofillValue)} to autofill the virtual
     * <li>Also implement {@link #autofillVirtual(int, AutofillValue)} to autofill the virtual
     * children.
     * children.
     * <li>Call
     * <li>Call
     * {@link android.view.autofill.AutofillManager#startAutofillRequestOnVirtualView} and
     * {@link android.view.autofill.AutofillManager#notifyVirtualViewEntered} and
     * {@link android.view.autofill.AutofillManager#stopAutofillRequestOnVirtualView(View, int)}
     * {@link android.view.autofill.AutofillManager#notifyVirtualViewExited(View, int)}
     * when the focus inside the view changed.
     * when the focus inside the view changed.
     * <li>Call {@link android.view.autofill.AutofillManager#virtualValueChanged(View, int,
     * <li>Call {@link android.view.autofill.AutofillManager#notifyVirtualValueChanged(View, int,
     * AutofillValue)} when the value of a child changed.
     * AutofillValue)} when the value of a child changed.
     * <li>Call {@link android.view.autofill.AutofillManager#reset()} when the autofill context
     * <li>Call {@link AutofillManager#commit()} when the autofill context
     * of the view structure changed.
     * of the view structure changed and you want the current autofill interaction if such
     * to be commited.
     * <li>Call {@link AutofillManager#cancel()} ()} when the autofill context
     * of the view structure changed and you want the current autofill interaction if such
     * to be cancelled.
     * </ol>
     * </ol>
     *
     *
     * @param structure Fill in with structured view data.
     * @param structure Fill in with structured view data.
@@ -11085,6 +11096,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
    @CallSuper
    @CallSuper
    public void dispatchStartTemporaryDetach() {
    public void dispatchStartTemporaryDetach() {
        mPrivateFlags3 |= PFLAG3_TEMPORARY_DETACH;
        mPrivateFlags3 |= PFLAG3_TEMPORARY_DETACH;
        notifyEnterOrExitForAutoFillIfNeeded(false);
        onStartTemporaryDetach();
        onStartTemporaryDetach();
    }
    }
@@ -11110,6 +11122,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
        if (hasWindowFocus() && hasFocus()) {
        if (hasWindowFocus() && hasFocus()) {
            InputMethodManager.getInstance().focusIn(this);
            InputMethodManager.getInstance().focusIn(this);
        }
        }
        notifyEnterOrExitForAutoFillIfNeeded(true);
    }
    }
    /**
    /**
@@ -11512,6 +11525,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
        } else if (imm != null && (mPrivateFlags & PFLAG_FOCUSED) != 0) {
        } else if (imm != null && (mPrivateFlags & PFLAG_FOCUSED) != 0) {
            imm.focusIn(this);
            imm.focusIn(this);
        }
        }
        notifyEnterOrExitForAutoFillIfNeeded(hasWindowFocus);
        refreshDrawableState();
        refreshDrawableState();
    }
    }
@@ -16879,12 +16895,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
        }
        }
        needGlobalAttributesUpdate(false);
        needGlobalAttributesUpdate(false);
        if (isAutofillable() && isFocused() && getResolvedAutofillMode() == AUTOFILL_MODE_AUTO) {
        notifyEnterOrExitForAutoFillIfNeeded(true);
            AutofillManager afm = getAutofillManager();
            if (afm != null) {
                afm.startAutofillRequest(this);
            }
        }
    }
    }
    void dispatchDetachedFromWindow() {
    void dispatchDetachedFromWindow() {
@@ -16932,12 +16943,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
            mOverlay.getOverlayView().dispatchDetachedFromWindow();
            mOverlay.getOverlayView().dispatchDetachedFromWindow();
        }
        }
        if (isAutofillable() && isFocused() && getResolvedAutofillMode() == AUTOFILL_MODE_AUTO) {
        notifyEnterOrExitForAutoFillIfNeeded(false);
            AutofillManager afm = getAutofillManager();
            if (afm != null) {
                afm.stopAutofillRequest(this);
            }
        }
    }
    }
    /**
    /**
Loading