Two men have been charged after they allegedly assaulted two police officers after they were asked to put on masks in Sydney’s west.