From 7891181a8b9cf8c0eda5f9590370599d941b1ab0 Mon Sep 17 00:00:00 2001 From: Arthur Hung Date: Tue, 14 Feb 2023 09:14:54 +0000 Subject: [PATCH] Clarify unbuffered dispatch may fail before attached to window Rephase the docs to to clarify that prior to Android U, the call to `View::requestUnbufferedDispatch` will do nothing if the View is not attached to a window. Bug: 268105812 Test: manual Change-Id: Ic70ee2fe5467d2471f9f95171b4feff244c6cea0 --- core/java/android/view/View.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 241ee5a28dd8b..c2afd203b9b79 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -17201,8 +17201,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * This is similar to {@link View#requestUnbufferedDispatch(MotionEvent)}, but does not * automatically terminate, and allows the specification of arbitrary input source classes. * - *

Prior to {@link android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE}, this method will fail - * when this View is not attached to a window. + *

Prior to {@link android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE}, calling this method + * will not result in any behavioral changes when this View is not attached to a window. * * @param source The combined input source class to request unbuffered dispatch for. All * events coming from these source classes will not be buffered. Set to