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

Commit 875862e3 authored by Romain Guy's avatar Romain Guy
Browse files

Prevent NPE when no indicator is specified.

Bug #3362349

Change-Id: Ie15ed9e31fdd4eb72a18471375d8937c50eb1802
parent 7444da51
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -211,7 +211,7 @@ public class ExpandableListView extends ListView {
                .getDimensionPixelSize(com.android.internal.R.styleable.ExpandableListView_indicatorLeft, 0);
        mIndicatorRight = a
                .getDimensionPixelSize(com.android.internal.R.styleable.ExpandableListView_indicatorRight, 0);
        if (mIndicatorRight == 0) {
        if (mIndicatorRight == 0 && mGroupIndicator != null) {
            mIndicatorRight = mIndicatorLeft + mGroupIndicator.getIntrinsicWidth();
        }
        mChildIndicatorLeft = a.getDimensionPixelSize(
@@ -1022,6 +1022,9 @@ public class ExpandableListView extends ListView {
     */
    public void setGroupIndicator(Drawable groupIndicator) {
        mGroupIndicator = groupIndicator;
        if (mIndicatorRight == 0 && mGroupIndicator != null) {
            mIndicatorRight = mIndicatorLeft + mGroupIndicator.getIntrinsicWidth();
        }
    }

    /**