Not to remove the same animator twice

Transition.forceToEnd may be called during the execution of method
itself. In that case, an item of the map was removed during the
previous iteration and ArrayIndexOutOfBoundsException was raised.

This CL updates the loop to iterate the copy of map instead of the
original map instance, so we don't break the iteration and see
exception anymore.

Bug: 120675604
Test: Ran 'cts-tradefed run commandAndExit cts --module CtsWidgetTestCases
    --test android.widget.cts.ToolbarTest#testMenuOverflowSubmenu'
    20 times and no failure was observed.
Change-Id: Iaba2f74f29d6ed22f84d92e0d4ca106cdfca904c
1 file changed