Fix ActionBar#setHomeActionContentDescription(0)
This call should be analogous to calling
setHomeActionContentDescription(null) and not throw an exception.
Bug 8657256
Change-Id: Ifa9c7b999f4bf1a31fba43f869e234b1f1861512
diff --git a/core/java/com/android/internal/widget/ActionBarView.java b/core/java/com/android/internal/widget/ActionBarView.java
index 59ff597..d69bc31 100644
--- a/core/java/com/android/internal/widget/ActionBarView.java
+++ b/core/java/com/android/internal/widget/ActionBarView.java
@@ -1354,7 +1354,7 @@
public void setHomeActionContentDescription(int resId) {
mHomeDescriptionRes = resId;
- mHomeDescription = getResources().getText(resId);
+ mHomeDescription = resId != 0 ? getResources().getText(resId) : null;
}
static class SavedState extends BaseSavedState {