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

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

Merge "Remove view based on known index of the view on exception" into tm-qpr-dev

parents e14a002e b1525b85
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -404,7 +404,7 @@ public final class WindowManagerGlobal {
            try {
            try {
                root.setView(view, wparams, panelParentView, userId);
                root.setView(view, wparams, panelParentView, userId);
            } catch (RuntimeException e) {
            } catch (RuntimeException e) {
                final int viewIndex = findViewLocked(view, false);
                final int viewIndex = (index >= 0) ? index : (mViews.size() - 1);
                // BadTokenException or InvalidDisplayException, clean up.
                // BadTokenException or InvalidDisplayException, clean up.
                if (viewIndex >= 0) {
                if (viewIndex >= 0) {
                    removeViewLocked(viewIndex, true);
                    removeViewLocked(viewIndex, true);