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

Commit 4ab2bc56 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

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

parents 29c18041 c01cce03
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -404,9 +404,10 @@ 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);
                // BadTokenException or InvalidDisplayException, clean up.
                // BadTokenException or InvalidDisplayException, clean up.
                if (index >= 0) {
                if (viewIndex >= 0) {
                    removeViewLocked(index, true);
                    removeViewLocked(viewIndex, true);
                }
                }
                throw e;
                throw e;
            }
            }