From ac3b7aafc93eaa4f7a936e83343278de542743ac Mon Sep 17 00:00:00 2001 From: Nikita Dubrovsky Date: Wed, 28 Apr 2021 17:09:56 -0700 Subject: [PATCH] Improve javadoc for OnReceiveContentListener.onReceiveContent Bug: 186693629 Test: Presubmit only Change-Id: I153a375b9e97e1c28cbe683b907adae0e813d9af --- .../android/view/OnReceiveContentListener.java | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/core/java/android/view/OnReceiveContentListener.java b/core/java/android/view/OnReceiveContentListener.java index 3d9968c7f2c68..1e930e61c3bb9 100644 --- a/core/java/android/view/OnReceiveContentListener.java +++ b/core/java/android/view/OnReceiveContentListener.java @@ -74,13 +74,17 @@ public interface OnReceiveContentListener { * preserve the common behavior for inserting text. See the class javadoc for a sample * implementation. * - *

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. - * - *

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 - * completely separate view). + *

Handling different content + *

* * @param view The view where the content insertion was requested. * @param payload The content to insert and related metadata.