The problem is the “announced themselves.” They need to actually communicate that to the people inside. No way the boy friend knew that was police when he started shooting.
Even if they do announce themselves it does not matter since home invaders can yell “police” to gain an advantage.
Imagine armed men break down your door in the dark and you know police have no reason to be there.
Would you put your gun down just because they say they are police?
Hold on now you are bringing logic and critical thinking into this thread.