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

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

Merge "Make sure to cleanup views that couldn't be added" into tm-qpr-dev

parents 1f147b48 56ac2e24
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -404,9 +404,10 @@ public final class WindowManagerGlobal {
            try {
                root.setView(view, wparams, panelParentView, userId);
            } catch (RuntimeException e) {
                final int viewIndex = findViewLocked(view, false);
                // BadTokenException or InvalidDisplayException, clean up.
                if (index >= 0) {
                    removeViewLocked(index, true);
                if (viewIndex >= 0) {
                    removeViewLocked(viewIndex, true);
                }
                throw e;
            }