summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Andrew Solovay <asolovay@google.com> 2019-11-01 22:19:04 +0000
committer Andrew Solovay <asolovay@google.com> 2019-11-01 16:07:39 -0700
commitee07a8cadbdd2bcacd0185c07cbcfd035afda3af (patch)
tree6a904fadbb13fd42ad725967df57703b3d64c6f9
parent7186df9e6fbc28fdc5239d330bb6317e0c536628 (diff)
docs: Clarified behavior of TypedArray.getBoolean()
Doc currently says "The method will return whether [the attribute] is equal to zero", which could be read as "returns true if the attribute is zero", which is incorrect. Rephrased as: "...returns false if the attribute is equal to zero, and true otherwise." Change-Id: Ie7d763ac2784ecc3a7fb522b4fa583ec8d2644d4 BUG: 143049875 Test: make ds-docs
-rw-r--r--core/java/android/content/res/TypedArray.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/java/android/content/res/TypedArray.java b/core/java/android/content/res/TypedArray.java
index b79cf6566987..38df317575d7 100644
--- a/core/java/android/content/res/TypedArray.java
+++ b/core/java/android/content/res/TypedArray.java
@@ -360,8 +360,9 @@ public class TypedArray {
/**
* Retrieve the boolean value for the attribute at <var>index</var>.
* <p>
- * If the attribute is an integer value, this method will return whether
- * it is equal to zero. If the attribute is not a boolean or integer value,
+ * If the attribute is an integer value, this method returns false if the
+ * attribute is equal to zero, and true otherwise.
+ * If the attribute is not a boolean or integer value,
* this method will attempt to coerce it to an integer using
* {@link Integer#decode(String)} and return whether it is equal to zero.
*