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

Commit 35c3cb6a authored by Alan Viverette's avatar Alan Viverette
Browse files

Remove scroll view from correct parent in AlertController

BUG: 18191700
Change-Id: I37602fc26d103b76021f00c58f03bc32d7a978fe
parent fc2b9039
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.view.ViewParent;
import android.view.ViewTreeObserver;
import android.view.Window;
import android.view.WindowInsets;
@@ -589,9 +590,10 @@ public class AlertController {
            mScrollView.removeView(mMessageView);

            if (mListView != null) {
                final int childIndex = mScrollView.indexOfChild(mScrollView);
                contentPanel.removeViewAt(childIndex);
                contentPanel.addView(mListView, childIndex,
                final ViewGroup scrollParent = (ViewGroup) mScrollView.getParent();
                final int childIndex = scrollParent.indexOfChild(mScrollView);
                scrollParent.removeViewAt(childIndex);
                scrollParent.addView(mListView, childIndex,
                        new LayoutParams(MATCH_PARENT, MATCH_PARENT));
            } else {
                contentPanel.setVisibility(View.GONE);