Loading api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -47753,6 +47753,8 @@ package android.view.autofill { method public void notifyViewEntered(android.view.View, int, android.graphics.Rect); method public void notifyViewExited(android.view.View); method public void notifyViewExited(android.view.View, int); method public void notifyViewVisibilityChanged(android.view.View, boolean); method public void notifyViewVisibilityChanged(android.view.View, int, boolean); method public void registerCallback(android.view.autofill.AutofillManager.AutofillCallback); method public void requestAutofill(android.view.View); method public void requestAutofill(android.view.View, int, android.graphics.Rect); api/system-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -51305,6 +51305,8 @@ package android.view.autofill { method public void notifyViewEntered(android.view.View, int, android.graphics.Rect); method public void notifyViewExited(android.view.View); method public void notifyViewExited(android.view.View, int); method public void notifyViewVisibilityChanged(android.view.View, boolean); method public void notifyViewVisibilityChanged(android.view.View, int, boolean); method public void registerCallback(android.view.autofill.AutofillManager.AutofillCallback); method public void requestAutofill(android.view.View); method public void requestAutofill(android.view.View, int, android.graphics.Rect); api/test-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -48174,6 +48174,8 @@ package android.view.autofill { method public void notifyViewEntered(android.view.View, int, android.graphics.Rect); method public void notifyViewExited(android.view.View); method public void notifyViewExited(android.view.View, int); method public void notifyViewVisibilityChanged(android.view.View, boolean); method public void notifyViewVisibilityChanged(android.view.View, int, boolean); method public void registerCallback(android.view.autofill.AutofillManager.AutofillCallback); method public void requestAutofill(android.view.View); method public void requestAutofill(android.view.View, int, android.graphics.Rect); core/java/android/view/View.java +2 −2 Original line number Diff line number Diff line Loading @@ -12155,7 +12155,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, // If the view is in the background but still part of the hierarchy this is called // with isVisible=false. Hence visibility==false requires further checks if (isVisible) { afm.notifyViewVisibilityChange(this, true); afm.notifyViewVisibilityChanged(this, true); } else { if (mVisibilityChangeForAutofillHandler == null) { mVisibilityChangeForAutofillHandler = Loading Loading @@ -25015,7 +25015,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, @Override public void handleMessage(Message msg) { mAfm.notifyViewVisibilityChange(mView, mView.isShown()); mAfm.notifyViewVisibilityChanged(mView, mView.isShown()); } } core/java/android/view/autofill/AutofillManager.java +31 −9 Original line number Diff line number Diff line Loading @@ -496,25 +496,48 @@ public final class AutofillManager { } /** * Called when a {@link View view's} visibility changes. * Called when a {@link View view's} visibility changed. * * @param view {@link View} that was exited. * @param isVisible visible if the view is visible in the view hierarchy. */ public void notifyViewVisibilityChanged(@NonNull View view, boolean isVisible) { notifyViewVisibilityChangedInternal(view, 0, isVisible, false); } /** * Called when a virtual view's visibility changed. * * @hide * @param view {@link View} that was exited. * @param virtualId id identifying the virtual child inside the parent view. * @param isVisible visible if the view is visible in the view hierarchy. */ public void notifyViewVisibilityChange(@NonNull View view, boolean isVisible) { public void notifyViewVisibilityChanged(@NonNull View view, int virtualId, boolean isVisible) { notifyViewVisibilityChangedInternal(view, virtualId, isVisible, true); } /** * Called when a view/virtual view's visibility changed. * * @param view {@link View} that was exited. * @param virtualId id identifying the virtual child inside the parent view. * @param isVisible visible if the view is visible in the view hierarchy. * @param virtual Whether the view is virtual. */ private void notifyViewVisibilityChangedInternal(@NonNull View view, int virtualId, boolean isVisible, boolean virtual) { synchronized (mLock) { if (mEnabled && mSessionId != NO_SESSION) { final AutofillId id = virtual ? getAutofillId(view, virtualId) : view.getAutofillId(); if (!isVisible && mFillableIds != null) { final AutofillId id = view.getAutofillId(); if (mFillableIds.contains(id)) { if (sDebug) Log.d(TAG, "Hidding UI when view " + id + " became invisible"); requestHideFillUi(id, view); } } if (mTrackedViews != null) { mTrackedViews.notifyViewVisibilityChange(view, isVisible); mTrackedViews.notifyViewVisibilityChanged(id, isVisible); } } } Loading Loading @@ -1361,15 +1384,14 @@ public final class AutofillManager { /** * Called when a {@link View view's} visibility changes. * * @param view {@link View} that was exited. * @param id the id of the view/virtual view whose visibility changed. * @param isVisible visible if the view is visible in the view hierarchy. */ void notifyViewVisibilityChange(@NonNull View view, boolean isVisible) { AutofillId id = getAutofillId(view); void notifyViewVisibilityChanged(@NonNull AutofillId id, boolean isVisible) { AutofillClient client = getClientLocked(); if (sDebug) { Log.d(TAG, "notifyViewVisibilityChange(): id=" + id + " isVisible=" Log.d(TAG, "notifyViewVisibilityChanged(): id=" + id + " isVisible=" + isVisible); } Loading Loading
api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -47753,6 +47753,8 @@ package android.view.autofill { method public void notifyViewEntered(android.view.View, int, android.graphics.Rect); method public void notifyViewExited(android.view.View); method public void notifyViewExited(android.view.View, int); method public void notifyViewVisibilityChanged(android.view.View, boolean); method public void notifyViewVisibilityChanged(android.view.View, int, boolean); method public void registerCallback(android.view.autofill.AutofillManager.AutofillCallback); method public void requestAutofill(android.view.View); method public void requestAutofill(android.view.View, int, android.graphics.Rect);
api/system-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -51305,6 +51305,8 @@ package android.view.autofill { method public void notifyViewEntered(android.view.View, int, android.graphics.Rect); method public void notifyViewExited(android.view.View); method public void notifyViewExited(android.view.View, int); method public void notifyViewVisibilityChanged(android.view.View, boolean); method public void notifyViewVisibilityChanged(android.view.View, int, boolean); method public void registerCallback(android.view.autofill.AutofillManager.AutofillCallback); method public void requestAutofill(android.view.View); method public void requestAutofill(android.view.View, int, android.graphics.Rect);
api/test-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -48174,6 +48174,8 @@ package android.view.autofill { method public void notifyViewEntered(android.view.View, int, android.graphics.Rect); method public void notifyViewExited(android.view.View); method public void notifyViewExited(android.view.View, int); method public void notifyViewVisibilityChanged(android.view.View, boolean); method public void notifyViewVisibilityChanged(android.view.View, int, boolean); method public void registerCallback(android.view.autofill.AutofillManager.AutofillCallback); method public void requestAutofill(android.view.View); method public void requestAutofill(android.view.View, int, android.graphics.Rect);
core/java/android/view/View.java +2 −2 Original line number Diff line number Diff line Loading @@ -12155,7 +12155,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, // If the view is in the background but still part of the hierarchy this is called // with isVisible=false. Hence visibility==false requires further checks if (isVisible) { afm.notifyViewVisibilityChange(this, true); afm.notifyViewVisibilityChanged(this, true); } else { if (mVisibilityChangeForAutofillHandler == null) { mVisibilityChangeForAutofillHandler = Loading Loading @@ -25015,7 +25015,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, @Override public void handleMessage(Message msg) { mAfm.notifyViewVisibilityChange(mView, mView.isShown()); mAfm.notifyViewVisibilityChanged(mView, mView.isShown()); } }
core/java/android/view/autofill/AutofillManager.java +31 −9 Original line number Diff line number Diff line Loading @@ -496,25 +496,48 @@ public final class AutofillManager { } /** * Called when a {@link View view's} visibility changes. * Called when a {@link View view's} visibility changed. * * @param view {@link View} that was exited. * @param isVisible visible if the view is visible in the view hierarchy. */ public void notifyViewVisibilityChanged(@NonNull View view, boolean isVisible) { notifyViewVisibilityChangedInternal(view, 0, isVisible, false); } /** * Called when a virtual view's visibility changed. * * @hide * @param view {@link View} that was exited. * @param virtualId id identifying the virtual child inside the parent view. * @param isVisible visible if the view is visible in the view hierarchy. */ public void notifyViewVisibilityChange(@NonNull View view, boolean isVisible) { public void notifyViewVisibilityChanged(@NonNull View view, int virtualId, boolean isVisible) { notifyViewVisibilityChangedInternal(view, virtualId, isVisible, true); } /** * Called when a view/virtual view's visibility changed. * * @param view {@link View} that was exited. * @param virtualId id identifying the virtual child inside the parent view. * @param isVisible visible if the view is visible in the view hierarchy. * @param virtual Whether the view is virtual. */ private void notifyViewVisibilityChangedInternal(@NonNull View view, int virtualId, boolean isVisible, boolean virtual) { synchronized (mLock) { if (mEnabled && mSessionId != NO_SESSION) { final AutofillId id = virtual ? getAutofillId(view, virtualId) : view.getAutofillId(); if (!isVisible && mFillableIds != null) { final AutofillId id = view.getAutofillId(); if (mFillableIds.contains(id)) { if (sDebug) Log.d(TAG, "Hidding UI when view " + id + " became invisible"); requestHideFillUi(id, view); } } if (mTrackedViews != null) { mTrackedViews.notifyViewVisibilityChange(view, isVisible); mTrackedViews.notifyViewVisibilityChanged(id, isVisible); } } } Loading Loading @@ -1361,15 +1384,14 @@ public final class AutofillManager { /** * Called when a {@link View view's} visibility changes. * * @param view {@link View} that was exited. * @param id the id of the view/virtual view whose visibility changed. * @param isVisible visible if the view is visible in the view hierarchy. */ void notifyViewVisibilityChange(@NonNull View view, boolean isVisible) { AutofillId id = getAutofillId(view); void notifyViewVisibilityChanged(@NonNull AutofillId id, boolean isVisible) { AutofillClient client = getClientLocked(); if (sDebug) { Log.d(TAG, "notifyViewVisibilityChange(): id=" + id + " isVisible=" Log.d(TAG, "notifyViewVisibilityChanged(): id=" + id + " isVisible=" + isVisible); } Loading