Merge "Remove view based on known index of the view on exception" into tm-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
31f6e65c85
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user