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

Commit d93421b1 authored by Alan Viverette's avatar Alan Viverette Committed by Android Git Automerger
Browse files

am afffc5c2: Merge "Remove scroll view from correct parent in AlertController" into lmp-mr1-dev

* commit 'afffc5c2':
  Remove scroll view from correct parent in AlertController
parents 3a68e181 afffc5c2
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);