Merge "Remove view based on known index of the view on exception" into tm-qpr-dev am: 31f6e65c85
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19299681 Change-Id: I748dcc4a81da53fc5948215d386f498f344958fe Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -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