Merge "Fixed indexOutOfBoundsException in WindowManager"