From 5bd2c855af2cac7774776019e6c737962c7a8bd3 Mon Sep 17 00:00:00 2001 From: Alan Viverette Date: Thu, 16 Jan 2014 15:55:25 -0800 Subject: [PATCH] Explicit documentation for View.getTag() return value when not set Change-Id: I143d445b0c801ffabe04f0042e559594e52d07ed --- core/java/android/view/View.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index a3826006b7fc..52b1b39d0a7f 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -1645,7 +1645,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * @see #setTag(Object) * @see #getTag() */ - protected Object mTag; + protected Object mTag = null; // for mPrivateFlags: /** {@hide} */ @@ -16442,7 +16442,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback, /** * Returns this view's tag. * - * @return the Object stored in this view as a tag + * @return the Object stored in this view as a tag, or {@code null} if not + * set * * @see #setTag(Object) * @see #getTag(int) @@ -16472,7 +16473,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * * @param key The key identifying the tag * - * @return the Object stored in this view as a tag + * @return the Object stored in this view as a tag, or {@code null} if not + * set * * @see #setTag(int, Object) * @see #getTag() -- 2.11.0