From ee07a8cadbdd2bcacd0185c07cbcfd035afda3af Mon Sep 17 00:00:00 2001 From: Andrew Solovay Date: Fri, 1 Nov 2019 22:19:04 +0000 Subject: 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 --- core/java/android/content/res/TypedArray.java | 5 +++-- 1 file 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 index. *

- * 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. * -- cgit v1.2.3-59-g8ed1b