From ac95cd587b46923e599bc61049fa0024b9035940 Mon Sep 17 00:00:00 2001 From: yingleiw Date: Wed, 13 Nov 2019 17:56:20 -0800 Subject: [PATCH] Add more guidance for how to write setStateDescription This is to address the concern from API council for accessibility state api. See b/143652980 for more details. Bug: 143652980 Test: not needed for javadoc change Change-Id: I3f219b7838b72fda86a957ebd14c063175657d47 --- core/java/android/view/View.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 412b0ca95680f..17925ab56ddfc 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -10348,6 +10348,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * the user. It is a supplement to the boolean states (for example, checked/unchecked) and * it is used for customized state description (for example, "wifi, connected, three bars"). * State description changes frequently while content description should change less often. + * State description should be localized. For android widgets which have default state + * descriptions, app developers can call this method to override the state descriptions. + * Setting state description to null restores the default behavior. * * @param stateDescription The state description. * @see #getStateDescription()