My theory is that it was Fredo's part of the plan to open the drapes in Mike's room then meet with Johnny Ola or one of his men and the assassins inside the compound. Then the assassins attempted their hit on Mike and afterwards met with Johnny of whoever who then killed them both.
If anything in this life is certain; If history has taught us anything, it's that you can kill anyone.