summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorAdam Powell <adamp@google.com>2014-05-29 12:16:09 -0700
committerAdam Powell <adamp@google.com>2014-05-29 12:16:09 -0700
commit8e5372fe93ee2ee3bf20baab9054b39b4c5043ce (patch)
tree83589cb4cacb34880c5e68742fb9aee8e6d02baa /core
parent71ac80c46a1b094ad951e59c24791d9e9ef769bf (diff)
downloadframeworks_base-8e5372fe93ee2ee3bf20baab9054b39b4c5043ce.zip
frameworks_base-8e5372fe93ee2ee3bf20baab9054b39b4c5043ce.tar.gz
frameworks_base-8e5372fe93ee2ee3bf20baab9054b39b4c5043ce.tar.bz2
Fix for setting Toolbar content descriptions
Allow resid 0 as a null content description. Change-Id: I0663feac229a77d5efffece2bd686de4ee99d840
Diffstat (limited to 'core')
-rw-r--r--core/java/android/widget/Toolbar.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/android/widget/Toolbar.java b/core/java/android/widget/Toolbar.java
index 8c67bb7..5033bee 100644
--- a/core/java/android/widget/Toolbar.java
+++ b/core/java/android/widget/Toolbar.java
@@ -592,7 +592,7 @@ public class Toolbar extends ViewGroup {
*/
public void setNavigationContentDescription(int resId) {
ensureNavButtonView();
- mNavButtonView.setContentDescription(getContext().getText(resId));
+ mNavButtonView.setContentDescription(resId != 0 ? getContext().getText(resId) : null);
}
/**