Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -56741,6 +56741,7 @@ package android.view.contentcapture { method public final void notifySessionResumed(); method public final void notifyViewAppeared(@NonNull android.view.ViewStructure); method public final void notifyViewDisappeared(@NonNull android.view.autofill.AutofillId); method public final void notifyViewInsetsChanged(@NonNull android.graphics.Insets); method public final void notifyViewTextChanged(@NonNull android.view.autofill.AutofillId, @Nullable CharSequence); method public final void notifyViewsDisappeared(@NonNull android.view.autofill.AutofillId, @NonNull long[]); method public final void setContentCaptureContext(@Nullable android.view.contentcapture.ContentCaptureContext); api/system-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -13191,6 +13191,7 @@ package android.view.contentcapture { method public long getEventTime(); method @Nullable public android.view.autofill.AutofillId getId(); method @Nullable public java.util.List<android.view.autofill.AutofillId> getIds(); method @Nullable public android.graphics.Insets getInsets(); method @Nullable public CharSequence getText(); method public int getType(); method @Nullable public android.view.contentcapture.ViewNode getViewNode(); Loading @@ -13201,6 +13202,7 @@ package android.view.contentcapture { field public static final int TYPE_SESSION_RESUMED = 7; // 0x7 field public static final int TYPE_VIEW_APPEARED = 1; // 0x1 field public static final int TYPE_VIEW_DISAPPEARED = 2; // 0x2 field public static final int TYPE_VIEW_INSETS_CHANGED = 9; // 0x9 field public static final int TYPE_VIEW_TEXT_CHANGED = 3; // 0x3 field public static final int TYPE_VIEW_TREE_APPEARED = 5; // 0x5 field public static final int TYPE_VIEW_TREE_APPEARING = 4; // 0x4 api/test-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -5085,6 +5085,7 @@ package android.view.contentcapture { method public long getEventTime(); method @Nullable public android.view.autofill.AutofillId getId(); method @Nullable public java.util.List<android.view.autofill.AutofillId> getIds(); method @Nullable public android.graphics.Insets getInsets(); method @Nullable public CharSequence getText(); method public int getType(); method @Nullable public android.view.contentcapture.ViewNode getViewNode(); Loading @@ -5095,6 +5096,7 @@ package android.view.contentcapture { field public static final int TYPE_SESSION_RESUMED = 7; // 0x7 field public static final int TYPE_VIEW_APPEARED = 1; // 0x1 field public static final int TYPE_VIEW_DISAPPEARED = 2; // 0x2 field public static final int TYPE_VIEW_INSETS_CHANGED = 9; // 0x9 field public static final int TYPE_VIEW_TEXT_CHANGED = 3; // 0x3 field public static final int TYPE_VIEW_TREE_APPEARED = 5; // 0x5 field public static final int TYPE_VIEW_TREE_APPEARING = 4; // 0x4 Loading core/java/android/view/View.java +26 −9 Original line number Diff line number Diff line Loading @@ -29099,8 +29099,33 @@ public class View implements Drawable.Callback, KeyEvent.Callback, mTreeObserver = new ViewTreeObserver(context); } @Nullable ContentCaptureManager getContentCaptureManager(@NonNull Context context) { if (mContentCaptureManager != null) { return mContentCaptureManager; } mContentCaptureManager = context.getSystemService(ContentCaptureManager.class); return mContentCaptureManager; } void delayNotifyContentCaptureInsetsEvent(@NonNull Insets insets) { if (mContentCaptureManager == null) { return; } ArrayList<Object> events = ensureEvents( mContentCaptureManager.getMainContentCaptureSession()); events.add(insets); } private void delayNotifyContentCaptureEvent(@NonNull ContentCaptureSession session, @NonNull View view, boolean appeared) { ArrayList<Object> events = ensureEvents(session); events.add(appeared ? view : view.getAutofillId()); } @NonNull private ArrayList<Object> ensureEvents(@NonNull ContentCaptureSession session) { if (mContentCaptureEvents == null) { // Most of the time there will be just one session, so intial capacity is 1 mContentCaptureEvents = new SparseArray<>(1); Loading @@ -29112,16 +29137,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback, events = new ArrayList<>(); mContentCaptureEvents.put(sessionId, events); } events.add(appeared ? view : view.getAutofillId()); } @Nullable ContentCaptureManager getContentCaptureManager(@NonNull Context context) { if (mContentCaptureManager != null) { return mContentCaptureManager; } mContentCaptureManager = context.getSystemService(ContentCaptureManager.class); return mContentCaptureManager; return events; } } core/java/android/view/ViewRootImpl.java +4 −0 Original line number Diff line number Diff line Loading @@ -81,6 +81,7 @@ import android.graphics.Canvas; import android.graphics.Color; import android.graphics.FrameInfo; import android.graphics.HardwareRenderer.FrameDrawingCallback; import android.graphics.Insets; import android.graphics.Matrix; import android.graphics.PixelFormat; import android.graphics.Point; Loading Loading @@ -2254,6 +2255,7 @@ public final class ViewRootImpl implements ViewParent, insets = insets.consumeDisplayCutout(); } host.dispatchApplyWindowInsets(insets); mAttachInfo.delayNotifyContentCaptureInsetsEvent(insets.getInsets(Type.all())); Trace.traceEnd(Trace.TRACE_TAG_VIEW); } Loading Loading @@ -3118,6 +3120,8 @@ public final class ViewRootImpl implements ViewParent, ViewStructure structure = session.newViewStructure(view); view.onProvideContentCaptureStructure(structure, /* flags= */ 0); session.notifyViewAppeared(structure); } else if (event instanceof Insets) { mainSession.notifyViewInsetsChanged(sessionId, (Insets) event); } else { Log.w(mTag, "invalid content capture event: " + event); } Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -56741,6 +56741,7 @@ package android.view.contentcapture { method public final void notifySessionResumed(); method public final void notifyViewAppeared(@NonNull android.view.ViewStructure); method public final void notifyViewDisappeared(@NonNull android.view.autofill.AutofillId); method public final void notifyViewInsetsChanged(@NonNull android.graphics.Insets); method public final void notifyViewTextChanged(@NonNull android.view.autofill.AutofillId, @Nullable CharSequence); method public final void notifyViewsDisappeared(@NonNull android.view.autofill.AutofillId, @NonNull long[]); method public final void setContentCaptureContext(@Nullable android.view.contentcapture.ContentCaptureContext);
api/system-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -13191,6 +13191,7 @@ package android.view.contentcapture { method public long getEventTime(); method @Nullable public android.view.autofill.AutofillId getId(); method @Nullable public java.util.List<android.view.autofill.AutofillId> getIds(); method @Nullable public android.graphics.Insets getInsets(); method @Nullable public CharSequence getText(); method public int getType(); method @Nullable public android.view.contentcapture.ViewNode getViewNode(); Loading @@ -13201,6 +13202,7 @@ package android.view.contentcapture { field public static final int TYPE_SESSION_RESUMED = 7; // 0x7 field public static final int TYPE_VIEW_APPEARED = 1; // 0x1 field public static final int TYPE_VIEW_DISAPPEARED = 2; // 0x2 field public static final int TYPE_VIEW_INSETS_CHANGED = 9; // 0x9 field public static final int TYPE_VIEW_TEXT_CHANGED = 3; // 0x3 field public static final int TYPE_VIEW_TREE_APPEARED = 5; // 0x5 field public static final int TYPE_VIEW_TREE_APPEARING = 4; // 0x4
api/test-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -5085,6 +5085,7 @@ package android.view.contentcapture { method public long getEventTime(); method @Nullable public android.view.autofill.AutofillId getId(); method @Nullable public java.util.List<android.view.autofill.AutofillId> getIds(); method @Nullable public android.graphics.Insets getInsets(); method @Nullable public CharSequence getText(); method public int getType(); method @Nullable public android.view.contentcapture.ViewNode getViewNode(); Loading @@ -5095,6 +5096,7 @@ package android.view.contentcapture { field public static final int TYPE_SESSION_RESUMED = 7; // 0x7 field public static final int TYPE_VIEW_APPEARED = 1; // 0x1 field public static final int TYPE_VIEW_DISAPPEARED = 2; // 0x2 field public static final int TYPE_VIEW_INSETS_CHANGED = 9; // 0x9 field public static final int TYPE_VIEW_TEXT_CHANGED = 3; // 0x3 field public static final int TYPE_VIEW_TREE_APPEARED = 5; // 0x5 field public static final int TYPE_VIEW_TREE_APPEARING = 4; // 0x4 Loading
core/java/android/view/View.java +26 −9 Original line number Diff line number Diff line Loading @@ -29099,8 +29099,33 @@ public class View implements Drawable.Callback, KeyEvent.Callback, mTreeObserver = new ViewTreeObserver(context); } @Nullable ContentCaptureManager getContentCaptureManager(@NonNull Context context) { if (mContentCaptureManager != null) { return mContentCaptureManager; } mContentCaptureManager = context.getSystemService(ContentCaptureManager.class); return mContentCaptureManager; } void delayNotifyContentCaptureInsetsEvent(@NonNull Insets insets) { if (mContentCaptureManager == null) { return; } ArrayList<Object> events = ensureEvents( mContentCaptureManager.getMainContentCaptureSession()); events.add(insets); } private void delayNotifyContentCaptureEvent(@NonNull ContentCaptureSession session, @NonNull View view, boolean appeared) { ArrayList<Object> events = ensureEvents(session); events.add(appeared ? view : view.getAutofillId()); } @NonNull private ArrayList<Object> ensureEvents(@NonNull ContentCaptureSession session) { if (mContentCaptureEvents == null) { // Most of the time there will be just one session, so intial capacity is 1 mContentCaptureEvents = new SparseArray<>(1); Loading @@ -29112,16 +29137,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback, events = new ArrayList<>(); mContentCaptureEvents.put(sessionId, events); } events.add(appeared ? view : view.getAutofillId()); } @Nullable ContentCaptureManager getContentCaptureManager(@NonNull Context context) { if (mContentCaptureManager != null) { return mContentCaptureManager; } mContentCaptureManager = context.getSystemService(ContentCaptureManager.class); return mContentCaptureManager; return events; } }
core/java/android/view/ViewRootImpl.java +4 −0 Original line number Diff line number Diff line Loading @@ -81,6 +81,7 @@ import android.graphics.Canvas; import android.graphics.Color; import android.graphics.FrameInfo; import android.graphics.HardwareRenderer.FrameDrawingCallback; import android.graphics.Insets; import android.graphics.Matrix; import android.graphics.PixelFormat; import android.graphics.Point; Loading Loading @@ -2254,6 +2255,7 @@ public final class ViewRootImpl implements ViewParent, insets = insets.consumeDisplayCutout(); } host.dispatchApplyWindowInsets(insets); mAttachInfo.delayNotifyContentCaptureInsetsEvent(insets.getInsets(Type.all())); Trace.traceEnd(Trace.TRACE_TAG_VIEW); } Loading Loading @@ -3118,6 +3120,8 @@ public final class ViewRootImpl implements ViewParent, ViewStructure structure = session.newViewStructure(view); view.onProvideContentCaptureStructure(structure, /* flags= */ 0); session.notifyViewAppeared(structure); } else if (event instanceof Insets) { mainSession.notifyViewInsetsChanged(sessionId, (Insets) event); } else { Log.w(mTag, "invalid content capture event: " + event); } Loading