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

Commit 5e1eb4b3 authored by Nikita Dubrovsky's avatar Nikita Dubrovsky Committed by Automerger Merge Worker
Browse files

Merge "Improve javadoc for OnReceiveContentListener.onReceiveContent" into sc-dev am: 5177dab6

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14344062

Change-Id: I11faab3eb8cbf7dcfe05037d4e008e0621f09286
parents 1d76b705 5177dab6
Loading
Loading
Loading
Loading
+11 −7
Original line number Diff line number Diff line
@@ -74,13 +74,17 @@ public interface OnReceiveContentListener {
     * preserve the common behavior for inserting text. See the class javadoc for a sample
     * implementation.
     *
     * <p>If implementing handling for text: if the view has a selection, the selection should
     * be overwritten by the passed-in content; if there's no selection, the passed-in content
     * should be inserted at the current cursor position.
     *
     * <p>If implementing handling for non-text content (e.g. images): the content may be
     * inserted inline, or it may be added as an attachment (could potentially be shown in a
     * <p>Handling different content
     * <ul>
     *     <li>Text. If the {@link ContentInfo#getSource() source} is
     *     {@link ContentInfo#SOURCE_AUTOFILL autofill}, the view's content should be fully
     *     replaced by the passed-in text. For sources other than autofill, the passed-in text
     *     should overwrite the current selection or be inserted at the current cursor position
     *     if there is no selection.
     *     <li>Non-text content (e.g. images). The content may be inserted inline if the widget
     *     supports this, or it may be added as an attachment (could potentially be shown in a
     *     completely separate view).
     * </ul>
     *
     * @param view The view where the content insertion was requested.
     * @param payload The content to insert and related metadata.