summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Vishnu Nair <vishnun@google.com> 2024-02-12 22:12:55 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-02-12 22:12:55 +0000
commit2547da26086e58ef1f81ebde2ac3e27cd4432546 (patch)
treeb5d584bd9ff6b2cba602e39b3c485a05edf5745e
parent2e325e2301c0cb1d313316812c95f90c0fef9f04 (diff)
parentaabed5b42f9ec3cd5506571f7942133ad82bb199 (diff)
Merge "Clarify when View#getWindowToken can return null" into main
-rw-r--r--core/java/android/view/View.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index e781f3cdee2f..3dfd68af5aaa 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -22299,6 +22299,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
* Retrieve a unique token identifying the window this view is attached to.
* @return Return the window's token for use in
* {@link WindowManager.LayoutParams#token WindowManager.LayoutParams.token}.
+ * This token maybe null if this view is not attached to a window.
+ * @see #isAttachedToWindow() for current window attach state
+ * @see OnAttachStateChangeListener to listen to window attach/detach state changes
*/
public IBinder getWindowToken() {
return mAttachInfo != null ? mAttachInfo.mWindowToken : null;