diff options
author | Adam Powell <adamp@google.com> | 2014-05-29 12:16:09 -0700 |
---|---|---|
committer | Adam Powell <adamp@google.com> | 2014-05-29 12:16:09 -0700 |
commit | 8e5372fe93ee2ee3bf20baab9054b39b4c5043ce (patch) | |
tree | 83589cb4cacb34880c5e68742fb9aee8e6d02baa /core | |
parent | 71ac80c46a1b094ad951e59c24791d9e9ef769bf (diff) | |
download | frameworks_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.java | 2 |
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); } /** |