Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ff2a83a1 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "sysui: fix indicator direction."

parents 08b61ea5 bb3af7d3
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -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);
    }
}