Ensure arraylist index is montonically decreasing
A previous fix for IndexOutOfBoundsException (ag/584621) left a
situation where the index would not decrement if the arraylist
size didn't change. The size doesn't change if the window being
removed is animating away. That caused window manager to remain
in an infinite loop within removeAllWindows.
This change ensures that the index diminishes each pass through
the loop and doesn't exceed the bounds of the arraylist.
Fixes bug 18362246.
1 file changed