diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ExpandableIndicator.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ExpandableIndicator.java index a295cfacbbcf7..8f49c85b0938a 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ExpandableIndicator.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ExpandableIndicator.java @@ -32,8 +32,7 @@ public class ExpandableIndicator extends ImageView { @Override protected void onFinishInflate() { super.onFinishInflate(); - final int res = getDrawableResourceId(mExpanded); - setImageResource(res); + updateIndicatorDrawable(); setContentDescription(getContentDescription(mExpanded)); } @@ -53,6 +52,7 @@ public class ExpandableIndicator extends ImageView { /** Whether the icons are using the default direction or the opposite */ public void setDefaultDirection(boolean isDefaultDirection) { mIsDefaultDirection = isDefaultDirection; + updateIndicatorDrawable(); } private int getDrawableResourceId(boolean expanded) { @@ -69,4 +69,9 @@ public class ExpandableIndicator extends ImageView { return expanded ? mContext.getString(R.string.accessibility_quick_settings_collapse) : mContext.getString(R.string.accessibility_quick_settings_expand); } + + private void updateIndicatorDrawable() { + final int res = getDrawableResourceId(mExpanded); + setImageResource(res); + } }